[Bug 1728181] Re: systemd-networkd-wait-online waits when devices are unmanaged
Scott Moser
ssmoser2+ubuntu at gmail.com
Sat Oct 28 02:13:43 UTC 2017
Essentially we are looking for this work flow to function, with or without
network devices attached to the system.
$ wget http://cloud-images.ubuntu.com/some-disk.img
$ qemu-img create -f qcow2 -b some-disk.img my-disk.img
$ sudo ~/bin/backdoor-image my-disk.img --user=user1 --password=passw0rd1
$ qemu-system-x86_64 -enable-kvm \
-device virtio-scsi-pci,id=virtio-scsi-xkvm \
-drive file=my.img,id=disk00,if=none,format=qcow2,index=0 \
-device virtio-blk,drive=disk00,serial=my.img \
-m 768 -nodefaults -nographic -serial mon:stdio -echr 0x05
....
then just login at prompt with 'user1' and 'password1'
That does generally work right now, it just has a 120 second-ish timeout
on waiting for network devices that configured (and possibly even are
not present) to come up.
http://paste.ubuntu.com/25833773/
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1728181
Title:
systemd-networkd-wait-online waits when devices are unmanaged
Status in systemd package in Ubuntu:
Confirmed
Bug description:
I started a system with cloud-init disabled, etc. and a single real
network interface (ens3) that could be configured.
That VM has no configuration whatsoever for systemd-networkd, as that
would have to have been written by netplan, and cloud-init did not
generate netplan config (because it was disabled).
So:
root at ubuntu:/etc/systemd/system/network-online.target.wants# ip route
d-networkd-wait-online --ignore=lo
ignoring: lo
Event loop failed: Connection timed out
root at ubuntu:/etc/systemd/system/network-online.target.wants# ip route
root at ubuntu:/etc/systemd/system/network-online.target.wants# networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 ens3 ether off unmanaged
3 sit0 sit off unmanaged
3 links listed.
root at ubuntu:/etc/systemd/system/network-online.target.wants#
The system took 120 seconds to complete boot, because wait-online had to finish; and running wait-online from the system afterwards also waits 120 seconds (its default timeout). If there is no configuration for an interface, it's unmanaged (as shown by networkctl), so wait-online should not wait, and simply report that all interfaces are unmanaged, possibly returning an error so we don't reach network-online.
FWIW, having wait-online look up configuration might later be useful
also to figure out if an interface was configured, but marked as
optional (such that it is explicitly not required to be up at boot),
or if we want to configure network devices but specify that networkd
should *not* bring them online (like "administratively disabled"
interfaces in Cisco world using the "shutdown" command).
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1728181/+subscriptions
More information about the foundations-bugs
mailing list