Comment 11 for bug 1843634

Revision history for this message
Ryan Harper (raharper) wrote :

That's this commit.

commit e0084a599d5259e507298175dad8a1e719017895
Author: Robert Schweikert <email address hidden>
Date: Wed Oct 24 14:34:50 2018 +0000

    systemd: On SUSE ensure cloud-init.service runs before wicked

    With db50bc0d9 the sysconfig renderer was enabled for
    openSUSE and SUSE Linux Enterprise. This requires that
    cloud-init.service starts before wicked.

    LP: #1799709

diff --git a/systemd/cloud-init.service.tmpl b/systemd/cloud-init.service.tmpl
index b92e8ab..5cb0037 100644
--- a/systemd/cloud-init.service.tmpl
+++ b/systemd/cloud-init.service.tmpl
@@ -14,8 +14,7 @@ After=networking.service
 After=network.service
 {% endif %}
 {% if variant in ["suse"] %}
-Requires=wicked.service
-After=wicked.service
+Before=wicked.service
 # setting hostname via hostnamectl depends on dbus, which otherwise
 # would not be guaranteed at this point.
 After=dbus.service

How cloud-init wants things to work is:

1) cloud-init-local.service runs before networking is up and then will use dhclient (dhcp-client) to temporarily bring up networking to crawl the IMDS to obtain the platform specific network config and write this out to the system

2) os networking starts/comes up

3) cloud-init.service waits for networking to be up runs right after the service, but before network-online.target

Cloud-init invokes dhclient directly in (1) and explicitly does not leave any state from running dhcp around in case that IMDS were to provide a conflicting network configuration; this also avoids starting OS networking services (like wicked) until cloud-init-local has written out the expected network config.

I'll let Robert respond here when he can, but I think we'd want to revert the commit above. The referenced bug number doesn't have any further details about what was or was not working without it.