cloudinit/net/sysconfig.py lacks support for openSUSE 15.x and Tumbleweed
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| cloud-init |
Fix Released
|
Medium
|
Unassigned | ||
Bug Description
On openSUSE 15.x and Tumbleweed, network config fails due to a missing network renderer. Adding 'opensuse-leap' and 'opensuse-
Please extend `KNOWN_DISTROS` to support newer versions of openSUSE.
Related branches
- Server Team CI bot: Approve (continuous-integration)
- Dan Watkins: Approve
-
Diff: 52 lines (+20/-3) 2 files modifiedapicloudinit/net/sysconfig.py (+2/-3)
tests/unittests/test_net.py (+18/-0)
Thanks for the bug report Thomas.
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="opensuse-
ID_LIKE="opensuse suse"
VERSION_
PRETTY_
ANSI_COLOR="0;32"
CPE_NAME=
BUG_REPORT_URL="https:/
HOME_URL="https:/
LOGO="distribut
tumble1:~ # cat /etc/sysconfig/
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth0
NM_CONTROLLED=no
ONBOOT=yes
STARTMODE=auto
TYPE=Ethernet
USERCTL=no
Note that cloud-init uses the 'variant' value to determine the distro:
tumble1:~ # python3 -c 'import pprint; from cloudinit import util; pprint.
{'dist': ('opensuse-
'platform': 'Linux-
'python': '3.7.3',
'release': '4.15.0-
'system': 'Linux',
'uname': uname_result(
'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.
- cloud-init.tar.gz Edit (15.7 KiB, application/x-tar)
Note that we modify sysconfig.py 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.
[1] https:/
That's really unfortunate (the hacking of cloud-init).
It looks like the sysconfig renderer uses:
# python3 -c 'from cloudinit import util; print(util.
opensuse-tumbleweed
To select the distro name, when it really should be using util.system_
This bug is fixed with commit 0948cdfb to cloud-init on branch master.
To view that commit see the following URL:
https:/
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.
Tracked in Github Issues as https:/