Merge ~rjschwei/cloud-init:findsysconfrender into cloud-init:master

Proposed by Robert Schweikert
Status: Merged
Approved by: Ryan Harper
Approved revision: 150d691332ce035c1aa2d2431d3a4dc7d14f61c4
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~rjschwei/cloud-init:findsysconfrender
Merge into: cloud-init:master
Diff against target: 20 lines (+4/-4)
1 file modified
cloudinit/net/ (+4/-4)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Ryan Harper Approve
Review via email:

Description of the change

net/sysconfig: fix available check on SUSE distros

In addition to ifup/ifdown the sysconfig renderer looks for
evidence that the sysconfig directory is properly populated.
This secondary check only considered RedHat specific location.
Fix this by adding a SUSE specific file and returning True if
either RedHat or SUSE file is present.

LP: #1849378

To post a comment you must log in.
Revision history for this message
Ryan Harper (raharper) wrote :

Thanks Robert! This looks good to me.

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

PASSED: Continuous integration, rev:150d691332ce035c1aa2d2431d3a4dc7d14f61c4
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/net/ b/cloudinit/net/
2index e381596..6717d92 100644
3--- a/cloudinit/net/
4+++ b/cloudinit/net/
5@@ -751,11 +751,11 @@ def available_sysconfig(target=None):
7 expected_paths = [
8 'etc/sysconfig/network-scripts/network-functions',
9- 'etc/sysconfig/network-scripts/ifdown-eth']
10+ 'etc/sysconfig/config']
11 for p in expected_paths:
12- if not os.path.isfile(util.target_path(target, p)):
13- return False
14- return True
15+ if os.path.isfile(util.target_path(target, p)):
16+ return True
17+ return False
20 def available_nm(target=None):


People subscribed via source and target branches