[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
I too got affected by this regression. On servers with network-manager, without netplan (01-network-manager-all.yaml), systemd-networkd-wait-online.service started failing after the latest updates and leaves systemd in a degraded state. Example: root@gldap:/var/log/apt# ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens18: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 52:54:00:10:20:64 brd ff:ff:ff:ff:ff:ff altname enp0s18 inet 10.16.32.100/21 brd 10.16.39.255 scope global noprefixroute ens18 valid_lft forever preferred_lft forever inet6 fe80::843e:3702:1c3b:2854/64 scope link noprefixroute valid_lft forever preferred_lft forever root@gldap:~# networkctl IDX LINK TYPE OPERATIONAL SETUP 1 loloopback carrier unmanaged 2 ens18 etherroutableunmanaged 2 links listed. root@gldap:~# /lib/systemd/systemd-networkd-wait-online --any --timeout=5 Timeout occurred while waiting for network connectivity. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Jammy: Fix Released Status in systemd source package in Lunar: Fix Released Bug description: [Impact] systemd-networkd-wait-online will exit prematurely when the --any flag is passed, due to an incorrect patch in Ubuntu that is supposed to make systemd-networkd-wait-online exit when *no* links are managed. [Test Plan] This test uses a VM managed by libvirt. In this scenario we have the "default" network which provides DHCP to the VM, and the "no-dhcp" network which does not provide DHCP. To setup the VM (this assumes Jammy, but the same steps apply for Lunar using appropriate names and install media): 1. Define the default and no-dhcp networks: $ cat > /tmp/net-default.xml << EOF default 04260896-2701-422d-84e0-8e0df1122db3 $ virsh net-create --file /tmp/net-default.xml $ cat > /tmp/net-default.xml << EOF no-dhcp 2c047740-caab-4c90-8421-70da6732a759 $ virsh net-create --file /tmp/net-no-dhcp.xml $ virsh net-start --network default $ virst net-start --network no-dhcp 2. Create the VM using virt-install: virt-install \ --connect=qemu:///system \ --name=jammy \ --arch=x86_64 \ --cpu=host-passthrough \ --ram=4096 \ --vcpus=1 \ --disk=path=/var/lib/libvirt/images/jammy.qcow2,size=24,format=qcow2,sparse=true,bus=virtio \ --virt-type=kvm \ --accelerate \ --hvm \ --cdrom=/tmp/ubuntu-22.04.2-live-server-amd64.iso \ --os-type=linux \ --os-variant=generic \ --graphics=spice \ --input=tablet \ --network=network=default,model=virtio \ --video=qxl \ --noreboot 3. Complete the installation steps. Reboot the VM. Run the test: 1. Detach the network interface so that the test starts with no interfaces attached: $ virsh detach-interface $VM network 2. In the VM, write a network config for all en* links to use DHCP: $ cat > /etc/systemd/network/10-dhcp.network << EOF [Match] Name=en* [Network] DHCP=yes EOF 3. Restart systemd-networkd: $ systemctl restart systemd-networkd 4. On the host, attach an interface to the VM on the no-dhcp network, so that an IP is not assigned: $ virsh attach-interface $VM network no-dhcp 5. Back in the VM, confirm that the device is in the degraded/configuring state: $ networkctl networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 2 links listed. 6. Run systemd-networkd-wait-online --any, and confirm that it does timeout instead of returning while the device is is still not configured: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=10 Timeout occurred while waiting for network connectivity. 7. Confirm that the device is STILL in the degraded/configuring state: $ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 2 links listed. 8. Now, leave systemd-network-wait-online --any running while we attach another interface: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=0 9. On the host, attach another interface to the VM on the default network, so that DHCP assigns the interface an IP: $ virsh attach-interface $VM network default 10. Back in the VM, the systemd-networkd-wait-online
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
> Both ethernet and wi-fi are configured through netplan, and work as expected. Can you clarify which backend you're using in netplan? Are these configured to use systemd-networkd, or NetworkManager? -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Jammy: Fix Released Status in systemd source package in Lunar: Fix Released Bug description: [Impact] systemd-networkd-wait-online will exit prematurely when the --any flag is passed, due to an incorrect patch in Ubuntu that is supposed to make systemd-networkd-wait-online exit when *no* links are managed. [Test Plan] This test uses a VM managed by libvirt. In this scenario we have the "default" network which provides DHCP to the VM, and the "no-dhcp" network which does not provide DHCP. To setup the VM (this assumes Jammy, but the same steps apply for Lunar using appropriate names and install media): 1. Define the default and no-dhcp networks: $ cat > /tmp/net-default.xml << EOF default 04260896-2701-422d-84e0-8e0df1122db3 $ virsh net-create --file /tmp/net-default.xml $ cat > /tmp/net-default.xml << EOF no-dhcp 2c047740-caab-4c90-8421-70da6732a759 $ virsh net-create --file /tmp/net-no-dhcp.xml $ virsh net-start --network default $ virst net-start --network no-dhcp 2. Create the VM using virt-install: virt-install \ --connect=qemu:///system \ --name=jammy \ --arch=x86_64 \ --cpu=host-passthrough \ --ram=4096 \ --vcpus=1 \ --disk=path=/var/lib/libvirt/images/jammy.qcow2,size=24,format=qcow2,sparse=true,bus=virtio \ --virt-type=kvm \ --accelerate \ --hvm \ --cdrom=/tmp/ubuntu-22.04.2-live-server-amd64.iso \ --os-type=linux \ --os-variant=generic \ --graphics=spice \ --input=tablet \ --network=network=default,model=virtio \ --video=qxl \ --noreboot 3. Complete the installation steps. Reboot the VM. Run the test: 1. Detach the network interface so that the test starts with no interfaces attached: $ virsh detach-interface $VM network 2. In the VM, write a network config for all en* links to use DHCP: $ cat > /etc/systemd/network/10-dhcp.network << EOF [Match] Name=en* [Network] DHCP=yes EOF 3. Restart systemd-networkd: $ systemctl restart systemd-networkd 4. On the host, attach an interface to the VM on the no-dhcp network, so that an IP is not assigned: $ virsh attach-interface $VM network no-dhcp 5. Back in the VM, confirm that the device is in the degraded/configuring state: $ networkctl networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 2 links listed. 6. Run systemd-networkd-wait-online --any, and confirm that it does timeout instead of returning while the device is is still not configured: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=10 Timeout occurred while waiting for network connectivity. 7. Confirm that the device is STILL in the degraded/configuring state: $ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 2 links listed. 8. Now, leave systemd-network-wait-online --any running while we attach another interface: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=0 9. On the host, attach another interface to the VM on the default network, so that DHCP assigns the interface an IP: $ virsh attach-interface $VM network default 10. Back in the VM, the systemd-networkd-wait-online process should have exited with success, and networkctl should show the new link as configured, while the old one is still configuring: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=0 $ echo $? 0 $ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 9 ens9 etherroutableconfigured 3 links listed. [Where problems could occur] This patch we want to remove is totally confined to systemd-networkd- wait-online, so that's where we would see problems. From what I can tell, the patch is no longer doing what it was intended to do. E.g. running systemd-networkd-wait-online on a desktop install, where systemd-networkd does not manage links, results in a timeout. It only works with the --any flag, but the --any flag did not exist when the patch was written. If a user was relying on --any to make systemd- networkd-wait-online exit when no links are managed, they will see a change in behavior as a
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
> Somehow, wait-online now times out, while it didn't before this update. I just created https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2036358 to track this. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Jammy: Fix Released Status in systemd source package in Lunar: Fix Released Bug description: [Impact] systemd-networkd-wait-online will exit prematurely when the --any flag is passed, due to an incorrect patch in Ubuntu that is supposed to make systemd-networkd-wait-online exit when *no* links are managed. [Test Plan] This test uses a VM managed by libvirt. In this scenario we have the "default" network which provides DHCP to the VM, and the "no-dhcp" network which does not provide DHCP. To setup the VM (this assumes Jammy, but the same steps apply for Lunar using appropriate names and install media): 1. Define the default and no-dhcp networks: $ cat > /tmp/net-default.xml << EOF default 04260896-2701-422d-84e0-8e0df1122db3 $ virsh net-create --file /tmp/net-default.xml $ cat > /tmp/net-default.xml << EOF no-dhcp 2c047740-caab-4c90-8421-70da6732a759 $ virsh net-create --file /tmp/net-no-dhcp.xml $ virsh net-start --network default $ virst net-start --network no-dhcp 2. Create the VM using virt-install: virt-install \ --connect=qemu:///system \ --name=jammy \ --arch=x86_64 \ --cpu=host-passthrough \ --ram=4096 \ --vcpus=1 \ --disk=path=/var/lib/libvirt/images/jammy.qcow2,size=24,format=qcow2,sparse=true,bus=virtio \ --virt-type=kvm \ --accelerate \ --hvm \ --cdrom=/tmp/ubuntu-22.04.2-live-server-amd64.iso \ --os-type=linux \ --os-variant=generic \ --graphics=spice \ --input=tablet \ --network=network=default,model=virtio \ --video=qxl \ --noreboot 3. Complete the installation steps. Reboot the VM. Run the test: 1. Detach the network interface so that the test starts with no interfaces attached: $ virsh detach-interface $VM network 2. In the VM, write a network config for all en* links to use DHCP: $ cat > /etc/systemd/network/10-dhcp.network << EOF [Match] Name=en* [Network] DHCP=yes EOF 3. Restart systemd-networkd: $ systemctl restart systemd-networkd 4. On the host, attach an interface to the VM on the no-dhcp network, so that an IP is not assigned: $ virsh attach-interface $VM network no-dhcp 5. Back in the VM, confirm that the device is in the degraded/configuring state: $ networkctl networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 2 links listed. 6. Run systemd-networkd-wait-online --any, and confirm that it does timeout instead of returning while the device is is still not configured: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=10 Timeout occurred while waiting for network connectivity. 7. Confirm that the device is STILL in the degraded/configuring state: $ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 2 links listed. 8. Now, leave systemd-network-wait-online --any running while we attach another interface: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=0 9. On the host, attach another interface to the VM on the default network, so that DHCP assigns the interface an IP: $ virsh attach-interface $VM network default 10. Back in the VM, the systemd-networkd-wait-online process should have exited with success, and networkctl should show the new link as configured, while the old one is still configuring: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=0 $ echo $? 0 $ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 9 ens9 etherroutableconfigured 3 links listed. [Where problems could occur] This patch we want to remove is totally confined to systemd-networkd- wait-online, so that's where we would see problems. From what I can tell, the patch is no longer doing what it was intended to do. E.g. running systemd-networkd-wait-online on a desktop install, where systemd-networkd does not manage links, results in a timeout. It only works with the --any flag, but the --any flag did not exist when the patch was written. If a user was relying on --any to make systemd- networkd-wait-online exit when no links are managed, they will see a change in behavior as a result of this change. However,
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
Somehow, wait-online now times out, while it didn't before this update. OS: Ubuntu 23.04 aarch64 Host: Raspberry Pi 4 Model B Rev 1.2 Kernel: 6.2.0-1012-raspi Both ethernet and wi-fi are configured through netplan, and work as expected. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Jammy: Fix Released Status in systemd source package in Lunar: Fix Released Bug description: [Impact] systemd-networkd-wait-online will exit prematurely when the --any flag is passed, due to an incorrect patch in Ubuntu that is supposed to make systemd-networkd-wait-online exit when *no* links are managed. [Test Plan] This test uses a VM managed by libvirt. In this scenario we have the "default" network which provides DHCP to the VM, and the "no-dhcp" network which does not provide DHCP. To setup the VM (this assumes Jammy, but the same steps apply for Lunar using appropriate names and install media): 1. Define the default and no-dhcp networks: $ cat > /tmp/net-default.xml << EOF default 04260896-2701-422d-84e0-8e0df1122db3 $ virsh net-create --file /tmp/net-default.xml $ cat > /tmp/net-default.xml << EOF no-dhcp 2c047740-caab-4c90-8421-70da6732a759 $ virsh net-create --file /tmp/net-no-dhcp.xml $ virsh net-start --network default $ virst net-start --network no-dhcp 2. Create the VM using virt-install: virt-install \ --connect=qemu:///system \ --name=jammy \ --arch=x86_64 \ --cpu=host-passthrough \ --ram=4096 \ --vcpus=1 \ --disk=path=/var/lib/libvirt/images/jammy.qcow2,size=24,format=qcow2,sparse=true,bus=virtio \ --virt-type=kvm \ --accelerate \ --hvm \ --cdrom=/tmp/ubuntu-22.04.2-live-server-amd64.iso \ --os-type=linux \ --os-variant=generic \ --graphics=spice \ --input=tablet \ --network=network=default,model=virtio \ --video=qxl \ --noreboot 3. Complete the installation steps. Reboot the VM. Run the test: 1. Detach the network interface so that the test starts with no interfaces attached: $ virsh detach-interface $VM network 2. In the VM, write a network config for all en* links to use DHCP: $ cat > /etc/systemd/network/10-dhcp.network << EOF [Match] Name=en* [Network] DHCP=yes EOF 3. Restart systemd-networkd: $ systemctl restart systemd-networkd 4. On the host, attach an interface to the VM on the no-dhcp network, so that an IP is not assigned: $ virsh attach-interface $VM network no-dhcp 5. Back in the VM, confirm that the device is in the degraded/configuring state: $ networkctl networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 2 links listed. 6. Run systemd-networkd-wait-online --any, and confirm that it does timeout instead of returning while the device is is still not configured: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=10 Timeout occurred while waiting for network connectivity. 7. Confirm that the device is STILL in the degraded/configuring state: $ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 2 links listed. 8. Now, leave systemd-network-wait-online --any running while we attach another interface: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=0 9. On the host, attach another interface to the VM on the default network, so that DHCP assigns the interface an IP: $ virsh attach-interface $VM network default 10. Back in the VM, the systemd-networkd-wait-online process should have exited with success, and networkctl should show the new link as configured, while the old one is still configuring: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=0 $ echo $? 0 $ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 9 ens9 etherroutableconfigured 3 links listed. [Where problems could occur] This patch we want to remove is totally confined to systemd-networkd- wait-online, so that's where we would see problems. From what I can tell, the patch is no longer doing what it was intended to do. E.g. running systemd-networkd-wait-online on a desktop install, where systemd-networkd does not manage links, results in a timeout. It only works with the --any flag, but the --any flag did not exist when the patch was written. If a user was relying on --any to make systemd- networkd-wait-online exit when no links are managed, they
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
This bug was fixed in the package systemd - 249.11-0ubuntu3.10 --- systemd (249.11-0ubuntu3.10) jammy; urgency=medium [ Nick Rosbrook ] * debian/tests/tests-in-lxd: use --reuse flag in lxc publish (LP: #2023229) File: debian/tests/tests-in-lxd https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=85b2ceddff1a6cc1ddbca8a1b7e5381d146e6313 * pstore: only try to load efi_pstore module (LP: #2023462) File: debian/patches/lp1978079-efi-pstore-not-cleared-on-boot.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=7600bbfb1e8a399e5aeb1010a20deda3e5a06c89 * shutdown: get only active md arrays. (LP: #2025563) File: debian/patches/lp2025563-shutdown-get-only-active-md-arrays.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=416a9245c8f0efbedcc4395cada23cb09c685ec3 * udev-rules: fix nvme symlink creation on namespace changes (LP: #2028180) File: debian/patches/lp2028180-udev-rules-fix-nvme-symlink-creation-on-namespace-changes.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=26e85b944da9098e66fc0c39f64ee40254c0c278 * core: reorder systemd arguments on reexec (LP: #2013543) File: debian/patches/lp2013543-core-reorder-systemd-arguments-on-reexec.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=19ba0f20d311642596dc65fa5d6eb96a2d4be280 * network/dhcp4: do not ignore the gateway even if the destination is in same network (LP: #2009743) Files: - debian/patches/lp2009743/network-dhcp4-do-not-ignore-the-gateway-even-if-the-desti.patch - debian/patches/lp2009743/test-network-add-one-more-testcase-for-DHCPv4-classless-r.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=73e774a2fb99c82df6d0edd770bb84ab735ec2f0 * Drop debian/UBUNTU-wait-online-exit-if-no-links-are-managed.patch (LP: #1982218) File: debian/patches/debian/UBUNTU-wait-online-exit-if-no-links-are-managed.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=cf82f08feea456e1c65895b34bffa8c33d421588 * debian/systemd.postint: do not daemon re-exec if we could hit LP: #2013543 File: debian/systemd.postinst https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=be484dab06d590b1792a8f016f4292373d0174b7 * binfmt: fix systemd-binfmt in LXD containers (LP: #1999275) Files: - debian/patches/lp1999275/binfmt-check-if-binfmt-is-mounted-before-applying-rules.patch - debian/patches/lp1999275/binfmt-util-also-check-if-binfmt-is-mounted-in-read-write.patch - debian/patches/lp1999275/binfmt-util-split-out-binfmt_mounted.patch - debian/patches/lp1999275/unit-check-more-specific-path-to-be-written-by-systemd-bi.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=0b9eadf05ee6db0e009dacbc71521480095880b3 [ Dan Streetman ] * Fix machinectl pull-tar and import-tar (LP: #1977630) Author: Dan Streetman File: debian/patches/lp1977630-fix_machinectl_pull_tar.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=1e7d3febe1600c6eb03bd71a17be6a6af52988c7 * make machinectl read-only work (LP: #1991829) Author: Dan Streetman File: debian/patches/lp1991829-add-CAP_LINUX_IMMUTABLE-to-systemd-machined-so-it-ca.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=7a7c47569e0a2d175915eb0b79c60f2611848731 -- Nick Rosbrook Mon, 21 Aug 2023 17:11:40 -0400 ** Changed in: systemd (Ubuntu Jammy) Status: Triaged => Fix Released -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Jammy: Fix Released Status in systemd source package in Lunar: Fix Released Bug description: [Impact] systemd-networkd-wait-online will exit prematurely when the --any flag is passed, due to an incorrect patch in Ubuntu that is supposed to make systemd-networkd-wait-online exit when *no* links are managed. [Test Plan] This test uses a VM managed by libvirt. In this scenario we have the "default" network which provides DHCP to the VM, and the "no-dhcp" network which does not provide DHCP. To setup the VM (this assumes Jammy, but the same steps apply for Lunar using appropriate names and install media): 1. Define the default and no-dhcp networks: $ cat > /tmp/net-default.xml << EOF default 04260896-2701-422d-84e0-8e0df1122db3 $ virsh net-create --file /tmp/net-default.xml $ cat > /tmp/net-default.xml << EOF no-dhcp
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
The release of this SRU has been rolled back in jammy because of bug #2035406 which appears to be a regression introduced in the new version of systemd. ** Changed in: systemd (Ubuntu Jammy) Status: Fix Released => Triaged -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Jammy: Triaged Status in systemd source package in Lunar: Fix Released Bug description: [Impact] systemd-networkd-wait-online will exit prematurely when the --any flag is passed, due to an incorrect patch in Ubuntu that is supposed to make systemd-networkd-wait-online exit when *no* links are managed. [Test Plan] This test uses a VM managed by libvirt. In this scenario we have the "default" network which provides DHCP to the VM, and the "no-dhcp" network which does not provide DHCP. To setup the VM (this assumes Jammy, but the same steps apply for Lunar using appropriate names and install media): 1. Define the default and no-dhcp networks: $ cat > /tmp/net-default.xml << EOF default 04260896-2701-422d-84e0-8e0df1122db3 $ virsh net-create --file /tmp/net-default.xml $ cat > /tmp/net-default.xml << EOF no-dhcp 2c047740-caab-4c90-8421-70da6732a759 $ virsh net-create --file /tmp/net-no-dhcp.xml $ virsh net-start --network default $ virst net-start --network no-dhcp 2. Create the VM using virt-install: virt-install \ --connect=qemu:///system \ --name=jammy \ --arch=x86_64 \ --cpu=host-passthrough \ --ram=4096 \ --vcpus=1 \ --disk=path=/var/lib/libvirt/images/jammy.qcow2,size=24,format=qcow2,sparse=true,bus=virtio \ --virt-type=kvm \ --accelerate \ --hvm \ --cdrom=/tmp/ubuntu-22.04.2-live-server-amd64.iso \ --os-type=linux \ --os-variant=generic \ --graphics=spice \ --input=tablet \ --network=network=default,model=virtio \ --video=qxl \ --noreboot 3. Complete the installation steps. Reboot the VM. Run the test: 1. Detach the network interface so that the test starts with no interfaces attached: $ virsh detach-interface $VM network 2. In the VM, write a network config for all en* links to use DHCP: $ cat > /etc/systemd/network/10-dhcp.network << EOF [Match] Name=en* [Network] DHCP=yes EOF 3. Restart systemd-networkd: $ systemctl restart systemd-networkd 4. On the host, attach an interface to the VM on the no-dhcp network, so that an IP is not assigned: $ virsh attach-interface $VM network no-dhcp 5. Back in the VM, confirm that the device is in the degraded/configuring state: $ networkctl networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 2 links listed. 6. Run systemd-networkd-wait-online --any, and confirm that it does timeout instead of returning while the device is is still not configured: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=10 Timeout occurred while waiting for network connectivity. 7. Confirm that the device is STILL in the degraded/configuring state: $ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 2 links listed. 8. Now, leave systemd-network-wait-online --any running while we attach another interface: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=0 9. On the host, attach another interface to the VM on the default network, so that DHCP assigns the interface an IP: $ virsh attach-interface $VM network default 10. Back in the VM, the systemd-networkd-wait-online process should have exited with success, and networkctl should show the new link as configured, while the old one is still configuring: $ /lib/systemd/systemd-networkd-wait-online --any --timeout=0 $ echo $? 0 $ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 8 ens3 etherdegradedconfiguring 9 ens9 etherroutableconfigured 3 links listed. [Where problems could occur] This patch we want to remove is totally confined to systemd-networkd- wait-online, so that's where we would see problems. From what I can tell, the patch is no longer doing what it was intended to do. E.g. running systemd-networkd-wait-online on a desktop install, where systemd-networkd does not manage links, results in a timeout. It only works with the --any flag, but the --any flag did not exist when the patch was written. If a user was relying on --any to make systemd- networkd-wait-online exit when no links are managed, they will see a
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
This bug was fixed in the package systemd - 249.11-0ubuntu3.10 --- systemd (249.11-0ubuntu3.10) jammy; urgency=medium [ Nick Rosbrook ] * debian/tests/tests-in-lxd: use --reuse flag in lxc publish (LP: #2023229) File: debian/tests/tests-in-lxd https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=85b2ceddff1a6cc1ddbca8a1b7e5381d146e6313 * pstore: only try to load efi_pstore module (LP: #2023462) File: debian/patches/lp1978079-efi-pstore-not-cleared-on-boot.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=7600bbfb1e8a399e5aeb1010a20deda3e5a06c89 * shutdown: get only active md arrays. (LP: #2025563) File: debian/patches/lp2025563-shutdown-get-only-active-md-arrays.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=416a9245c8f0efbedcc4395cada23cb09c685ec3 * udev-rules: fix nvme symlink creation on namespace changes (LP: #2028180) File: debian/patches/lp2028180-udev-rules-fix-nvme-symlink-creation-on-namespace-changes.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=26e85b944da9098e66fc0c39f64ee40254c0c278 * core: reorder systemd arguments on reexec (LP: #2013543) File: debian/patches/lp2013543-core-reorder-systemd-arguments-on-reexec.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=19ba0f20d311642596dc65fa5d6eb96a2d4be280 * network/dhcp4: do not ignore the gateway even if the destination is in same network (LP: #2009743) Files: - debian/patches/lp2009743/network-dhcp4-do-not-ignore-the-gateway-even-if-the-desti.patch - debian/patches/lp2009743/test-network-add-one-more-testcase-for-DHCPv4-classless-r.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=73e774a2fb99c82df6d0edd770bb84ab735ec2f0 * Drop debian/UBUNTU-wait-online-exit-if-no-links-are-managed.patch (LP: #1982218) File: debian/patches/debian/UBUNTU-wait-online-exit-if-no-links-are-managed.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=cf82f08feea456e1c65895b34bffa8c33d421588 * debian/systemd.postint: do not daemon re-exec if we could hit LP: #2013543 File: debian/systemd.postinst https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=be484dab06d590b1792a8f016f4292373d0174b7 * binfmt: fix systemd-binfmt in LXD containers (LP: #1999275) Files: - debian/patches/lp1999275/binfmt-check-if-binfmt-is-mounted-before-applying-rules.patch - debian/patches/lp1999275/binfmt-util-also-check-if-binfmt-is-mounted-in-read-write.patch - debian/patches/lp1999275/binfmt-util-split-out-binfmt_mounted.patch - debian/patches/lp1999275/unit-check-more-specific-path-to-be-written-by-systemd-bi.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=0b9eadf05ee6db0e009dacbc71521480095880b3 [ Dan Streetman ] * Fix machinectl pull-tar and import-tar (LP: #1977630) Author: Dan Streetman File: debian/patches/lp1977630-fix_machinectl_pull_tar.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=1e7d3febe1600c6eb03bd71a17be6a6af52988c7 * make machinectl read-only work (LP: #1991829) Author: Dan Streetman File: debian/patches/lp1991829-add-CAP_LINUX_IMMUTABLE-to-systemd-machined-so-it-ca.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=7a7c47569e0a2d175915eb0b79c60f2611848731 -- Nick Rosbrook Mon, 21 Aug 2023 17:11:40 -0400 ** Changed in: systemd (Ubuntu Jammy) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Jammy: Fix Released Status in systemd source package in Lunar: Fix Released Bug description: [Impact] systemd-networkd-wait-online will exit prematurely when the --any flag is passed, due to an incorrect patch in Ubuntu that is supposed to make systemd-networkd-wait-online exit when *no* links are managed. [Test Plan] This test uses a VM managed by libvirt. In this scenario we have the "default" network which provides DHCP to the VM, and the "no-dhcp" network which does not provide DHCP. To setup the VM (this assumes Jammy, but the same steps apply for Lunar using appropriate names and install media): 1. Define the default and no-dhcp networks: $ cat > /tmp/net-default.xml << EOF default 04260896-2701-422d-84e0-8e0df1122db3 $ virsh net-create --file /tmp/net-default.xml $ cat > /tmp/net-default.xml << EOF no-dhcp
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
This bug was fixed in the package systemd - 252.5-2ubuntu3.1 --- systemd (252.5-2ubuntu3.1) lunar; urgency=medium * debian/tests/tests-in-lxd: use --reuse flag in lxc publish (LP: #2023229) File: debian/tests/tests-in-lxd https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=2a443ddd5b67596647e463eee64d58c3c71bbf08 * udev-rules: fix nvme symlink creation on namespace changes (LP: #2028180) File: debian/patches/lp2028180-udev-rules-fix-nvme-symlink-creation-on-namespace-changes.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=064c7c00aa133b697ab3c0082b825e2f197f91cc * core: reorder systemd arguments on reexec (LP: #2013543) File: debian/patches/lp2013543-core-reorder-systemd-arguments-on-reexec.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=45541ccbc16ed30b6a120cda7401f69cce164d54 * network/dhcp4: do not ignore the gateway even if the destination is in same network (LP: #2009743) Files: - debian/patches/lp2009743/network-dhcp4-do-not-ignore-the-gateway-even-if-the-desti.patch - debian/patches/lp2009743/test-network-add-one-more-testcase-for-DHCPv4-classless-r.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=ddea3bcbca3421299b13cfe897157cfbf9f0f06d * debian/systemd.postint: do not daemon re-exec if we could hit LP: #2013543 File: debian/systemd.postinst https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=e1a08bb427e19ced6c16f054ebdee43ccbc9c528 * Drop debian/UBUNTU-wait-online-exit-if-no-links-are-managed.patch (LP: #1982218) File: debian/patches/debian/UBUNTU-wait-online-exit-if-no-links-are-managed.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=8235427fd8859ee393a08d425e1a52e1ebcbe2f1 * sd-bus: bus_message_type_from_string is not pure (LP: #2031683) File: debian/patches/lp2031683-sd-bus-bus_message_type_from_string-is-not-pure.patch https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=2d65b6c74864976a2bb42c884baf75d1674215fc -- Nick Rosbrook Fri, 18 Aug 2023 14:15:03 -0400 ** Changed in: systemd (Ubuntu Lunar) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Jammy: Fix Released Status in systemd source package in Lunar: Fix Released Bug description: [Impact] systemd-networkd-wait-online will exit prematurely when the --any flag is passed, due to an incorrect patch in Ubuntu that is supposed to make systemd-networkd-wait-online exit when *no* links are managed. [Test Plan] This test uses a VM managed by libvirt. In this scenario we have the "default" network which provides DHCP to the VM, and the "no-dhcp" network which does not provide DHCP. To setup the VM (this assumes Jammy, but the same steps apply for Lunar using appropriate names and install media): 1. Define the default and no-dhcp networks: $ cat > /tmp/net-default.xml << EOF default 04260896-2701-422d-84e0-8e0df1122db3 $ virsh net-create --file /tmp/net-default.xml $ cat > /tmp/net-default.xml << EOF no-dhcp 2c047740-caab-4c90-8421-70da6732a759 $ virsh net-create --file /tmp/net-no-dhcp.xml $ virsh net-start --network default $ virst net-start --network no-dhcp 2. Create the VM using virt-install: virt-install \ --connect=qemu:///system \ --name=jammy \ --arch=x86_64 \ --cpu=host-passthrough \ --ram=4096 \ --vcpus=1 \ --disk=path=/var/lib/libvirt/images/jammy.qcow2,size=24,format=qcow2,sparse=true,bus=virtio \ --virt-type=kvm \ --accelerate \ --hvm \ --cdrom=/tmp/ubuntu-22.04.2-live-server-amd64.iso \ --os-type=linux \ --os-variant=generic \ --graphics=spice \ --input=tablet \ --network=network=default,model=virtio \ --video=qxl \ --noreboot 3. Complete the installation steps. Reboot the VM. Run the test: 1. Detach the network interface so that the test starts with no interfaces attached: $ virsh detach-interface $VM network 2. In the VM, write a network config for all en* links to use DHCP: $ cat > /etc/systemd/network/10-dhcp.network << EOF [Match] Name=en* [Network] DHCP=yes EOF 3. Restart systemd-networkd: $ systemctl restart systemd-networkd 4. On the host, attach an interface to the VM on the no-dhcp network, so that an IP is not assigned: $ virsh attach-interface $VM network no-dhcp 5. Back in the VM, confirm that the device is in the degraded/configuring
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
I have verified the fix using systemd 252.5-2ubuntu3.1 from lunar- proposed: The VM and test networks are already configured on my system: nr@six:/t/tmp.jTS3wdPdT3$ virsh list Id NameState --- 9clean-lunar-amd64 running nr@six:/t/tmp.jTS3wdPdT3$ virsh net-list Name StateAutostart Persistent default active yes yes no-dhcp active no no nr@six:/t/tmp.jTS3wdPdT3$ virsh net-dumpxml --network default default 04260896-2701-422d-84e0-8e0df1122db3 nr@six:/t/tmp.jTS3wdPdT3$ virsh net-dumpxml --network no-dhcp no-dhcp 2c047740-caab-4c90-8421-70da6732a759 Running the test case: (Host) nr@six:/t/tmp.jTS3wdPdT3$ virsh detach-interface clean-lunar-amd64 network Interface detached successfully (VM) root@clean-lunar-amd64:/home/nr# apt-cache policy systemd systemd: Installed: 252.5-2ubuntu3.1 Candidate: 252.5-2ubuntu3.1 Version table: *** 252.5-2ubuntu3.1 500 500 http://security.ubuntu.com/ubuntu lunar-proposed/main amd64 Packages 500 http://archive.ubuntu.com/ubuntu lunar-proposed/main amd64 Packages 100 /var/lib/dpkg/status 252.5-2ubuntu3 500 500 http://archive.ubuntu.com/ubuntu lunar/main amd64 Packages root@clean-lunar-amd64:/home/nr# cat > /etc/systemd/network/10-dhcp.network << EOF [Match] Name=en* [Network] DHCP=yes EOF root@clean-lunar-amd64:/home/nr# systemctl restart systemd-networkd (Host) nr@six:/t/tmp.jTS3wdPdT3$ virsh attach-interface clean-lunar-amd64 network no-dhcp Interface attached successfully (VM) root@clean-lunar-amd64:/home/nr# networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 5 ens3 etherdegradedconfiguring 2 links listed. root@clean-lunar-amd64:/home/nr# /lib/systemd/systemd-networkd-wait-online --any --timeout=10 Timeout occurred while waiting for network connectivity. root@clean-lunar-amd64:/home/nr# networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 5 ens3 etherdegradedconfiguring 2 links listed. (Host) nr@six:/t/tmp.jTS3wdPdT3$ virsh attach-interface clean-lunar-amd64 network default Interface attached successfully (VM) root@clean-lunar-amd64:/home/nr# /lib/systemd/systemd-networkd-wait-online --any --timeout=0 root@clean-lunar-amd64:/home/nr# echo $? 0 root@clean-lunar-amd64:/home/nr# networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 5 ens3 etherdegradedconfiguring 6 ens9 etherroutableconfigured 3 links listed. ** Tags removed: verification-needed verification-needed-lunar ** Tags added: verification-done verification-done-lunar -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Jammy: Fix Committed Status in systemd source package in Lunar: Fix Committed Bug description: [Impact] systemd-networkd-wait-online will exit prematurely when the --any flag is passed, due to an incorrect patch in Ubuntu that is supposed to make systemd-networkd-wait-online exit when *no* links are managed. [Test Plan] This test uses a VM managed by libvirt. In this scenario we have the "default" network which provides DHCP to the VM, and the "no-dhcp" network which does not provide DHCP. To setup the VM (this assumes Jammy, but the same steps apply for Lunar using appropriate names and install media): 1. Define the default and no-dhcp networks: $ cat > /tmp/net-default.xml << EOF default 04260896-2701-422d-84e0-8e0df1122db3 $ virsh net-create --file /tmp/net-default.xml $ cat > /tmp/net-default.xml << EOF no-dhcp 2c047740-caab-4c90-8421-70da6732a759 $ virsh net-create --file /tmp/net-no-dhcp.xml $ virsh net-start --network default $ virst net-start --network no-dhcp 2. Create the VM using virt-install: virt-install \ --connect=qemu:///system \ --name=jammy \ --arch=x86_64 \ --cpu=host-passthrough \ --ram=4096 \ --vcpus=1 \ --disk=path=/var/lib/libvirt/images/jammy.qcow2,size=24,format=qcow2,sparse=true,bus=virtio \ --virt-type=kvm \ --accelerate \ --hvm \ --cdrom=/tmp/ubuntu-22.04.2-live-server-amd64.iso \ --os-type=linux \ --os-variant=generic \ --graphics=spice \ --input=tablet \ --network=network=default,model=virtio \ --video=qxl \ --noreboot 3. Complete the installation steps. Reboot the VM. Run the test: 1. Detach the network interface so that the test
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
I have verified the fix using systemd 249.11-0ubuntu3.10 from jammy- proposed: The VM and test networks are already configured on my system: nr@six:/t/tmp.jTS3wdPdT3$ virsh list Id NameState --- 8clean-jammy-amd64 running nr@six:/t/tmp.jTS3wdPdT3$ virsh net-list Name StateAutostart Persistent default active yes yes no-dhcp active no no nr@six:/t/tmp.jTS3wdPdT3$ virsh net-dumpxml --network default default 04260896-2701-422d-84e0-8e0df1122db3 nr@six:/t/tmp.jTS3wdPdT3$ virsh net-dumpxml --network no-dhcp no-dhcp 2c047740-caab-4c90-8421-70da6732a759 Running the test case: (Host) nr@six:/t/tmp.jTS3wdPdT3$ virsh detach-interface clean-jammy-amd64 network Interface detached successfully (VM) root@clean-jammy-amd64:/home/nr# apt-cache policy systemd systemd: Installed: 249.11-0ubuntu3.10 Candidate: 249.11-0ubuntu3.10 Version table: *** 249.11-0ubuntu3.10 500 500 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages 500 http://security.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages 100 /var/lib/dpkg/status 249.11-0ubuntu3.9 500 500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages 249.11-0ubuntu3.7 500 500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages 249.11-0ubuntu3 500 500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages root@clean-jammy-amd64:/home/nr# cat > /etc/systemd/network/10-dhcp.network << EOF [Match] Name=en* [Network] DHCP=yes EOF root@clean-jammy-amd64:/home/nr# systemctl restart systemd-networkd (Host) nr@six:/t/tmp.jTS3wdPdT3$ virsh attach-interface clean-jammy-amd64 network no-dhcp Interface attached successfully (VM) root@clean-jammy-amd64:/home/nr# networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 3 ens3 etherdegradedconfiguring 2 links listed. root@clean-jammy-amd64:/home/nr# /lib/systemd/systemd-networkd-wait-online --any --timeout 10 Timeout occurred while waiting for network connectivity. root@clean-jammy-amd64:/home/nr# networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 3 ens3 ethercarrier configuring 2 links listed. (Host) nr@six:/t/tmp.jTS3wdPdT3$ virsh attach-interface clean-jammy-amd64 network default Interface attached successfully (VM) root@clean-jammy-amd64:/home/nr# /lib/systemd/systemd-networkd-wait- online --any --timeout=0 root@clean-jammy-amd64:/home/nr# echo $? 0 root@clean-jammy-amd64:/home/nr# networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 3 ens3 etherdegradedconfiguring 5 ens9 etherroutableconfigured 3 links listed. ** Tags removed: verification-needed-jammy ** Tags added: verification-done-jammy -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Jammy: Fix Committed Status in systemd source package in Lunar: Fix Committed Bug description: [Impact] systemd-networkd-wait-online will exit prematurely when the --any flag is passed, due to an incorrect patch in Ubuntu that is supposed to make systemd-networkd-wait-online exit when *no* links are managed. [Test Plan] This test uses a VM managed by libvirt. In this scenario we have the "default" network which provides DHCP to the VM, and the "no-dhcp" network which does not provide DHCP. To setup the VM (this assumes Jammy, but the same steps apply for Lunar using appropriate names and install media): 1. Define the default and no-dhcp networks: $ cat > /tmp/net-default.xml << EOF default 04260896-2701-422d-84e0-8e0df1122db3 $ virsh net-create --file /tmp/net-default.xml $ cat > /tmp/net-default.xml << EOF no-dhcp 2c047740-caab-4c90-8421-70da6732a759 $ virsh net-create --file /tmp/net-no-dhcp.xml $ virsh net-start --network default $ virst net-start --network no-dhcp 2. Create the VM using virt-install: virt-install \ --connect=qemu:///system \ --name=jammy \ --arch=x86_64 \ --cpu=host-passthrough \ --ram=4096 \ --vcpus=1 \ --disk=path=/var/lib/libvirt/images/jammy.qcow2,size=24,format=qcow2,sparse=true,bus=virtio \ --virt-type=kvm \ --accelerate \ --hvm \ --cdrom=/tmp/ubuntu-22.04.2-live-server-amd64.iso \ --os-type=linux \ --os-variant=generic \ --graphics=spice \ --input=tablet \
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
This bug was fixed in the package systemd - 253.5-1ubuntu1 --- systemd (253.5-1ubuntu1) mantic; urgency=medium * Merge 253.5-1 from Debian unstable. Remaining changes: - debian/tests/upstream{,-1,-2}: split upstream tests into two parts - debian/tests/tests-in-lxd: run some autopkgtests in LXD too - debian/tests/storage: skip tests if scsi_debug module is not available - debian/tests/boot-and-services: + skip test_syslog on s390x + skip coredump tests on s390x + skip apparmor tests on armhf + consume stderr in systemctl status call in test_service - debian/systemd.postinst: skip daemon-reexec and try-restarts during shutdown - debian/systemd.postinst,debian/rules: Disable dh_installinit generation of tmpfiles for systemd package, and manually call systemd-tmpfiles --create in postinst - debian/systemd-resolved.postinst: copy existing /etc/resolv.conf to /run/systemd/resolve/stub-resolv.conf - debian/rules: + Set default user path + Disable LLMNR by default + Remove unneeded efi artifacts on i386 to avoid debugedit errors - debian/rules,debian/control,debian/tests/control: + Do not build with tpm libraries on i386 + Do not build with libqrencode on i386 - debian/gbp.conf,debian/extra/wrap_cl.py: Use a customization script to add LP commit links to changelog - debian/extra/systemd-oomd-defaults/-.slice.d/10-oomd-root-slice-defaults.conf: Set ManagedOOMSwap=auto, disabling swap kill by default - debian/extra/start-udev: Set scsi_mod scan=sync even if it's builtin to the kernel (we previously only set it in modprobe.d) - debian/control: + Add Recommends: networkd-dispatcher systemd-resolved to systemd package + Provide upgrade path (Replaces:) for Jammy's systemd-repart + Give systemd-resolved Priority: important + Add Recommends: systemd-hwe-hwdb to udev package + Add Breaks: systemd (<< ${binary:Version}) to udev package so that systemd is upgraded as well when upgrading udev + Make systemd-sysv Depends: on matching version of systemd + Drop Recommends: libnss-myhostname libnss-resolve from systemd-resolved - d/p/debian/Ubuntu-UseDomains-by-default.patch: Enable UseDomains by default on Ubuntu. - d/p/debian/UBUNTU-Add-AssumedApparmorLabel-unconfined-to-timedate1-dbus.patch: Set AssumedAppArmorLabel=unconfined in timedate1 dbus service file - d/p/debian/UBUNTU-test-test-functions-launch-qemu-with-vga-none.patch: Launch QEMU with -vga none in test-functions - d/p/debian/UBUNTU-journald.service-set-Nice-1-to-dodge-watchdog-on-soft-loc.patch: Set Nice=-1 in journald.service to dodge watchdog on soft lockups - d/p/debian/UBUNTU-Revert-namespace-be-more-careful-when-handling-namespacin.patch: Revert "namespace: be more careful when handling namespacing failures gracefully" upstream commit - d/p/debian/UBUNTU-resolved-default-no-negative-caching.patch: Default to Cache=no-negative in systemd-resolved - d/p/Revert-network-if-sys-is-rw-then-udev-should-be-around.patch: Revert "network: if /sys is rw, then udev should be around" upstream commit - d/p/debian/UBUNTU-src-test-test-execute.c-Skip-parts-of-test-execute-in-con.patch: Skip some of test-execute when running in LXD - d/p/lp1861941-dont-generate-disk-byuuid-for-bcache-uuid.patch: skip disk/by-uuid for bcache devices - d/p/deny-list-TEST-55-OOMD-on-ppc64el.patch: Deny-list TEST-55-OOMD om ppc64el - d/p/debian/UBUNTU-Don-t-override-Ubuntu-s-default-sysctl-values-LP-1962038.patch: Don't override Ubuntu's default sysctl values - d/p/test-increase-QEMU_MEM-for-some-tests.patch: Increase QEMU_MEM for some tests to improve success rate - d/p/test-denylist-TEST-29-PORTABLE-again.patch: Deny-list TEST-29-PORTABLE * Dropped changes, fixed upstream: - lp1999275-binfmt-util-also-check-if-binfmt-is-mounted-in-read-write.patch: Applied upstream: https://github.com/systemd/systemd/commit/5aaa79ce96 - lp1999275-stat-util-introduce-fd_is_read_only_fs.patch: Applied upstream: https://github.com/systemd/systemd/commit/dc1752ea72 - lp1999275-binfmt-check-if-binfmt-is-mounted-before-applying-rules.patch: Applied upstream: https://github.com/systemd/systemd/commit/94ba5b1532 - lp2002445-sd-netlink-do-not-swap-old-name-and-alternative-name.patch: Applied upstream: https://github.com/systemd/systemd/commit/080afbb57c - lp2002445-udev-net-allow-new-link-name-as-an-altname-before-renamin.patch: Applied upstream: https://github.com/systemd/systemd/commit/d0b31efc1a - lp2004478-network-dhcp4-accept-local-subnet-routes-from-DHCP.patch: Applied upstream: https://github.com/systemd/systemd/commit/1d84a3c779 - lp1999275-binfmt-util-split-out-binfmt_mounted.patch:
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
** Also affects: systemd (Ubuntu Lunar) Importance: Undecided Status: New ** Changed in: systemd (Ubuntu Lunar) Importance: Undecided => Low -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Triaged Status in systemd source package in Jammy: Triaged Status in systemd source package in Lunar: New Bug description: Ubuntu's packaging of systemd-networkd-wait-online includes a patch (UBUNTU-wait-online-exit-if-no-links-are-managed) intended to exit if none of the present links are managed by systemd-networkd. However, the patch fails to identify links in the "configuring" state, which implies they are managed, but not yet fully online. This undermines the purpose of systemd-networkd-wait-online with the --any option, since at the time the systemd-networkd-wait-online service is started, managed links are _likely_ in a configuring, but-not-yet-configured state. Please see the attached patch. Thanks! To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1982218/+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
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
Thanks for that additional information. So, looking into this a bit, I am a bit tempted to just drop this patch from Jammy. For one, I will be dropping this patch in the current cycle because upstream has a patch[1] now that accomplishes the same goal in a different way. More importantly though, looking at bug 1728181 (for which this patch exists), it's not clear to me that this ever worked exactly as it was intended. I will follow up to try and find out what happened, but based on the comments it sounds like the fix was incomplete and wasn't further developed. Testing on Lunar, this patch only works as intended when the --any flag is specified, which I think is because when this patch was refreshed over the years, it was not correctly adapted for the context. TL;DR - I do think this is something we can address in the next Jammy SRU, and AFAICT just dropping the patch should solve your issue. [1] ** Tags added: systemd-sru-next ** Also affects: systemd (Ubuntu Jammy) Importance: Undecided Status: New ** Changed in: systemd (Ubuntu Jammy) Importance: Undecided => Low ** Changed in: systemd (Ubuntu Jammy) Status: New => Triaged ** Changed in: systemd (Ubuntu) Status: New => Triaged ** Changed in: systemd (Ubuntu) Importance: Undecided => Low -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Triaged Status in systemd source package in Jammy: Triaged Bug description: Ubuntu's packaging of systemd-networkd-wait-online includes a patch (UBUNTU-wait-online-exit-if-no-links-are-managed) intended to exit if none of the present links are managed by systemd-networkd. However, the patch fails to identify links in the "configuring" state, which implies they are managed, but not yet fully online. This undermines the purpose of systemd-networkd-wait-online with the --any option, since at the time the systemd-networkd-wait-online service is started, managed links are _likely_ in a configuring, but-not-yet-configured state. Please see the attached patch. Thanks! To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1982218/+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
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
Apologies for the late response: Yes, we have a Ubuntu 22.04 LTS image that we use across a set of machines, some of which have multiple Ethernet ports, but for which we only connect a single port. For this image we use the following Netplan configuration (/etc/netplan/ethernet.yaml): network: ethernets: en: match: name: en* dhcp4: true version: 2 Which places _all_ Ethernet interfaces under systemd-networkd management, allowing us to bring up at least one interface via DHCP without needing to know the exact interface name (which depends on the exact hardware) and enables us to use any of the available Ethernet ports on the machine. As part of this image we also have a boot-time systemd service that requires functional network connectivity in order to successfully start. The unit file for this service depends on the network-online target ("Wants=network-online.target"). For example purposes you could replace this service with a remote NFS mount specified in /etc/fstab, since boot-time NFS mounts implicitly depend on the network-online target as well. The default behavior of systemd-networkd-wait-online is to wait until all networkd-managed interfaces are routable before the network-online target is started, but since we only ever connect a single Ethernet interface to the network, we override its behavior here in our image (/etc/systemd/system/systemd-networkd-wait-online.service.d/any.conf): [Service] ExecStart= ExecStart=/usr/local/lib/systemd-networkd-wait-online --any --timeout=0 Now, the problem introduced by the UBUNTU-wait-online-exit-if-no-links- are-managed patch is that it places us in a race against our DHCP server. During a successful boot, where networkd is able to obtain an address via DHCP _before_ the wait-online service is reached, networkctl reports this status: $ sudo networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 enp0s1 etherroutableconfigured 3 enp0s2 etherno-carrier configuring Since the second interface (enp0s1) is in the configured state and is routable, systemd-networkd-wait-online behaves correctly by exiting immediately. However, during an unsuccessful boot, where networkd has yet to obtain an address via DHCP at the time the wait-online service is reached, networkctl reports this status: $ sudo networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 enp0s1 etherdegradedconfiguring 3 enp0s2 etherno-carrier configuring Here, both of the managed Ethernet interfaces are still in the configuring state. Since UBUNTU-wait-online-exit-if-no-links-are- managed doesn't check if managed interfaces are in this state, only configured, it assumes those links are unmanaged and systemd-networkd- wait-online also exits immediately. This results in failure of our network-dependent service to start (or equivalently, failure of the remote NFS volume to mount). With the provided patch, systemd-networkd-wait-online identifies two managed interfaces in the configuring state and waits until at least one of them becomes routable, and thus waits until the network is functional before continuing to boot. I hope this example better illustrates the issue. Thanks! ** Changed in: systemd (Ubuntu) Status: Expired => New -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: New Bug description: Ubuntu's packaging of systemd-networkd-wait-online includes a patch (UBUNTU-wait-online-exit-if-no-links-are-managed) intended to exit if none of the present links are managed by systemd-networkd. However, the patch fails to identify links in the "configuring" state, which implies they are managed, but not yet fully online. This undermines the purpose of systemd-networkd-wait-online with the --any option, since at the time the systemd-networkd-wait-online service is started, managed links are _likely_ in a configuring, but-not-yet-configured state. Please see the attached patch. Thanks! To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1982218/+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
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
[Expired for systemd (Ubuntu) because there has been no activity for 60 days.] ** Changed in: systemd (Ubuntu) Status: Incomplete => Expired -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Expired Bug description: Ubuntu's packaging of systemd-networkd-wait-online includes a patch (UBUNTU-wait-online-exit-if-no-links-are-managed) intended to exit if none of the present links are managed by systemd-networkd. However, the patch fails to identify links in the "configuring" state, which implies they are managed, but not yet fully online. This undermines the purpose of systemd-networkd-wait-online with the --any option, since at the time the systemd-networkd-wait-online service is started, managed links are _likely_ in a configuring, but-not-yet-configured state. Please see the attached patch. Thanks! To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1982218/+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
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
Hi Mike, Do you have a test case that can demonstrate/reproduce this issue? ** Changed in: systemd (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: Incomplete Bug description: Ubuntu's packaging of systemd-networkd-wait-online includes a patch (UBUNTU-wait-online-exit-if-no-links-are-managed) intended to exit if none of the present links are managed by systemd-networkd. However, the patch fails to identify links in the "configuring" state, which implies they are managed, but not yet fully online. This undermines the purpose of systemd-networkd-wait-online with the --any option, since at the time the systemd-networkd-wait-online service is started, managed links are _likely_ in a configuring, but-not-yet-configured state. Please see the attached patch. Thanks! To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1982218/+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
[Touch-packages] [Bug 1982218] Re: wait-online does not correctly identify managed links
The attachment "0001-wait-online-Check-if-links-are-in-the-configuring- st.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team. [This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.] ** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1982218 Title: wait-online does not correctly identify managed links Status in systemd package in Ubuntu: New Bug description: Ubuntu's packaging of systemd-networkd-wait-online includes a patch (UBUNTU-wait-online-exit-if-no-links-are-managed) intended to exit if none of the present links are managed by systemd-networkd. However, the patch fails to identify links in the "configuring" state, which implies they are managed, but not yet fully online. This undermines the purpose of systemd-networkd-wait-online with the --any option, since at the time the systemd-networkd-wait-online service is started, managed links are _likely_ in a configuring, but-not-yet-configured state. Please see the attached patch. Thanks! To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1982218/+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