Page MenuHomeVyOS Platform

1.4-rolling-202304120317 to 1.4.0-rc1: dynamic dns migration fail
Closed, ResolvedPublicBUG

Description

To reproduce, set a minimal config on 1.4-rolling-202304120317, e.g. to:

set interfaces ethernet eth1 address 'dhcp'
set interfaces ethernet eth1 hw-id '00:11:22:33:44:01'
set interfaces loopback lo
set interfaces pppoe pppoe0 authentication password 'xxx'
set interfaces pppoe pppoe0 authentication username 'foo@bar'
set interfaces pppoe pppoe0 source-interface 'eth1'
set service dns dynamic interface eth1 service dyndns host-name 'foo1.dyndns.org'
set service dns dynamic interface eth1 service dyndns login 'foo1'
set service dns dynamic interface eth1 service dyndns password 'bar1'
set service dns dynamic interface pppoe0 service dyndns host-name 'foo2.dyndns.org'
set service dns dynamic interface pppoe0 service dyndns login 'foo2'
set service dns dynamic interface pppoe0 service dyndns password 'bar2'
set service ssh
set system host-name 'vyos'
set system login user vyos authentication encrypted-password 'redact'
set system login user vyos authentication plaintext-password ''
set system name-server 'eth1'
set system syslog global facility all level 'info'
set system syslog global facility protocols level 'debug'

Now install 1.4.0-rc1 iso, keep config and reboot. Upon boot, the config migration fails. Details:

$ sudo journalctl | grep vyos-router
Jan 13 09:30:42 vyos vyos-router[1291]: Mounting VyOS Config...done.
Jan 13 09:30:46 vyos vyos-router[1291]: Starting VyOS router: migrate
Jan 13 09:30:46 vyos vyos-router[1732]: Migration script error: /opt/vyatta/etc/config-migrate/migrate/dns-dynamic/2-to-3: [Errno 1] failed to run command: ['/opt/vyatta/etc/config-migrate/migrate/dns-dynamic/2-to-3', '/opt/vyatta/etc/config/config.boot']
Jan 13 09:30:46 vyos vyos-router[1732]: returned: - op: set path: ['service', 'dns', 'dynamic', 'name'] value: None replace: True
Jan 13 09:30:46 vyos vyos-router[1732]: - op: set path: ['service', 'dns', 'dynamic', 'address', 'eth1', 'service', 'dyndns', 'address'] value: eth1 replace: True
Jan 13 09:30:46 vyos vyos-router[1732]: - op: copy old_path: ['service', 'dns', 'dynamic', 'address', 'eth1', 'service', 'dyndns'] new_path: ['service', 'dns', 'dynamic', 'name', 'dyndns']
Jan 13 09:30:46 vyos vyos-router[1732]: - op: set path: ['service', 'dns', 'dynamic', 'address', 'pppoe0', 'service', 'dyndns', 'address'] value: pppoe0 replace: True
Jan 13 09:30:46 vyos vyos-router[1732]: exit code: 1.
Jan 13 09:30:55 vyos vyos-router[1291]:  configure failed!

If anything else is needed, let me know.

Details

Difficulty level
Unknown (require assessment)
Version
1.4.0-rc1
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

marc_s created this object in space S1 VyOS Public.

Quite likely the following relevant patches are not present in 1.4-rc1:

Is it possible to compare the migration scripts installed in /opt/vyatta/etc/config-migrate/migrate/dns-dynamic/ and in https://github.com/vyos/vyos-1x/tree/sagitta/src/migration-scripts/dns-dynamic and see if all the migrations are updated in your local installation?

Viacheslav changed the subtype of this task from "Task" to "Bug".

Seems you're right @indrajitr:

