sysconfig renderer not detected on SLE distros

Bug #1849378 reported by Robert Schweikert
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

Not sure why this is showing up now in a number of instances as the code has been there for quite some time. contains

def available_sysconfig(target=None):
    expected = ['ifup', 'ifdown']
    search = ['/sbin', '/usr/sbin']
    for p in expected:
        if not util.which(p, search=search, target=target):
            return False

    expected_paths = [
    for p in expected_paths:
        if not os.path.isfile(util.target_path(target, p)):
            return False
    return True

Meaning after we find ifup and ifdown the code also looks for files in "/etc/sysconfig/network-scripts" this directory does not exist on SUSE distros causing "available_sysconfig" to return always return "False".

Question is why is it necessary to check for the additional files? Could we simply check for "/etc/sysconfig"?

For now I added a patch in the SUSE package that modifies the first loop:

for p in expected:
   if not util.which(p, search=search, target=target):
       return False
    return True

Related branches

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

Hi Robert,

The extra file checks are meant to determine if the image is equipped to configure networking via sysconfig. In both RedHat and SuSE, the /etc/sysconfig directory is owned by the filesystem package and doesn't ensure that image would configure networking.

The paths present are RedHat centric, so we should extend that check the following on SuSE:

/etc/sysconfig/network/config # this is owned by the sysconfig package which provides the network config

And we can drop one of the files that we currently check, both are part of the network-scripts package on RedHat
which enables network-config via sysconfig files.

Changed in cloud-init:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Robert Schweikert (rjschwei) wrote :


Thanks for the background, MR pending.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

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

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

This bug is believed to be fixed in cloud-init in version 19.2-68. 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
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.