Comment 13 for bug 1950039

Revision history for this message
Julian Andres Klode (juliank) wrote :

I don't believe your reproducer is valid - cloud-init is not installed anymore, as autopkgtest-buildvm-ubuntu-cloud removes it when building the VM, whereas it remains on the cloud images, as it's needed there to actually get the IP address during boot.

Removing the DefaultDependencies=no means that ufw.service is After=basic.target After=sysinit.target. cloud-init.service has Before=sysinit.target, so would have to run before ufw.service.

It is After=systemd-networkd-wait-online.service though which is After=systemd-networkd which is After=network-pre.target.

So there's the cycle, we need to run cloud-init After=network-pre (hence After ufw), but determined before that cloud-init needs to run before sysinit.target, which needs to run before ufw.service.

I can't reproduce the issue in a VM right now, though, because um, cloud-init does not seem to start at all during second boot despite seemingly being enabled.