[Bug 1949104] Re: netplan try is broken
Launchpad Bug Tracker
1949104 at bugs.launchpad.net
Wed Nov 24 17:20:33 UTC 2021
This bug was fixed in the package netplan.io - 0.103-0ubuntu9
---------------
netplan.io (0.103-0ubuntu9) jammy; urgency=medium
[ Lukas Märdian ]
* Add an upstream patch for glib 2.70 compatibility
* Add d/p/0010-parse-nm-Handle-missing-gateway-in-keyfile-routes-ke.patch
(LP: #1949761)
* Fix regression in 'netplan try' (LP: #1949104)
+ d/p/lp1949104/cli-apply-initialize-self.state-LP-1949104-243.patch
+ d/p/lp1949104/tests-regressions-make-netplan_try-autopkgtest-more-.patch
[ Andrej Shadura ]
* Explicitly depend on glib 2.70
-- Lukas Märdian <slyon at ubuntu.com> Fri, 05 Nov 2021 09:14:58 +0100
** Changed in: netplan.io (Ubuntu Jammy)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/1949104
Title:
netplan try is broken
Status in netplan.io package in Ubuntu:
Fix Released
Status in netplan.io source package in Focal:
Fix Released
Status in netplan.io source package in Hirsute:
Fix Released
Status in netplan.io source package in Impish:
Fix Released
Status in netplan.io source package in Jammy:
Fix Released
Bug description:
[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:
* 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!
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1949104/+subscriptions
More information about the foundations-bugs
mailing list