Do not failed update if no container registry is set

When the init minor update step is run without any
container registry file, the cli should not raise
an exception. We should accept to run it, even if
the container won't be update. It could be usefull
for only run package update on the env.

Change-Id: I73d86d1ec61b9bb6d5f4a5ea8a9bc545ac963420
Closes-Bug: #1730687
This commit is contained in:
Mathieu Bultel 2017-11-07 16:51:11 +01:00
parent 61ddfc32fb
commit a7166208b7
1 changed files with 7 additions and 3 deletions

View File

@ -101,9 +101,13 @@ class UpdateOvercloud(command.Command):
with open(os.path.abspath(container_registry)) as content:
registry = yaml.load(content.read())
else:
raise exceptions.InvalidConfiguration(
"You need to provide a container registry file in order "
"to update your current containers deployed.")
self.log.warning(
"You have not provided a container registry file. Note "
"that none of the containers on your environement will be "
"updated. If you want to update your container you have "
"to re-run this command and provide the registry file "
"with: --container-registry-file option.")
registry = None
# Execute minor update
package_update.update(clients, container=stack_name,
container_registry=registry,