root@vyos:/opt/vyatta/etc/config-migrate/migrate/dns-dynamic# ls -la
total 52
drwxr-xr-x 1 root root 4096 Jan 14 13:55 .
drwxr-xr-x 1 root root 4096 Dec 21 20:06 ..
-rwxr-xr-x 1 root root 6179 Jan 14 13:55 0-to-1
-rwxr-xr-x 1 root root 4563 Jan 11  2021 0-to-1.orig
-rwxr-xr-x 1 root root 2724 Jan 14 13:55 1-to-2
-rwxr-xr-x 1 root root 2724 Jan 11  2021 1-to-2.orig
-rwxr-xr-x 1 root root 4852 Jan 14 13:54 2-to-3
-rwxr-xr-x 1 root root 3696 Jan 11  2021 2-to-3.orig

The *.orig files are the scripts present in 1.4.0-rc1, the others are latest from Github.

With these new versions in place, I can now indeed do a load with the migrations in place:

vyos@vyos:~$ config
WARNING: There was a config error on boot: saving the configuration now could overwrite data.
You may want to check and reload the boot config
[edit]
vyos@vyos#
[edit]
vyos@vyos# load
Loading configuration from 'config.boot'
Load complete. Use 'commit' to make changes effective.
[edit]
vyos@vyos# compare
[service]
+ dns {
+     dynamic {
+         name service-dyndns-eth1 {
+             address "eth1"
+             host-name "foo1.dyndns.org"
+             password "bar1"
+             protocol "dyndns2"
+             username "foo1"
+         }
+         name service-dyndns-pppoe0 {
+             address "pppoe0"
+             host-name "foo2.dyndns.org"
+             password "bar2"
+             protocol "dyndns2"
+             username "foo2"
+         }
+     }
+ }
[system]
+ syslog {
+     global {
+         facility all {
+             level "info"
+         }
+         facility local7 {
+             level "debug"
+         }
+     }
+ }

[edit]
vyos@vyos# commit

WARNING: interface pppoe0 does not exist!

[edit]
vyos@vyos# save
[edit]
vyos@vyos# cat /config/config.boot
interfaces {
    ethernet eth1 {
        address "dhcp"
        hw-id "00:11:22:33:44:01"
    }
    loopback lo {
    }
    pppoe pppoe0 {
        authentication {
            password "xxx"
            username "foo@bar"
        }
        source-interface "eth1"
    }
}
service {
    dns {
        dynamic {
            name service-dyndns-eth1 {
                address "eth1"
                host-name "foo1.dyndns.org"
                password "bar1"
                protocol "dyndns2"
                username "foo1"
            }
            name service-dyndns-pppoe0 {
                address "pppoe0"
                host-name "foo2.dyndns.org"
                password "bar2"
                protocol "dyndns2"
                username "foo2"
            }
        }
    }
    ssh
}
system {
    host-name "vyos"
    login {
        user vyos {
            authentication {
                encrypted-password "redact"
                plaintext-password ""
            }
        }
    }
    name-server "eth1"
    syslog {
        global {
            facility all {
                level "info"
            }
            facility local7 {
                level "debug"
            }
        }
    }
}

// Warning: Do not remove the following line.
// vyos-config-version: "bgp@4:broadcast-relay@1:cluster@2:config-management@1:conntrack@3:conntrack-sync@2:container@1:dhcp-relay@2:dhcp-server@6:dhcpv6-server@1:dns-dynamic@3:dns-forwarding@4:firewall@13:flow-accounting@1:https@5:ids@1:interfaces@32:ipoe-server@1:ipsec@12:isis@3:l2tp@4:lldp@1:mdns@1:monitoring@1:nat@7:nat66@3:ntp@3:openconnect@2:ospf@2:pim@1:policy@7:pppoe-server@6:pptp@2:qos@2:quagga@11:rip@1:rpki@1:salt@1:snmp@3:ssh@2:sstp@4:system@26:vrf@3:vrrp@4:vyos-accel-ppp@2:wanloadbalance@3:webproxy@2"
// Release version: 1.4.0-rc1

I take it RC2 will contain these new versions @Viacheslav?

I take it RC2 will contain these new versions @Viacheslav?

Yes it will include those fixes

Viacheslav changed the task status from Open to Needs testing.Jan 15 2024, 11:08 AM
Viacheslav assigned this task to indrajitr.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.