Bug 1154092 - cloud-init: datasource ConfigDrive fails
cloud-init: datasource ConfigDrive fails
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: Cloud:Tools
Leap 15.1
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: SUSE Public Cloud Maintainer
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-15 14:50 UTC by Eugen Block
Modified: 2020-05-05 19:19 UTC (History)
2 users (show)

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


Attachments
cloud-init.log (76.79 KB, text/x-log)
2019-10-15 14:50 UTC, Eugen Block
Details
cloud-init-output.log (3.95 KB, text/x-log)
2019-10-15 14:50 UTC, Eugen Block
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugen Block 2019-10-15 14:50:06 UTC
Created attachment 821579 [details]
cloud-init.log

leap15-1-cloudinit:~ # rpm -qa | grep cloud-init
cloud-init-config-suse-19.1-lp151.2.6.1.x86_64
cloud-init-19.2-lp151.3.1.x86_64

While setting up a new Leap 15.1 image for our OpenStack cloud we noticed failing datasource "ConfigDrive" in cloud-init version 19.1. We have to cover two different scenarios, neutron metadata (self-service networks, datasource "OpenStack") and config drive (provider networks). Datasource OpenStack works fine, not complaints, but ConfigDrive fails to configure the network, the following error message occurs during stage cloud-init-local:

> Unable to render networking. Network config is likely broken: No available network renderers found. Searched through list: ['eni', 'sysconfig', 'netplan']

Testing version 19.2 from http://download.opensuse.org/repositories/Cloud:/Tools:/Next/openSUSE_Leap_15.1/ results in the same error message.

cloud-init logs are attached.
Comment 1 Eugen Block 2019-10-15 14:50:38 UTC
Created attachment 821580 [details]
cloud-init-output.log
Comment 2 Robert Schweikert 2019-10-21 18:26:49 UTC
Is this the same image but with 2 different cloud.cfg files?

The message is not related to using config drive, the code cannot determine in which configuration the network should be written out.

In order to find the proper rendering mechanism (the way the network configuration is written) for the network configuration code searches for specific commands to be available. For openSUSE and SLE, or in general to use the code that writes entries for "sysconfig" cloud-init looks for the 'ifup' and 'ifdown' commands.

In this case it appears as if these command are missing from the image being tested. This would trigger the error message shown in the initial comment.

It is known that the proper network writing code is selected for images with the 'ifup' and 'ifdown' commands included.

This suggests an issue with the image.
Comment 3 Eugen Block 2019-10-22 05:36:57 UTC
(In reply to Robert Schweikert from comment #2)
> Is this the same image but with 2 different cloud.cfg files?

No, these are both log files written by cloud-init during the same boot process of one instance. 

> The message is not related to using config drive, the code cannot determine
> in which configuration the network should be written out.
> 
> In order to find the proper rendering mechanism (the way the network
> configuration is written) for the network configuration code searches for
> specific commands to be available. For openSUSE and SLE, or in general to
> use the code that writes entries for "sysconfig" cloud-init looks for the
> 'ifup' and 'ifdown' commands.
> 
> In this case it appears as if these command are missing from the image being
> tested. This would trigger the error message shown in the initial comment.
> 
> It is known that the proper network writing code is selected for images with
> the 'ifup' and 'ifdown' commands included.
> 
> This suggests an issue with the image.

This image contains both commands:

leap15-1-cloudinit:~ # which ifup 
/sbin/ifup
leap15-1-cloudinit:~ # which ifdown 
/sbin/ifdown
leap15-1-cloudinit:~ # 


Running those commands manually after cloud-init has finished (unsuccessfully) did work in a previous version of cloud-init, but it doesn't with Leap 15.1.
Comment 4 Robert Schweikert 2019-10-22 20:02:56 UTC
Can you please try again with the latest build from Cloud:Tools?

There is a condition in determining the sysconfig renderer that also required some file we do not have on openSUSE SLE. I added a patch to short circuit this condition. That should fix the issue with the renderer not being found.
Comment 5 Swamp Workflow Management 2019-10-22 23:20:14 UTC
This is an autogenerated message for OBS integration:
This bug (1154092) was mentioned in
https://build.opensuse.org/request/show/741941 Factory / cloud-init
Comment 7 Eugen Block 2019-10-23 14:57:24 UTC
(In reply to Robert Schweikert from comment #4)
> Can you please try again with the latest build from Cloud:Tools?
> 
> There is a condition in determining the sysconfig renderer that also
> required some file we do not have on openSUSE SLE. I added a patch to short
> circuit this condition. That should fix the issue with the renderer not
> being found.

That looks good, the instance is configured correctly both via datasources OpenStack and ConfigDrive. Thanks!
Comment 9 Swamp Workflow Management 2019-11-28 20:12:54 UTC
SUSE-SU-2019:3097-1: An update that solves one vulnerability and has 6 fixes is now available.

Category: security (moderate)
Bug References: 1099358,1129124,1136440,1142988,1144363,1151488,1154092
CVE References: CVE-2019-0816
Sources used:
SUSE Linux Enterprise Module for Public Cloud 15 (src):    cloud-init-19.2-5.18.1
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src):    cloud-init-19.2-5.18.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 10 Swamp Workflow Management 2019-11-28 20:19:30 UTC
SUSE-SU-2019:3096-1: An update that solves one vulnerability and has 6 fixes is now available.

Category: security (moderate)
Bug References: 1099358,1129124,1136440,1142988,1144363,1151488,1154092
CVE References: CVE-2019-0816
Sources used:
SUSE Linux Enterprise Module for Public Cloud 15-SP1 (src):    cloud-init-19.2-8.11.1
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15-SP1 (src):    cloud-init-19.2-8.11.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 11 Robert Schweikert 2019-11-29 09:51:06 UTC
Fixed
Comment 12 Swamp Workflow Management 2019-12-04 05:11:56 UTC
openSUSE-SU-2019:2633-1: An update that solves one vulnerability and has 6 fixes is now available.

Category: security (moderate)
Bug References: 1099358,1129124,1136440,1142988,1144363,1151488,1154092
CVE References: CVE-2019-0816
Sources used:
openSUSE Leap 15.1 (src):    cloud-init-19.2-lp151.2.9.1
Comment 13 Swamp Workflow Management 2019-12-05 20:12:46 UTC
SUSE-SU-2019:3191-1: An update that solves one vulnerability and has 6 fixes is now available.

Category: security (moderate)
Bug References: 1099358,1129124,1136440,1142988,1144363,1151488,1154092
CVE References: CVE-2019-0816
Sources used:
SUSE Linux Enterprise Module for Public Cloud 12 (src):    cloud-init-19.2-37.33.1
SUSE CaaS Platform 3.0 (src):    cloud-init-19.2-37.33.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.