Don't fail on warnings in docker-cmd

It seems that during the undercloud upgrade heat-config can be empty,
and if it is, the heat-config-docker-cmd hook returns 1 and makes
os-refresh-config fail, consequently failing the undercloud upgrade.

Change-Id: Ia62e40e05f46e7e4450c6b230ddeec9b861e99bd
Related-Bug: #1648249
Closes-Bug: #1692899
This commit is contained in:
Jiri Stransky 2017-05-23 16:05:20 +02:00
parent 3a86f8789c
commit 3eb25e7df3
1 changed files with 2 additions and 2 deletions

View File

@ -39,13 +39,13 @@ def main(argv=sys.argv):
if not os.path.exists(CONF_FILE):
log.warning('No config file %s' % CONF_FILE)
return 1
return 0
try:
configs = json.load(open(CONF_FILE))
except ValueError as e:
log.warning('Could not load config json: %s' % e)
return 1
return 0
cmd_config_ids = [c['id'] for c in configs
if c['group'] == 'docker-cmd']