cloudinit/net/sysconfig.py lacks support for openSUSE 15.x and Tumbleweed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| cloud-init |
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) on 2019-09-26
- Dan Watkins: Approve on 2019-09-26
-
Diff: 52 lines (+20/-3)2 files modifiedcloudinit/net/sysconfig.py (+2/-3)
tests/unittests/test_net.py (+18/-0)
Ryan Harper (raharper) wrote : | #2 |
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
Ryan Harper (raharper) wrote : | #3 |
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.
Thomas Hipp (monstermunchkin) wrote : | #4 |
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:/
Ryan Harper (raharper) wrote : | #5 |
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_
Changed in cloud-init: | |
importance: | Undecided → Medium |
Changed in cloud-init: | |
status: | Triaged → In Progress |
This bug is fixed with commit 0948cdfb to cloud-init on branch master.
To view that commit see the following URL:
https:/
Changed in cloud-init: | |
status: | In Progress → Fix Committed |
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 |
Thanks for the bug report Thomas.