← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~smoser/cloud-init:fix/1787459-fix-ds-sys_cfg into cloud-init:master

 

Scott Moser has proposed merging ~smoser/cloud-init:fix/1787459-fix-ds-sys_cfg into cloud-init:master.

Commit message:
stages: Fix bug causing datasource to have incorrect sys_cfg.

The Init object had a bug/odd side effect where when retrieving a distro
object it would update the datasources's sys_cfg.  That was probably
intended to refresh the possibly stale config stored there.  Unfortunately
what it actually did limit the config there to the 'system_info' top level
key where initially it had the whole config.

LP: #1787459

Requested reviews:
  cloud-init commiters (cloud-init-dev)
Related bugs:
  Bug #1787459 in cloud-init: "datasource.sys_cfg gets different values in local stage and after."
  https://bugs.launchpad.net/cloud-init/+bug/1787459

For more details, see:
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/355004

see commit message
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:fix/1787459-fix-ds-sys_cfg into cloud-init:master.
diff --git a/cloudinit/stages.py b/cloudinit/stages.py
index ef5c699..0a1f885 100644
--- a/cloudinit/stages.py
+++ b/cloudinit/stages.py
@@ -88,7 +88,6 @@ class Init(object):
             # from whatever it was to a new set...
             if self.datasource is not NULL_DATA_SOURCE:
                 self.datasource.distro = self._distro
-                self.datasource.sys_cfg = system_config
         return self._distro
 
     @property

Follow ups