Make runs reproducible when using --answer-file

Until now, using --answer-file could lead to small changes that
made runs non-reproducible. This patch aims at fixing that with
the following changes:

- Overwrite the answer file passed as a parameter with the
  processed answers. This is useful when enabling features that are
  not there by default, and end up with PW_PLACEHOLDER value in
  some variables.
- Make sure CONFIG_HEAT_AUTH_ENC_KEY is respected if entered in
  answer file.
- Make sure nova migration keys are not regenerated if already
  present.

Change-Id: I6837a2973aed9d29d6c44ac64b510f91b80f878a
This commit is contained in:
Javier Pena
2015-10-09 13:11:13 +02:00
parent b3b71a28c4
commit cbbf46e6af
3 changed files with 10 additions and 5 deletions

View File

@@ -639,6 +639,10 @@ def _main(options, configFile=None, logFile=None):
path = _getanswerfilepath()
if path:
generateAnswerFile(path)
# If an answer file was provided, some options may have been overriden
# Overwrite answer file with updated options
else:
generateAnswerFile(options.answer_file)
# Update masked_value_list with user input values
_updateMaskedValueSet()