Hello,
Trying to configure a new VyOS instance using my ansible process that templates out config chunks and merges them in. When attempting to merge in the following config section:
service { conntrack-sync { accept-protocol tcp accept-protocol udp accept-protocol icmp failover-mechanism { vrrp { sync-group MAIN } } interface eth0 { } mcast-group 225.0.0.50 } dhcp-relay { listen-interface eth0.40 listen-interface eth0.50 listen-interface eth0 listen-interface eth0.20 listen-interface eth0.30 listen-interface eth0.110 listen-interface eth0.200 relay-options { relay-agents-packets discard } server 10.0.10.10 server 10.0.10.11 server 10.0.10.12 server 10.0.10.13 upstream-interface eth0.10 } dns { dynamic { name namecheap { address { interface peth0 } host-name @ host-name meep password asdf protocol namecheap username meep.com } } } ntp { allow-client { address 10.0.0.0/8 address ::/0 } listen-address 0.0.0.0 server time1.vyos.net { } server time2.vyos.net { } server time3.vyos.net { } } router-advert { interface eth0.40 { link-mtu 1500 name-server fdf0:ff1e::10:a name-server fdf0:ff1e::10:b prefix ::/64 { } } interface eth0.200 { link-mtu 1500 name-server fdf0:ff1e::10:a name-server fdf0:ff1e::10:b prefix ::/64 { } } } ssh { listen-address 10.0.0.2 port 22 } } interfaces { }
I get the following migration error:
vyos.migrate - ERROR - Error in /opt/vyatta/etc/config-migrate/migrate/dns-dynamic/1-to-2: Path [b'service dns dynamic address'] doesn't exist Traceback (most recent call last): File "/usr/lib/python3/dist-packages/vyos/compose_config.py", line 56, in apply_func func(self.config_tree) File "/opt/vyatta/etc/config-migrate/migrate/dns-dynamic/1-to-2", line 40, in migrate for address in config.list_nodes(address_path): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/vyos/configtree.py", line 322, in list_nodes raise ConfigTreeError("Path [{}] doesn't exist".format(path_str)) vyos.configtree.ConfigTreeError: Path [b'service dns dynamic address'] doesn't exist The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/vyos/compose_config.py", line 73, in apply_file self.apply_func(func) File "/usr/lib/python3/dist-packages/vyos/compose_config.py", line 60, in apply_func raise ComposeConfigError(e) from e vyos.compose_config.ComposeConfigError: Path [b'service dns dynamic address'] doesn't exist incomplete migration: check /opt/vyatta/etc/config/vyos-migrate.log for error [edit]
vyos-migrate.log just shows that it's failing in the dns-dynamic/1-to-2 script located in the repository here: https://github.com/vyos/vyos-1x/blob/current/src/migration-scripts/dns-dynamic/1-to-2 . Can likely be solved by checking if address is configured before running through the for loops. If I can get some guidance I'd love to try to contribute.