From 9dec1b2e334e110b03f951c9fd3480f6c3dc8e11 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Tue, 28 Jul 2020 10:35:14 -0400 Subject: [PATCH] overcloud_deploy: move horizon url/rc files before config-download When a deployment fails, we run the playbooks to generate horizon URL & RC files anyway. However it is confusing to have them at the end, after the actual trace and an operator with a small screen won't see the actual errors easily. Let's just move these actions before the config download execution, which has no impact anyway; but will improve logging a lot. Change-Id: I70bbc40f8e5eb709d9f0f608e936a818e082918b Related-Bug: #1889212 --- tripleoclient/v1/overcloud_deploy.py | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tripleoclient/v1/overcloud_deploy.py b/tripleoclient/v1/overcloud_deploy.py index 87642cd97..a5a4ed85f 100644 --- a/tripleoclient/v1/overcloud_deploy.py +++ b/tripleoclient/v1/overcloud_deploy.py @@ -1040,6 +1040,18 @@ class DeployOvercloud(command.Command): return try: + # Force fetching of attributes + stack.get() + + rcpath = deployment.create_overcloudrc( + container=stack.stack_name, + no_proxy=parsed_args.no_proxy) + + overcloud_endpoint = utils.get_overcloud_endpoint(stack) + + horizon_url = deployment.get_horizon_url( + stack=stack.stack_name) + if parsed_args.config_download: print("Deploying overcloud configuration") deployment.set_deployment_status( @@ -1104,29 +1116,17 @@ class DeployOvercloud(command.Command): status=deploy_status ) finally: - # Force fetching of attributes - stack.get() - - rcpath = deployment.create_overcloudrc( - container=stack.stack_name, - no_proxy=parsed_args.no_proxy) - - # Copy clouds.yaml to the cloud user directory - user = \ - getpwuid(os.stat(constants.CLOUD_HOME_DIR).st_uid).pw_name - utils.copy_clouds_yaml(user) - utils.create_tempest_deployer_input() - # Run postconfig on create or force. Use force to makes sure # endpoints are created with deploy reruns and upgrades if (stack_create or parsed_args.force_postconfig and not parsed_args.skip_postconfig): self._deploy_postconfig(stack, parsed_args) - overcloud_endpoint = utils.get_overcloud_endpoint(stack) - - horizon_url = deployment.get_horizon_url( - stack=stack.stack_name) + # Copy clouds.yaml to the cloud user directory + user = \ + getpwuid(os.stat(constants.CLOUD_HOME_DIR).st_uid).pw_name + utils.copy_clouds_yaml(user) + utils.create_tempest_deployer_input() print("Overcloud Endpoint: {0}".format(overcloud_endpoint)) print("Overcloud Horizon Dashboard URL: {0}".format(