Bug 1099340 - cloud-init-config-suse defaults to ubuntu
cloud-init-config-suse defaults to ubuntu
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other
Current
All openSUSE Factory
: P5 - None : Major (vote)
: ---
Assigned To: Bernhard Wiedemann
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-06-27 15:44 UTC by Bernhard Wiedemann
Modified: 2019-08-01 13:16 UTC (History)
2 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Wiedemann 2018-06-27 15:44:39 UTC
I had a Factory OpenStack Cloud VM that did not bring up its eth0
because STARTMODE=auto
was missing in /etc/sysconfig/network/ifcfg-eth0
because /etc/cloud/cloud.cfg from cloud-init-config-suse-18.2-3.1.x86_64
contained

system_info:
   # This will affect which distro class gets used
   # Unknown/fallback distro.
   distro: ubuntu


Maybe also affects Leap15.

Will submit a simple workaround to Cloud:Tools/cloud-init
Comment 2 Bernhard Wiedemann 2018-06-28 13:29:51 UTC
in addition, it seems we need to append a
   default_user:
     name: opensuse

otherwise cloudinit/config/cc_ssh.py will lock the root account
redirecting to the "NONE" user

We could avoid that in general with

--- a/cloudinit/config/cc_ssh.py
+++ b/cloudinit/config/cc_ssh.py
@@ -203,9 +203,7 @@ def apply_credentials(keys, user, disable_root, disable_root_opts):
     if user:
         ssh_util.setup_user_keys(keys, user)
 
-    if disable_root:
-        if not user:
-            user = "NONE"
+    if disable_root and user:
         key_prefix = disable_root_opts.replace('$USER', user)
     else:
         key_prefix = ''

or are there cases where the NONE is useful?
commit bbbaeca0c375dc166ef8ffe0598d5f384b722c00 does not explain it well
Comment 3 Robert Schweikert 2018-07-07 13:05:36 UTC
You fixed the issue with the config thanks.

I reverted the change os the user. By default we do not want root enabled for login. It is the image builders responsibility to modify cloud.cfg as they see fit. I reverted that change.
Comment 6 Swamp Workflow Management 2018-12-28 20:16:22 UTC
SUSE-RU-2018:4288-1: An update that has 7 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1087331,1095627,1097388,1099340,1101894,1111427,1114160
CVE References: 
Sources used:
SUSE Linux Enterprise Module for Public Cloud 15 (src):    cloud-init-18.4-5.3.3
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src):    cloud-init-18.4-5.3.3
Comment 7 Swamp Workflow Management 2018-12-29 14:10:32 UTC
openSUSE-RU-2018:4303-1: An update that has 7 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1087331,1095627,1097388,1099340,1101894,1111427,1114160
CVE References: 
Sources used:
openSUSE Leap 15.0 (src):    cloud-init-18.4-lp150.2.9.1
Comment 16 Swamp Workflow Management 2019-06-27 13:14:03 UTC
SUSE-RU-2019:1715-1: An update that has 15 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1087331,1095627,1097388,1099340,1101894,1111427,1114160,1116767,1119397,1121878,1123694,1125950,1125992,1126101,1132692
CVE References: 
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP4 (src):    dhcp-4.3.3-10.16.4
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    dhcp-4.3.3-10.16.4
SUSE Linux Enterprise Server 12-SP4 (src):    dhcp-4.3.3-10.16.4
SUSE Linux Enterprise Server 12-SP3 (src):    dhcp-4.3.3-10.16.4
SUSE Linux Enterprise Module for Public Cloud 12 (src):    cloud-init-18.5-37.21.1
SUSE Linux Enterprise Desktop 12-SP4 (src):    dhcp-4.3.3-10.16.4
SUSE Linux Enterprise Desktop 12-SP3 (src):    dhcp-4.3.3-10.16.4
SUSE CaaS Platform 3.0 (src):    cloud-init-18.5-37.21.1, dhcp-4.3.3-10.16.4
OpenStack Cloud Magnum Orchestration 7 (src):    cloud-init-18.5-37.21.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 17 Swamp Workflow Management 2019-07-01 10:13:46 UTC
openSUSE-RU-2019:1681-1: An update that has 15 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1087331,1095627,1097388,1099340,1101894,1111427,1114160,1116767,1119397,1121878,1123694,1125950,1125992,1126101,1132692
CVE References: 
Sources used:
openSUSE Leap 42.3 (src):    cloud-init-18.5-40.1, dhcp-4.3.3-11.9.1