wait-online does not correctly identify managed links
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Jammy |
Fix Released
|
Low
|
Unassigned | ||
Lunar |
Fix Released
|
Low
|
Unassigned |
Bug Description
[Impact]
systemd-
[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-
<network>
<name>
<uuid>
<forward mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<mac address=
<ip address=
<dhcp>
<range start='
</dhcp>
</ip>
</network>
$ virsh net-create --file /tmp/net-
$ cat > /tmp/net-
<network>
<name>
<uuid>
</uuid>
<forward mode='nat'/>
<bridge name='virbr1' stp='on' delay='0'/>
<mac address=
<ip address=
</ip>
</network>
$ virsh net-create --file /tmp/net-
$ virsh net-start --network default
$ virst net-start --network no-dhcp
2. Create the VM using virt-install:
virt-install \
--connect=
--name=jammy \
--arch=x86_64 \
--cpu=host-
--ram=4096 \
--vcpus=1 \
--disk=
--virt-type=kvm \
--accelerate \
--hvm \
--cdrom=
--os-type=linux \
--os-variant=
--graphics=spice \
--input=tablet \
--network=
--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/
[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/
$ networkctl
networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
8 ens3 ether degraded configuring
2 links listed.
6. Run systemd-
$ /lib/systemd/
Timeout occurred while waiting for network connectivity.
7. Confirm that the device is STILL in the degraded/
$ networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
8 ens3 ether degraded configuring
2 links listed.
8. Now, leave systemd-
$ /lib/systemd/
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-
$ /lib/systemd/
$ echo $?
0
$ networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
8 ens3 ether degraded configuring
9 ens9 ether routable configured
3 links listed.
[Where problems could occur]
This patch we want to remove is totally confined to systemd-
[Original Description]
Ubuntu's packaging of systemd-
Please see the attached patch. Thanks!
Related branches
- Lukas Märdian: Approve
-
Diff: 434 lines (+299/-55)9 files modifieddebian/patches/lp2009743/network-dhcp4-do-not-ignore-the-gateway-even-if-the-desti.patch (+60/-0)
debian/patches/lp2009743/test-network-add-one-more-testcase-for-DHCPv4-classless-r.patch (+36/-0)
debian/patches/lp2013543-core-reorder-systemd-arguments-on-reexec.patch (+58/-0)
debian/patches/lp2028180-udev-rules-fix-nvme-symlink-creation-on-namespace-changes.patch (+59/-0)
debian/patches/lp2031683-sd-bus-bus_message_type_from_string-is-not-pure.patch (+62/-0)
debian/patches/series (+5/-1)
debian/systemd.postinst (+18/-15)
debian/tests/tests-in-lxd (+1/-1)
dev/null (+0/-38)
- Lukas Märdian: Approve
-
Diff: 796 lines (+623/-45)16 files modifieddebian/patches/lp1977630-fix_machinectl_pull_tar.patch (+81/-0)
debian/patches/lp1978079-efi-pstore-not-cleared-on-boot.patch (+5/-4)
debian/patches/lp1991829-add-CAP_LINUX_IMMUTABLE-to-systemd-machined-so-it-ca.patch (+29/-0)
debian/patches/lp1999275/binfmt-check-if-binfmt-is-mounted-before-applying-rules.patch (+80/-0)
debian/patches/lp1999275/binfmt-util-also-check-if-binfmt-is-mounted-in-read-write.patch (+41/-0)
debian/patches/lp1999275/binfmt-util-split-out-binfmt_mounted.patch (+69/-0)
debian/patches/lp1999275/unit-check-more-specific-path-to-be-written-by-systemd-bi.patch (+26/-0)
debian/patches/lp2009743/network-dhcp4-do-not-ignore-the-gateway-even-if-the-desti.patch (+59/-0)
debian/patches/lp2009743/test-network-add-one-more-testcase-for-DHCPv4-classless-r.patch (+33/-0)
debian/patches/lp2013543-core-reorder-systemd-arguments-on-reexec.patch (+58/-0)
debian/patches/lp2025563-shutdown-get-only-active-md-arrays.patch (+67/-0)
debian/patches/lp2028180-udev-rules-fix-nvme-symlink-creation-on-namespace-changes.patch (+47/-0)
debian/patches/series (+11/-1)
debian/systemd.postinst (+16/-1)
debian/tests/tests-in-lxd (+1/-1)
dev/null (+0/-38)
Changed in systemd (Ubuntu Lunar): | |
importance: | Undecided → Low |
Changed in systemd (Ubuntu Lunar): | |
status: | New → Triaged |
description: | updated |
Changed in systemd (Ubuntu Lunar): | |
status: | Triaged → In Progress |
Changed in systemd (Ubuntu Jammy): | |
status: | Triaged → In Progress |
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.]