Merge lp:~ltrager/maas-images/lp1791189 into lp:maas-images

Proposed by Lee Trager
Status: Merged
Merged at revision: 409
Proposed branch: lp:~ltrager/maas-images/lp1791189
Merge into: lp:maas-images
Prerequisite: lp:~ltrager/maas-images/add_missing_centos_packages
Diff against target: 26 lines (+9/-0)
1 file modified
curtin/centos7/finalize.py (+9/-0)
To merge this branch: bzr merge lp:~ltrager/maas-images/lp1791189
Reviewer Review Type Date Requested Status
Scott Moser (community) Approve
Review via email: mp+354842@code.launchpad.net

Commit message

Centos7: do not run finalize hook if curtin supports centos.

If curtin has the feature CENTOS_CURTHOOK_SUPPORT, then do not run
the 'finalize' hook, but let curtin handle it.

The finalize CentOS hook writes the MAAS OAUTH credentials to
90_datasource.cfg. The builtin Curtin hooks are writing the MAAS OAUTH
credentials to 50-cloudconfig-maas-reporting.cfg. Disable the finalize
hook when Curtin supports CENTOS_CURTHOOK_SUPPORT to avoid duplicated
data.

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

i re-formatted your description to be 74 chars wide and re-worded the subject line a bit.

please use that hwen you land and feel free to do so.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'curtin/centos7/finalize.py'
--- curtin/centos7/finalize.py 2016-05-11 18:47:46 +0000
+++ curtin/centos7/finalize.py 2018-09-13 08:14:17 +0000
@@ -11,6 +11,10 @@
11import sys11import sys
1212
13from curtin import util13from curtin import util
14try:
15 from curtin import FEATURES as curtin_features
16except ImportError:
17 curtin_features = []
1418
1519
16DATASOURCE_LIST = """\20DATASOURCE_LIST = """\
@@ -74,6 +78,11 @@
7478
7579
76def main():80def main():
81 # The builtin Curtin hooks handle writing the datasource as
82 # 50-cloudconfig-maas-reporting.cfg. Running this creates duplicated data
83 # at 90_datasource.cfg.
84 if 'CENTOS_CURTHOOK_SUPPORT' in curtin_features:
85 return
77 state = util.load_command_environment()86 state = util.load_command_environment()
78 target = state['target']87 target = state['target']
79 if target is None:88 if target is None:

Subscribers

People subscribed via source and target branches