Don't run config-download for --stack-only
We now seem to run config-download irrespective of the --stack-only flag. This moves the config-download related code within the if block. Change-Id: I0185cb54ac32e1ac8558d22ba4c735a02e80a470 Closes-Bug: #1887811
This commit is contained in:
parent
9c53cb3ef5
commit
5805ee4dbe
|
@ -1017,7 +1017,6 @@ class DeployOvercloud(command.Command):
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
if parsed_args.config_download:
|
if parsed_args.config_download:
|
||||||
print("Deploying overcloud configuration")
|
print("Deploying overcloud configuration")
|
||||||
deployment.set_deployment_status(
|
deployment.set_deployment_status(
|
||||||
|
@ -1026,52 +1025,52 @@ class DeployOvercloud(command.Command):
|
||||||
status='DEPLOYING'
|
status='DEPLOYING'
|
||||||
)
|
)
|
||||||
|
|
||||||
if not parsed_args.config_download_only:
|
if not parsed_args.config_download_only:
|
||||||
deployment.get_hosts_and_enable_ssh_admin(
|
deployment.get_hosts_and_enable_ssh_admin(
|
||||||
|
stack,
|
||||||
|
parsed_args.overcloud_ssh_network,
|
||||||
|
parsed_args.overcloud_ssh_user,
|
||||||
|
self.get_key_pair(parsed_args),
|
||||||
|
parsed_args.overcloud_ssh_port_timeout,
|
||||||
|
verbosity=utils.playbook_verbosity(self=self)
|
||||||
|
)
|
||||||
|
|
||||||
|
if parsed_args.config_download_timeout:
|
||||||
|
timeout = parsed_args.config_download_timeout
|
||||||
|
else:
|
||||||
|
used = int((time.time() - start) // 60)
|
||||||
|
timeout = parsed_args.timeout - used
|
||||||
|
if timeout <= 0:
|
||||||
|
raise exceptions.DeploymentError(
|
||||||
|
'Deployment timed out after %sm' % used)
|
||||||
|
|
||||||
|
deployment_options = {}
|
||||||
|
if parsed_args.deployment_python_interpreter:
|
||||||
|
deployment_options['ansible_python_interpreter'] = \
|
||||||
|
parsed_args.deployment_python_interpreter
|
||||||
|
|
||||||
|
deployment.config_download(
|
||||||
|
self.log,
|
||||||
|
self.clients,
|
||||||
stack,
|
stack,
|
||||||
parsed_args.overcloud_ssh_network,
|
parsed_args.overcloud_ssh_network,
|
||||||
parsed_args.overcloud_ssh_user,
|
parsed_args.output_dir,
|
||||||
self.get_key_pair(parsed_args),
|
parsed_args.override_ansible_cfg,
|
||||||
parsed_args.overcloud_ssh_port_timeout,
|
timeout=parsed_args.overcloud_ssh_port_timeout,
|
||||||
verbosity=utils.playbook_verbosity(self=self)
|
verbosity=utils.playbook_verbosity(self=self),
|
||||||
|
deployment_options=deployment_options,
|
||||||
|
in_flight_validations=parsed_args.inflight,
|
||||||
|
deployment_timeout=timeout,
|
||||||
|
tags=parsed_args.tags,
|
||||||
|
skip_tags=parsed_args.skip_tags,
|
||||||
|
limit_hosts=utils.playbook_limit_parse(
|
||||||
|
limit_nodes=parsed_args.limit
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
deployment.set_deployment_status(
|
||||||
if parsed_args.config_download_timeout:
|
clients=self.clients,
|
||||||
timeout = parsed_args.config_download_timeout
|
plan=stack.stack_name,
|
||||||
else:
|
status=deploy_status)
|
||||||
used = int((time.time() - start) // 60)
|
|
||||||
timeout = parsed_args.timeout - used
|
|
||||||
if timeout <= 0:
|
|
||||||
raise exceptions.DeploymentError(
|
|
||||||
'Deployment timed out after %sm' % used)
|
|
||||||
|
|
||||||
deployment_options = {}
|
|
||||||
if parsed_args.deployment_python_interpreter:
|
|
||||||
deployment_options['ansible_python_interpreter'] = \
|
|
||||||
parsed_args.deployment_python_interpreter
|
|
||||||
|
|
||||||
deployment.config_download(
|
|
||||||
self.log,
|
|
||||||
self.clients,
|
|
||||||
stack,
|
|
||||||
parsed_args.overcloud_ssh_network,
|
|
||||||
parsed_args.output_dir,
|
|
||||||
parsed_args.override_ansible_cfg,
|
|
||||||
timeout=parsed_args.overcloud_ssh_port_timeout,
|
|
||||||
verbosity=utils.playbook_verbosity(self=self),
|
|
||||||
deployment_options=deployment_options,
|
|
||||||
in_flight_validations=parsed_args.inflight,
|
|
||||||
deployment_timeout=timeout,
|
|
||||||
tags=parsed_args.tags,
|
|
||||||
skip_tags=parsed_args.skip_tags,
|
|
||||||
limit_hosts=utils.playbook_limit_parse(
|
|
||||||
limit_nodes=parsed_args.limit
|
|
||||||
)
|
|
||||||
)
|
|
||||||
deployment.set_deployment_status(
|
|
||||||
clients=self.clients,
|
|
||||||
plan=stack.stack_name,
|
|
||||||
status=deploy_status)
|
|
||||||
except Exception as deploy_e:
|
except Exception as deploy_e:
|
||||||
deploy_status = 'DEPLOY_FAILED'
|
deploy_status = 'DEPLOY_FAILED'
|
||||||
deploy_message = 'with error'
|
deploy_message = 'with error'
|
||||||
|
|
Loading…
Reference in New Issue