Comment 13 for bug 1958377

Revision history for this message
Martin Steigerwald (ms-proact) wrote :

Dear Chad. That you very much for those very detailed comment about subiquity artifacts.

I did

root@ubuntutemplate:~# cloud-init clean --logs
root@ubuntutemplate:~# sudo rm -f /etc/netplan/00-installer-config.yaml /etc/cloud/cloud.cfg.d/curtin-preserve-sources.cfg /etc/cloud/cloud.cfg.d/99-installer.cfg /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg
root@ubuntutemplate:~# cloud-init clean --logs
root@ubuntutemplate:~# cloud-init clean

I do get "nocloud" as result for "cloud-id" now.

I also get a valid network configuration in '/etc/netplan/50-cloud-init.yaml' for the right MAC address.

Also NetPlan seems to apply it:

root@ubuntutemplate:~# ls -l /run/systemd/network/
total 8
-rw-r--r-- 1 root root 69 Feb 17 14:50 10-netplan-eth0.link
-rw-r--r-- 1 root root 158 Feb 17 14:50 10-netplan-eth0.network

However I got a long wait on "a start job is running for Waiting for Network to be Configured", an unconfigured network after it continues after about 2 minutes and this:

root@ubuntutemplate:~# systemctl --state=failed
  UNIT LOAD ACTIVE SUB DESCRIPTION
● systemd-networkd-wait-online.service loaded failed failed Wait for Network to be Configured

Excerpt from journalctl:

Feb 17 14:38:33 ubuntutemplate systemd-networkd[520]: Enumeration completed
Feb 17 14:38:33 ubuntutemplate systemd[1]: Started Network Service.
Feb 17 14:38:33 ubuntutemplate systemd[1]: Starting Wait for Network to be Configured...
Feb 17 14:38:33 ubuntutemplate systemd-networkd[520]: eth0: IPv6 successfully enabled
Feb 17 14:38:33 ubuntutemplate systemd-networkd[520]: eth0: DHCP6 CLIENT: Failed to set DUID: No such file or directory
Feb 17 14:38:33 ubuntutemplate systemd-networkd[520]: eth0: Failed
Feb 17 14:38:33 ubuntutemplate systemd[1]: Starting Network Name Resolution...
Feb 17 14:38:33 ubuntutemplate systemd-networkd-wait-online[521]: managing: eth0

Feb 17 14:40:33 ubuntutemplate systemd-networkd-wait-online[521]: Event loop failed: Connection timed out
Feb 17 14:40:33 ubuntutemplate systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Feb 17 14:40:33 ubuntutemplate systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Feb 17 14:40:33 ubuntutemplate systemd[1]: Failed to start Wait for Network to be Configured.

However I did not tell cloud-init to do anything about IPv6.

However I found

systemd, no internet after install [solved]
https://forums.gentoo.org/viewtopic-t-1144917.html

I verified and I did indeed not have an "/etc/machine-id".

So I did:

root@ubuntutemplate:~# systemd-machine-id-setup
Initializing machine ID from KVM UUID.

and now it works.

So okay, finally I have an solution. But is has been a very long way. And there are some open questions.

1) Why didn't the VM not have a machine-id to begin with?

2) And why on earth does Systemd fail to configure the network if there is no machine-id?

3) Why does it fail to configure at least the IPv4 part of the network, in case the IPv6 part does not work?

I bet there are detailed and complex answers to each of those, but with my admin hat I don't even want to know anymore. I bet I just have got another confirmation on why I use Devuan privately on all my servers and laptops.

Anyway, many thanks: Your detailed description helped me to use the problem I reported. I do believe that it should not be so complicated to do something like what I did and I am not to keen about the immense complexity involved. Keep things simple is a virtue!