** Description changed:
+ [ Impact ]
+
+ * Context: Running a dist-upgrade from Jammy to Noble.
+ * Starting with Noble (Mantic actually), NetworkManager integrates with
Netplan as a backend and calls 'netplan generate' at different stages, e.g.
when migrating old /etc/NetworkManager/sytem-connections/ profiles to
/etc/netplan/ on package upgrade.
+ * NetworkManager depends on Netplan >= 0.106 only, but there was a major
SOVER/ABI bump of libnetplan, starting with Netplan v1.0. The new
build-dependency on libnetplan1 >= 1.0 is automatically picked up, but the
runtime dependency on the Netplan CLI (netplan.io binary) is not.
+ * Therefore, we can end up in a situation where the old netplan.io Python
CLI is still installed during dist-upgrade and tries to call into the new
libnetplan1, which is incompatible.
+ * Furthermore, python3-netplan ships a python3.10 specific
_netplan_cffi.cpython-310-x86_64-linux-gnu.so binary module, while
python3-netplan on Noble++ ships a universal _netplan_cffi.abi3.so binary
module. The old one can lead to issues when python3 is already upgraded.
+ * Incompatible versions of Netplan CLI, Netplan Python bindings and
libnetplan can lead to crashes of the Netplan CLI, like this: AttributeError:
/lib/x86_64-linux-gnu/libnetplan.so.1: undefined symbol:
netplan_get_id_from_nm_filename
+
+ * Such crash doesn't always happen, as it depends on the ordering of
+ package upgrades during dist-upgrade. It will recover itself after the
+ dist-upgrade is complete and all components are at their expected
+ versions again. So side-effects are rather small, but it can lead to
+ blocking of phased-updates for Netplan, which we'd like to avoid (LP:
+ #2058031).
+
+ * We want to make sure NetworkManager pulls in the latest libnetplan1,
+ netplan.io and python3-netplan packages on dist-upgrade, to avoid such
+ issues. Therefore declaring corresponding dependencies on the network-
+ manager binary package in debian/control. Such changes are not needed on
+ series after Noble, as recent Netplan is much more resilient against
+ such issues, using a python stable API binary module
+ (_netplan_cffi.abi3.so), using dh-python & ${python3:Depends} substvars,
+ and providing a stable libnetplan1 library.
+
+ [ Test Plan ]
+
+ $ lxc launch ubuntu-daily:jammy jj-nm-np
+ $ lxc shell jj-nm-np
+
+ # Verify old version of Netplan (< 1.0)
+ root@jj-nm-np:~# dpkg -l | grep netplan
+ ii libnetplan0:amd64 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction runtime library
+ ii netplan.io 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction for various backends
+
+ root@jj-nm-np:~# sed -i 's/jammy/noble/g' /etc/apt/sources.list
+ root@jj-nm-np:~# apt update
+ root@jj-nm-np:~# apt install network-manager
+
+ => Make sure libnetplan1 >= 1.0, netplan.io >= 1.0 and python3-netplan
+ >= 1.0 are installed and the Netplan CLI does not crash, e.g.:
+
+ root@jj-nm-np:~# dpkg -l | grep netplan
+ ii libnetplan0:amd64 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction runtime library
+ ii libnetplan1:amd64 1.0.1-1ubuntu2~24.04.1
amd64 Declarative network configuration runtime library
+ ii netplan-generator 1.0.1-1ubuntu2~24.04.1
amd64 Declarative network configuration systemd-generator
+ ii netplan.io 1.0.1-1ubuntu2~24.04.1
amd64 Declarative network configuration for various backends
+ ii python3-netplan 1.0.1-1ubuntu2~24.04.1
amd64 Declarative network configuration Python bindings
+ root@jj-nm-np:~# netplan generate
+
+ On a broken system, it looks like this:
+ root@jj-nm-np:~# dpkg -l | grep netplan.io
+ ii netplan.io 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction for various backends
+ root@jj-nm-np:~# dpkg -l | grep netplan
+ ii libnetplan0:amd64 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction runtime library
+ ii libnetplan1:amd64 1.0.1-1ubuntu2~24.04.1
amd64 Declarative network configuration runtime library
+ ii netplan.io 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction for various backends
+ root@jj-nm-np:~# netplan generate
+ Traceback (most recent call last):
+ File "/usr/sbin/netplan", line 20, in <module>
+ from netplan import Netplan
+ File "/usr/share/netplan/netplan/__init__.py", line 18, in <module>
+ from netplan.cli.core import Netplan
+ File "/usr/share/netplan/netplan/cli/core.py", line 24, in <module>
+ import netplan.cli.utils as utils
+ File "/usr/share/netplan/netplan/cli/utils.py", line 27, in <module>
+ import netplan.libnetplan as np
+ File "/usr/share/netplan/netplan/libnetplan.py", line 54, in <module>
+ lib.netplan_get_id_from_nm_filename.restype = ctypes.c_char_p
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/usr/lib/python3.12/ctypes/__init__.py", line 392, in __getattr__
+ func = self.__getitem__(name)
+ ^^^^^^^^^^^^^^^^^^^^^^
+ File "/usr/lib/python3.12/ctypes/__init__.py", line 397, in __getitem__
+ func = self._FuncPtr((name_or_ordinal, self))
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ AttributeError: /lib/x86_64-linux-gnu/libnetplan.so.1: undefined symbol:
netplan_get_id_from_nm_filename
+
+ [ Test Plan 2 ]
+
+ * In addition to the specific test plan above, we want to run a full
+ dist-upgrade of an Ubuntu Jammy Desktop VM to a Ubuntu Noble system
+ (noble-proposed, to test the actual SRU candidate package). Making sure
+ the upgrade still passes.
+
+ [ Where problems could occur ]
+
+ * We're modifying the runtime dependencies of NetworkManager, making it
+ more strict wrt. the Netplan system packages. This will lead to
+ different dependency resolving during apt dist-upgrade and could lead to
+ unresolvable dependency loops. We introduced "Test Plan 2" above to
+ check for that.
+
+ [ Other Info ]
+
+ * The dependency on python3-netplan >= 1.0 isn't there in Oracular+
+ (only netplan.io >= 1.0). It's not needed, because the effects will only
+ surface on dist-upgrade from libnetplan0 to libnetplan1 and libnetplan0
+ doesn't exist anymore as of Noble (Netplan 1.0).
+
+
+ === Original bug report ===
+
ubuntu desktop (mantic) live test on dell optiplex 780
- dell [optiplex] 780 (c2q-q9400, 8gb, amd/ati cedar radeon hd
5000/6000/7350/8350)
exploring the /var/crash/ directory I noticed this report; nothing had
appeared on screen, so just filed it with `ubuntu-bug`.
ProblemType: Crash
DistroRelease: Ubuntu 23.10
Package: netplan.io 0.106.1-8
Uname: Linux 6.3.0-7-generic x86_64
Architecture: amd64
Date: Mon Aug 28 08:12:32 2023
ExecutablePath: /usr/share/netplan/netplan.script
ExecutableTimestamp: 1684343476
InterpreterPath: /usr/bin/python3.11
ProcCmdline: /usr/bin/python3 /usr/sbin/netplan generate
ProcCwd: /
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
PythonArgs: ['/usr/sbin/netplan', 'generate']
SourcePackage: netplan.io
UserGroups: N/A
** Description changed:
[ Impact ]
- * Context: Running a dist-upgrade from Jammy to Noble.
- * Starting with Noble (Mantic actually), NetworkManager integrates with
Netplan as a backend and calls 'netplan generate' at different stages, e.g.
when migrating old /etc/NetworkManager/sytem-connections/ profiles to
/etc/netplan/ on package upgrade.
- * NetworkManager depends on Netplan >= 0.106 only, but there was a major
SOVER/ABI bump of libnetplan, starting with Netplan v1.0. The new
build-dependency on libnetplan1 >= 1.0 is automatically picked up, but the
runtime dependency on the Netplan CLI (netplan.io binary) is not.
- * Therefore, we can end up in a situation where the old netplan.io Python
CLI is still installed during dist-upgrade and tries to call into the new
libnetplan1, which is incompatible.
- * Furthermore, python3-netplan ships a python3.10 specific
_netplan_cffi.cpython-310-x86_64-linux-gnu.so binary module, while
python3-netplan on Noble++ ships a universal _netplan_cffi.abi3.so binary
module. The old one can lead to issues when python3 is already upgraded.
- * Incompatible versions of Netplan CLI, Netplan Python bindings and
libnetplan can lead to crashes of the Netplan CLI, like this: AttributeError:
/lib/x86_64-linux-gnu/libnetplan.so.1: undefined symbol:
netplan_get_id_from_nm_filename
+ * Context: Running a dist-upgrade from Jammy to Noble.
+ * Starting with Noble (Mantic actually), NetworkManager integrates with
Netplan as a backend and calls 'netplan generate' at different stages, e.g.
when migrating old /etc/NetworkManager/sytem-connections/ profiles to
/etc/netplan/ on package upgrade.
+ * NetworkManager depends on Netplan >= 0.106 only, but there was a major
SOVER/ABI bump of libnetplan, starting with Netplan v1.0. The new
build-dependency on libnetplan1 >= 1.0 is automatically picked up, but the
runtime dependency on the Netplan CLI (netplan.io binary) is not.
+ * Therefore, we can end up in a situation where the old netplan.io Python
CLI is still installed during dist-upgrade and tries to call into the new
libnetplan1, which is incompatible.
+ * Furthermore, python3-netplan ships a python3.10 specific
_netplan_cffi.cpython-310-x86_64-linux-gnu.so binary module, while
python3-netplan on Noble++ ships a universal _netplan_cffi.abi3.so binary
module. The old one can lead to issues when python3 is already upgraded.
+ * Incompatible versions of Netplan CLI, Netplan Python bindings and
libnetplan can lead to crashes of the Netplan CLI, like this: AttributeError:
/lib/x86_64-linux-gnu/libnetplan.so.1: undefined symbol:
netplan_get_id_from_nm_filename
- * Such crash doesn't always happen, as it depends on the ordering of
+ * Such crash doesn't always happen, as it depends on the ordering of
package upgrades during dist-upgrade. It will recover itself after the
dist-upgrade is complete and all components are at their expected
versions again. So side-effects are rather small, but it can lead to
blocking of phased-updates for Netplan, which we'd like to avoid (LP:
#2058031).
- * We want to make sure NetworkManager pulls in the latest libnetplan1,
+ * We want to make sure NetworkManager pulls in the latest libnetplan1,
netplan.io and python3-netplan packages on dist-upgrade, to avoid such
issues. Therefore declaring corresponding dependencies on the network-
manager binary package in debian/control. Such changes are not needed on
series after Noble, as recent Netplan is much more resilient against
such issues, using a python stable API binary module
(_netplan_cffi.abi3.so), using dh-python & ${python3:Depends} substvars,
and providing a stable libnetplan1 library.
[ Test Plan ]
$ lxc launch ubuntu-daily:jammy jj-nm-np
$ lxc shell jj-nm-np
# Verify old version of Netplan (< 1.0)
root@jj-nm-np:~# dpkg -l | grep netplan
ii libnetplan0:amd64 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction runtime library
ii netplan.io 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction for various backends
root@jj-nm-np:~# sed -i 's/jammy/noble/g' /etc/apt/sources.list
root@jj-nm-np:~# apt update
root@jj-nm-np:~# apt install network-manager
=> Make sure libnetplan1 >= 1.0, netplan.io >= 1.0 and python3-netplan
>= 1.0 are installed and the Netplan CLI does not crash, e.g.:
root@jj-nm-np:~# dpkg -l | grep netplan
ii libnetplan0:amd64 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction runtime library
ii libnetplan1:amd64 1.0.1-1ubuntu2~24.04.1
amd64 Declarative network configuration runtime library
ii netplan-generator 1.0.1-1ubuntu2~24.04.1
amd64 Declarative network configuration systemd-generator
ii netplan.io 1.0.1-1ubuntu2~24.04.1
amd64 Declarative network configuration for various backends
ii python3-netplan 1.0.1-1ubuntu2~24.04.1
amd64 Declarative network configuration Python bindings
root@jj-nm-np:~# netplan generate
+ root@jj-nm-np:~# echo $?
+ 0
On a broken system, it looks like this:
root@jj-nm-np:~# dpkg -l | grep netplan.io
ii netplan.io 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction for various backends
root@jj-nm-np:~# dpkg -l | grep netplan
ii libnetplan0:amd64 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction runtime library
ii libnetplan1:amd64 1.0.1-1ubuntu2~24.04.1
amd64 Declarative network configuration runtime library
ii netplan.io 0.106.1-7ubuntu0.22.04.4
amd64 YAML network configuration abstraction for various backends
root@jj-nm-np:~# netplan generate
Traceback (most recent call last):
- File "/usr/sbin/netplan", line 20, in <module>
- from netplan import Netplan
- File "/usr/share/netplan/netplan/__init__.py", line 18, in <module>
- from netplan.cli.core import Netplan
- File "/usr/share/netplan/netplan/cli/core.py", line 24, in <module>
- import netplan.cli.utils as utils
- File "/usr/share/netplan/netplan/cli/utils.py", line 27, in <module>
- import netplan.libnetplan as np
- File "/usr/share/netplan/netplan/libnetplan.py", line 54, in <module>
- lib.netplan_get_id_from_nm_filename.restype = ctypes.c_char_p
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- File "/usr/lib/python3.12/ctypes/__init__.py", line 392, in __getattr__
- func = self.__getitem__(name)
- ^^^^^^^^^^^^^^^^^^^^^^
- File "/usr/lib/python3.12/ctypes/__init__.py", line 397, in __getitem__
- func = self._FuncPtr((name_or_ordinal, self))
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/usr/sbin/netplan", line 20, in <module>
+ from netplan import Netplan
+ File "/usr/share/netplan/netplan/__init__.py", line 18, in <module>
+ from netplan.cli.core import Netplan
+ File "/usr/share/netplan/netplan/cli/core.py", line 24, in <module>
+ import netplan.cli.utils as utils
+ File "/usr/share/netplan/netplan/cli/utils.py", line 27, in <module>
+ import netplan.libnetplan as np
+ File "/usr/share/netplan/netplan/libnetplan.py", line 54, in <module>
+ lib.netplan_get_id_from_nm_filename.restype = ctypes.c_char_p
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/usr/lib/python3.12/ctypes/__init__.py", line 392, in __getattr__
+ func = self.__getitem__(name)
+ ^^^^^^^^^^^^^^^^^^^^^^
+ File "/usr/lib/python3.12/ctypes/__init__.py", line 397, in __getitem__
+ func = self._FuncPtr((name_or_ordinal, self))
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: /lib/x86_64-linux-gnu/libnetplan.so.1: undefined symbol:
netplan_get_id_from_nm_filename
[ Test Plan 2 ]
- * In addition to the specific test plan above, we want to run a full
+ * In addition to the specific test plan above, we want to run a full
dist-upgrade of an Ubuntu Jammy Desktop VM to a Ubuntu Noble system
(noble-proposed, to test the actual SRU candidate package). Making sure
the upgrade still passes.
[ Where problems could occur ]
- * We're modifying the runtime dependencies of NetworkManager, making it
+ * We're modifying the runtime dependencies of NetworkManager, making it
more strict wrt. the Netplan system packages. This will lead to
different dependency resolving during apt dist-upgrade and could lead to
unresolvable dependency loops. We introduced "Test Plan 2" above to
check for that.
[ Other Info ]
- * The dependency on python3-netplan >= 1.0 isn't there in Oracular+
+ * The dependency on python3-netplan >= 1.0 isn't there in Oracular+
(only netplan.io >= 1.0). It's not needed, because the effects will only
surface on dist-upgrade from libnetplan0 to libnetplan1 and libnetplan0
doesn't exist anymore as of Noble (Netplan 1.0).
-
=== Original bug report ===
ubuntu desktop (mantic) live test on dell optiplex 780
- dell [optiplex] 780 (c2q-q9400, 8gb, amd/ati cedar radeon hd
5000/6000/7350/8350)
exploring the /var/crash/ directory I noticed this report; nothing had
appeared on screen, so just filed it with `ubuntu-bug`.
ProblemType: Crash
DistroRelease: Ubuntu 23.10
Package: netplan.io 0.106.1-8
Uname: Linux 6.3.0-7-generic x86_64
Architecture: amd64
Date: Mon Aug 28 08:12:32 2023
ExecutablePath: /usr/share/netplan/netplan.script
ExecutableTimestamp: 1684343476
InterpreterPath: /usr/bin/python3.11
ProcCmdline: /usr/bin/python3 /usr/sbin/netplan generate
ProcCwd: /
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
PythonArgs: ['/usr/sbin/netplan', 'generate']
SourcePackage: netplan.io
UserGroups: N/A
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2033259
Title:
[SRU] NetworkManager triggers a call from (old) Netplan Python CLI
into (old) libnetplan0 that got replaced by (new) libnetplan1 on dist-
upgrade
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2033259/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs