cloudinit/net/ lacks support for openSUSE 15.x and Tumbleweed

Bug #1843584 reported by Thomas Hipp
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

On openSUSE 15.x and Tumbleweed, network config fails due to a missing network renderer. Adding 'opensuse-leap' and 'opensuse-tumbleweed' to `KNOWN_DISTROS` solves the problem.

Please extend `KNOWN_DISTROS` to support newer versions of openSUSE.

Related branches

Revision history for this message
Paride Legovini (paride) wrote :

Thanks for the bug report Thomas.

Changed in cloud-init:
status: New → Triaged
Revision history for this message
Ryan Harper (raharper) wrote :

Can you provide the output from: sudo cloud-init collect-logs?

Launching an opensuse-tumbleweed instance on LXD shows that cloud-init does render network-config

tumble1:~ # cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20190909"
ID_LIKE="opensuse suse"
PRETTY_NAME="openSUSE Tumbleweed"

tumble1:~ # cat /etc/sysconfig/network/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.

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

Note that cloud-init uses the 'variant' value to determine the distro:

tumble1:~ # python3 -c 'import pprint; from cloudinit import util; pprint.pprint(util.system_info())'
{'dist': ('opensuse-tumbleweed', '20190909', 'x86_64'),
 'platform': 'Linux-4.15.0-58-generic-x86_64-with-glibc2.2.5',
 'python': '3.7.3',
 'release': '4.15.0-58-generic',
 'system': 'Linux',
 'uname': uname_result(system='Linux', node='tumble1', release='4.15.0-58-generic', version='#64~16.04.1-Ubuntu SMP Wed Aug 7 14:10:35 UTC 2019', machine='x86_64', processor='x86_64'),
 'variant': 'suse'}

So, opensuse and friends are reported to cloud-init as 'suse' which is in the list for rendering.

Let's see what's actually wrong in your instance after posting the cloud-init logs.

Revision history for this message
Thomas Hipp (monstermunchkin) wrote :

Note that we modify for our openSUSE cloud-init images to support Leap and Tumbleweed [1]. That might be the reason it works for you. If I change the string back to 'opensuse', it fails.


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

That's really unfortunate (the hacking of cloud-init).

It looks like the sysconfig renderer uses:

# python3 -c 'from cloudinit import util; print(util.get_linux_distro()[0])'

To select the distro name, when it really should be using util.system_info()['variant']

Changed in cloud-init:
importance: Undecided → Medium
Ryan Harper (raharper)
Changed in cloud-init:
status: Triaged → In Progress
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit 0948cdfb to cloud-init on branch master.
To view that commit see the following URL:

Changed in cloud-init:
status: In Progress → Fix Committed
Revision history for this message
Chad Smith (chad.smith) wrote : Fixed in cloud-init version 19.2-49.

This bug is believed to be fixed in cloud-init in version 19.2-49. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers