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/sysconfig.py (+4/-4)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Ryan Harper Approve
Review via email: mp+374621@code.launchpad.net

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
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1227/
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:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1227//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/sysconfig.py b/cloudinit/net/sysconfig.py
2index e381596..6717d92 100644
3--- a/cloudinit/net/sysconfig.py
4+++ b/cloudinit/net/sysconfig.py
5@@ -751,11 +751,11 @@ def available_sysconfig(target=None):
6
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
18
19
20 def available_nm(target=None):

Subscribers

People subscribed via source and target branches