Comment 16 for bug 1996007

Revision history for this message
Frank Heimes (fheimes) wrote :

Well, on this system you got an IP address after boot, that is indicated by log line:
"[ 133.968355] cloud-init[1070]: ci-info: | enc1000.1300 | False | 10.20.103.32 | 255.255.255.0 | global | 82:ca:fd:00"

And the very first command you've executed after you've logged in is "ip addr" that had the output:
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: enc1000: mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 82:ca:fd:00:f9:1e brd ff:ff:ff:ff:ff:ff
3: enc7400: mtu 32768 qdisc noop state DOWN group default qlen 1000
    link/ether 86:ca:fd:00:7e:72 brd ff:ff:ff:ff:ff:ff
4: enc1000.1300@enc1000: mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 82:ca:fd:00:f9:1e brd ff:ff:ff:ff:ff:ff
    inet 10.20.103.32/24 brd 10.20.103.255 scope global enc1000.1300

Again under "4:" interface "enc1000.1300@enc1000" there the ip: "10.20.103.32".
So this system definitely got an ip address!

I see that you have another interface defined here (enc7400),
and by default systemd-networkd is waiting until ALL interfaces are properly configured and up (this is done by service "systemd-networkd-wait-online", that is called one-off during boot).
In case enc7400 has no link or takes to long, networkd-systemd waits for quite some time (2min), indicated by messages like this "A start job is running for Wait for".

You can avoid such a potential delay by adding "--all" to "systemd-networkd-wait-online".
So edit the service:
sudo systemctl edit systemd-networkd-wait-online.service
and make sure it contains the following three lines:
"
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any
"
(There are two 'ExecStart' lines by intention, the first one is to clear any previous content.)
Run "sudo systemctl daemon-reload" afterwards to active the config change.

(Alternatively you may add "optional: true" to the interface that may come up late (or sometimes not at all) in your netplan yaml - if it's configured there.)