← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~aromito/cloud-init:cloud-init-BZ_1673170 into cloud-init:master


Antonio Romito has proposed merging ~aromito/cloud-init:cloud-init-BZ_1673170 into cloud-init:master.

Commit message:
cloud-final.service (cloud-init modules --mode final) fail for "KeyError: 'modules-init'" after upgrade to version 18.2-1 in RHEL7.6

Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:

I added a check in the cloudinit/cmd/main.py to check if all modes are present into the v1 array before accessing it:

[root@rhvm ~]# diff -u /usr/lib/python2.7/site-packages/cloudinit/cmd/main.py /usr/lib/python2.7/site-packages/cloudinit/cmd/main.py.fixed 
--- /usr/lib/python2.7/site-packages/cloudinit/cmd/main.py	2018-03-27 14:49:38.000000000 -0400
+++ /usr/lib/python2.7/site-packages/cloudinit/cmd/main.py.fixed	2019-02-06 15:17:45.128944937 -0500
@@ -676,8 +676,9 @@
         # write the 'finished' file
         errors = []
         for m in modes:
-            if v1[m]['errors']:
-                errors.extend(v1[m].get('errors', []))
+            if m in v1:
+                if v1[m]['errors']:
+                    errors.extend(v1[m].get('errors', []))
             result_path, {'v1': {'datasource': v1['datasource'],

Your team cloud-init commiters is requested to review the proposed merge of ~aromito/cloud-init:cloud-init-BZ_1673170 into cloud-init:master.