[Bug 1203393] New: microOS cloud-init (OpenStack variant) fails due to attempting systemd-network over NetworkManager
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393 Bug ID: 1203393 Summary: microOS cloud-init (OpenStack variant) fails due to attempting systemd-network over NetworkManager Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: aarch64 OS: openSUSE Tumbleweed Status: NEW Severity: Major Priority: P5 - None Component: MicroOS Assignee: kubic-bugs@opensuse.org Reporter: matt@traverse.com.au QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0 Build Identifier: When using an OpenStack-ContainerHost [aarch64] microOS Tumbleweed build (from https://en.opensuse.org/Portal:MicroOS), cloud-init will fail as it tries to create a file with a systemd-network UID. Despite NetworkManager being the microOS 'default', and systemd-network not being installed, cloud-init decides to create for systemd-networkd You do not even need to have a valid cloud-init source for this, the issue will occur on a 'fresh' system, verified by examining the log files after first boot ---------------------------------------------- 2022-09-14 06:54:40,414 - util.py[DEBUG]: Writing to /etc/systemd/network/10-cloud-init-eth0.network - wb: [644] 69 bytes 2022-09-14 06:54:40,416 - util.py[WARNING]: failed stage init-local 2022-09-14 06:54:40,417 - util.py[DEBUG]: failed stage init-local Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/cloudinit/util.py", line 1430, in chownbyname uid = pwd.getpwnam(user).pw_uid KeyError: "getpwnam(): name not found: 'systemd-network'" The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/cloudinit/cmd/main.py", line 689, in status_wrapper ret = functor(name, args) File "/usr/lib/python3.10/site-packages/cloudinit/cmd/main.py", line 398, in main_init init.apply_network_config(bring_up=bring_up_interfaces) [edited for brevity, I will attach the full log separately] OSError: Unknown user or group: "getpwnam(): name not found: 'systemd-network'" ---------------------------------------------- I built a custom microOS image (see https://build.opensuse.org/package/revisions/home:mcbridematt:branches:devel... ) with systemd-network installed and verified this "resolves" the issue. However, I haven't tried to diagnose why cloud-init wants to use networkd over NetworkManager. Reproducible: Always Steps to Reproduce: 1. Boot a microOS Tumbleweed VM with a cloud-init file (e.g cidata image) 2. Attempt to use system once it reaches the login prompt (for example, using credentials or SSH keys set in the supplied cloud-config) Actual Results: Login fails because cloud-init did not complete. No mention of the cloud-init failure is provided to the user at the console (except maybe the hostname not being configured by cloud-init) , it can only be discovered by examining the /var partition offline. The specific image I am using is: openSUSE-MicroOS.aarch64-16.0.0-OpenStack-Cloud-Snapshot20220911.qcow2 -- You are receiving this mail because: You are the assignee for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393#c1
--- Comment #1 from Mathew McBride
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393#c2
--- Comment #2 from Mathew McBride
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393#c3
Martin Petersen
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393#c4
Hans Rakers
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393#c5
--- Comment #5 from Hans Rakers
The problem belongs to an old cloud-init version used by MicroOS. This old version does not have support for NetworkManager. I build an actual version of cloud-init (22.3.4) and all works fine for me. The version can be downloaded from the opensuse build system: https://build.opensuse.org/package/show/home%3Amartux69/cloud-init
I just tested this package and it instantly solved all my networking problems. Thank you! I've been struggling with the network intermittently not coming up, and thus being unable to contact the metadata service of my cloud, resulting in a dead instance. I've tried everything from systemd drop-ins to creating a /etc/NetworkManager/NetworkManager.conf to convince cloud-init to look at the sysconfig renderer, to no avail. This newer cloud-init package is the answer. -- You are receiving this mail because: You are the assignee for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393#c6
--- Comment #6 from Hans Rakers
(In reply to Martin Petersen from comment #3)
The problem belongs to an old cloud-init version used by MicroOS. This old version does not have support for NetworkManager. I build an actual version of cloud-init (22.3.4) and all works fine for me. The version can be downloaded from the opensuse build system: https://build.opensuse.org/package/show/home%3Amartux69/cloud-init
I just tested this package and it instantly solved all my networking problems. Thank you!
I've been struggling with the network intermittently not coming up, and thus being unable to contact the metadata service of my cloud, resulting in a dead instance. I've tried everything from systemd drop-ins to creating a /etc/NetworkManager/NetworkManager.conf to convince cloud-init to look at the sysconfig renderer, to no avail. This newer cloud-init package is the answer.
This newer package still has 'After=wicked.service' in `/usr/lib/systemd/system/cloud-init.service` so i still need a drop-in that has the following: # cat /etc/systemd/system/cloud-init.service.d/boot-order.conf [Unit] After=NetworkManager.service After=NetworkManager-wait-online.service -- You are receiving this mail because: You are the assignee for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393
http://bugzilla.opensuse.org/show_bug.cgi?id=1203393#c7
Martin Petersen
http://bugzilla.suse.com/show_bug.cgi?id=1203393
http://bugzilla.suse.com/show_bug.cgi?id=1203393#c11
Enno Gotthold
participants (1)
-
bugzilla_noreply@suse.com