diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-08-04 21:50:08 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-08-04 21:50:08 -0500 |
commit | 9f49cf601fd7bedb429d2bfcd7e877c9ed5f3690 (patch) | |
tree | b487c3c5eeb2c005b17759cb56851e104c2f0511 /cloudinit/stages.py | |
parent | 0fdba48edab8bc4894d90e43fcca977f21bbd202 (diff) | |
download | vyos-cloud-init-9f49cf601fd7bedb429d2bfcd7e877c9ed5f3690.tar.gz vyos-cloud-init-9f49cf601fd7bedb429d2bfcd7e877c9ed5f3690.zip |
fix all tests (were broken due to copied code call to userdata twice
Diffstat (limited to 'cloudinit/stages.py')
-rw-r--r-- | cloudinit/stages.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/cloudinit/stages.py b/cloudinit/stages.py index 42989bb4..7b489b9f 100644 --- a/cloudinit/stages.py +++ b/cloudinit/stages.py @@ -243,14 +243,14 @@ class Init(object): return self.datasource with reporting.ReportEventStack( - name="check-cache", description="attempting to read from cache", - parent=self.reporter) as myrep: - ds = self._restore_from_cache() - if ds: - LOG.debug("Restored from cache, datasource: %s", ds) - myrep.description = "restored from cache" - else: - myrep.description = "no cache found" + name="check-cache", description="attempting to read from cache", + parent=self.reporter) as myrep: + ds = self._restore_from_cache() + if ds: + LOG.debug("Restored from cache, datasource: %s", ds) + myrep.description = "restored from cache" + else: + myrep.description = "no cache found" if not ds: (cfg_list, pkg_list) = self._get_datasources() # Deep copy so that user-data handlers can not modify @@ -515,7 +515,7 @@ class Init(object): with reporting.ReportEventStack( "consume-vendor-data", "reading and applying vendor-data", parent=self.reporter): - self._consume_userdata(frequency) + self._consume_vendordata(frequency) # Perform post-consumption adjustments so that # modules that run during the init stage reflect @@ -593,6 +593,10 @@ class Modules(object): self.cfg_files = cfg_files # Created on first use self._cached_cfg = None + if reporter is None: + reporter = reporting.ReportEventStack( + name="module-reporter", description="module-desc", + reporting_enabled=False) self.reporter = reporter @property |