← Back to team overview

cloud-init-dev team mailing list archive

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


Robert Schweikert has proposed merging ~rjschwei/cloud-init:findsysconfrender into cloud-init:master.

Requested reviews:
  cloud-init Commiters (cloud-init-dev)
Related bugs:
  Bug #1849378 in cloud-init: "sysconfig renderer not detected on SLE distros"

For more details, see:

- Extend second step validation for sysconfig rendered to SUSE distros   
  + In addition to ifup/ifdown the sysconfig rendered looks for evidence that     the sysconfig 
    directory is properly populated. This secondary check only     considered RH specific location. 
    Expand the test to include SUSE specific     file.
Your team cloud-init Commiters is requested to review the proposed merge of ~rjschwei/cloud-init:findsysconfrender into cloud-init:master.
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
index e381596..6717d92 100644
--- a/cloudinit/net/sysconfig.py
+++ b/cloudinit/net/sysconfig.py
@@ -751,11 +751,11 @@ def available_sysconfig(target=None):
     expected_paths = [
-        'etc/sysconfig/network-scripts/ifdown-eth']
+        'etc/sysconfig/config']
     for p in expected_paths:
-        if not os.path.isfile(util.target_path(target, p)):
-            return False
-    return True
+        if os.path.isfile(util.target_path(target, p)):
+            return True
+    return False
 def available_nm(target=None):

Follow ups