I've tested network-manager 1.46.0-1ubuntu2.2 from noble-proposed and
can confirm the Jammy -> Noble upgrade is working as intended.

I re-triggered a bunch of the tmpfail (/unknown) autopkgtest from above.

$ lxc launch ubuntu-daily:jammy jj-nm-np
Creating jj-nm-np
Starting jj-nm-np                             
$ lxc shell jj-nm-np
root@jj-nm-np:~# dpkg -l | grep netplan
ii  libnetplan0:amd64               0.107.1-3ubuntu0.22.04.1                
amd64        YAML network configuration abstraction runtime library
ii  netplan-generator               0.107.1-3ubuntu0.22.04.1                
amd64        YAML network configuration abstraction systemd-generator
ii  netplan.io                      0.107.1-3ubuntu0.22.04.1                
amd64        YAML network configuration abstraction for various backends
ii  python3-netplan                 0.107.1-3ubuntu0.22.04.1                
amd64        YAML network configuration abstraction Python bindings
root@jj-nm-np:~# sed -i 's/jammy/noble/g' /etc/apt/sources.list
# ALSO: enabled noble-proposed
root@jj-nm-np:~# apt update
[...]
root@jj-nm-np:~# apt install -t noble-proposed network-manager
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-packagekitglib-1.0 libappstream4 libdw1 libgstreamer1.0-0 
libpackagekit-glib2-18 libstemmer0d
  python3-software-properties python3.10 python3.10-minimal
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  apt apt-utils dns-root-data dnsmasq-base gcc-14-base ibverbs-providers 
libapt-pkg6.0t64 libbluetooth3 libc-bin
  libc6 libcurl3t64-gnutls libdb5.3t64 libexpat1 libgcrypt20 libgdbm6t64 
libglib2.0-0t64 libgmp10 libgnutls30t64
  libhogweed6t64 libibverbs1 libjansson4 libldap2 libmbim-glib4 libmbim-proxy 
libmbim-utils libmm-glib0 libndp0
  libnetplan1 libnettle8t64 libnewt0.52 libnghttp2-14 libnl-3-200 
libnl-genl-3-200 libnl-route-3-200 libnm0
  libp11-kit0 libpcap0.8t64 libpcsclite1 libpsl5t64 libpython3-stdlib 
libpython3.12-minimal libpython3.12-stdlib
  libqmi-glib5 libqmi-proxy libqmi-utils libqrtr-glib0 libreadline8t64 
libsasl2-2 libsasl2-modules
  libsasl2-modules-db libssl3t64 libstdc++6 libteamdctl0 libunistring5 libzstd1 
locales modemmanager netplan.io
  network-manager-pptp ppp pptp-linux python3 python3-apt python3-cffi-backend 
python3-dbus python3-gdbm python3-gi
  python3-lib2to3 python3-markdown-it python3-markupsafe python3-mdurl 
python3-minimal python3-netifaces
  python3-netplan python3-newt python3-pkg-resources python3-pygments 
python3-pyrsistent python3-rich
  python3-setuptools python3-systemd python3-yaml python3-zope.interface 
python3.12 python3.12-minimal wireless-regdb
  wpasupplicant
Suggested packages:
  apt-doc aptitude | synaptic | wajig dpkg-dev glibc-doc libnss-nis 
libnss-nisplus rng-tools gdbm-l10n
  low-memory-monitor gnutls-bin pcscd libsasl2-modules-gssapi-mit | 
libsasl2-modules-gssapi-heimdal
  libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql avahi-autoipd 
libteam-utils python3-doc python3-tk
  python3-venv python-apt-doc python-dbus-doc python3-gdbm-dbg 
python-pygments-doc ttf-bitstream-vera
  python-setuptools-doc python3.12-venv python3.12-doc binfmt-support wpagui 
libengine-pkcs11-openssl
The following packages will be REMOVED:
  libapt-pkg6.0 libcurl3-gnutls libdb5.3 libgdbm6 libglib2.0-0 libglib2.0-bin 
libgnutls30 libhogweed6 libnettle8
  libpcap0.8 libpsl5 libreadline8 libssl3 packagekit packagekit-tools 
python3-distutils software-properties-common
  ubuntu-server
The following NEW packages will be installed:
  dns-root-data dnsmasq-base gcc-14-base ibverbs-providers libapt-pkg6.0t64 
libbluetooth3 libcurl3t64-gnutls
  libdb5.3t64 libgdbm6t64 libglib2.0-0t64 libgnutls30t64 libhogweed6t64 
libibverbs1 libldap2 libmbim-utils libndp0
  libnetplan1 libnettle8t64 libnl-route-3-200 libnm0 libpcap0.8t64 libpcsclite1 
libpsl5t64 libpython3.12-minimal
  libpython3.12-stdlib libqmi-utils libqrtr-glib0 libreadline8t64 libssl3t64 
libteamdctl0 libunistring5 modemmanager
  network-manager network-manager-pptp ppp pptp-linux python3-markdown-it 
python3-mdurl python3-pygments python3-rich
  python3.12 python3.12-minimal wireless-regdb wpasupplicant
The following packages will be upgraded:
  apt apt-utils libc-bin libc6 libexpat1 libgcrypt20 libgmp10 libjansson4 
libmbim-glib4 libmbim-proxy libmm-glib0
  libnewt0.52 libnghttp2-14 libnl-3-200 libnl-genl-3-200 libp11-kit0 
libpython3-stdlib libqmi-glib5 libqmi-proxy
  libsasl2-2 libsasl2-modules libsasl2-modules-db libstdc++6 libzstd1 locales 
netplan.io python3 python3-apt
  python3-cffi-backend python3-dbus python3-gdbm python3-gi python3-lib2to3 
python3-markupsafe python3-minimal
  python3-netifaces python3-netplan python3-newt python3-pkg-resources 
python3-pyrsistent python3-setuptools
  python3-systemd python3-yaml python3-zope.interface
44 upgraded, 44 newly installed, 18 to remove and 449 not upgraded.
Need to get 38.0 MB of archives.
After this operation, 54.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
[...]

root@jj-nm-np:~# dpkg -l | grep network-manager
ii  network-manager                 1.46.0-1ubuntu2.2                       
amd64

root@jj-nm-np:~# dpkg -l | grep netplan
ii  libnetplan0:amd64               0.107.1-3ubuntu0.22.04.1                
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               0.107.1-3ubuntu0.22.04.1                
amd64        YAML network configuration abstraction 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

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to network-manager in 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

Status in netplan.io package in Ubuntu:
  Won't Fix
Status in network-manager package in Ubuntu:
  Fix Released
Status in netplan.io source package in Jammy:
  New
Status in network-manager source package in Jammy:
  Invalid
Status in netplan.io source package in Noble:
  Won't Fix
Status in network-manager source package in Noble:
  Fix Committed
Status in netplan.io source package in Oracular:
  Won't Fix
Status in network-manager source package in Oracular:
  Fix Released

Bug description:
  [ 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
  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))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2033259/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to