** Description changed: [Impact] The last netplan SRU (0.103-0ubuntu5~20.04.2) introduced a state tracking feature, that regressed the 'netplan try' CLI command, if no such --state argument is passed, making it fail with a error message like this: An error occurred: 'NetplanApply' object has no attribute 'state' This upload contains a fix to properly initialize the 'self.state' attribute in all cases to avoid this problem. [Test Plan] In addition to runing & passing the full set of unit- and integration-tests (that contains new tests to check for this regression), as described in https://wiki.ubuntu.com/NetplanUpdates we want to run the following commands to make sure the 'netplan try' command is working properly: $ netplan try $ [Ctrl+C] # to abort the waiting => Make sure it does not print a "An error occurred" message $ netplan try $ [Enter] => Make sure it does not print a "An error occurred" message - autopkgtest logs TBD: - * Impish: amd64, arm64, armhf, ppc64el, s390x - * Hirsute: amd64, arm64, armhf, ppc64el, s390x - * Focal: amd64, arm64, armhf, ppc64el, s390x + autopkgtest logs: + * Impish: + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/impish_amd64.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/impish_arm64.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/impish_armhf.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/impish_ppc64el.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/impish_s390x.log + * Hirsute: + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/hirsute_amd64.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/hirsute_arm64.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/hirsute_armhf.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/hirsute_ppc64el.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/hirsute_s390x.log + * Focal: + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/focal_amd64.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/focal_arm64.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/focal_armhf.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/focal_ppc64el.log + https://git.launchpad.net/~slyon/+git/files/tree/LP1949104/focal_s390x.log [Where problems could occur] This upload contains changes to the CLI of netplan, if anything goes wrong it could impact the interactive usage of 'netplan try'/'netplan apply' by the user. [Other Info] The full set of autopkgtest logs will be attached after the upload is accepted into -proposed and the tests have been run on the official autopkgtest.u.c infrastructure. === Original Description === I hava a freshly installed Ubuntu Server 20.04 LTS. I am using a static IP config (100% sure it is correct, also the YAML is correct) If you then enter "netplan try" I get this: -------------------------------------------------------------------------------- Warning: Stopping systemd-networkd.service, but it can still be activated by: systemd-networkd.socket An error occurred: 'NetplanApply' object has no attribute 'state' Reverting. Warning: Stopping systemd-networkd.service, but it can still be activated by: systemd-networkd.socket -------------------------------------------------------------------------------- "netplan generate && netplan apply" does work. I found some other people having these issues too on freshly installed 20.04 and 21.10 and online forums. System Infos: lsb_release -rd: Description: Ubuntu 20.04.3 LTS Release: 20.04 apt-cache policy netplan.io: netplan.io: Installed: 0.103-0ubuntu5~20.04.2 Candidate: 0.103-0ubuntu5~20.04.2 Version table: *** 0.103-0ubuntu5~20.04.2 500 500 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages 100 /var/lib/dpkg/status 0.99-0ubuntu1 500 500 http://de.archive.ubuntu.com/ubuntu focal/main amd64 Packages systemd --version: systemd 245 (245.4-4ubuntu3.13) +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid Thank you!
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1949104 Title: netplan try is broken To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1949104/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs