From 7c0ad1df5e49358299cea3cd15ccdd6d2c54271d Mon Sep 17 00:00:00 2001 From: Michael Henkel Date: Tue, 16 Jan 2018 15:50:35 +0100 Subject: [PATCH] Composable role and service fails workflow When defining a resource_registry for a composable service, the workflow fails because it validates before the user-environment is added. This patch moves the workflow invocation after the creation of the user- environment. This is caused by https://review.openstack.org/#/c/511249/ which changes the behaviour of the action in tripleo-common. Change-Id: Idf17e3f817708d9e7dd7241063434ce56b6be052 Closes-Bug: 1743575 --- .../notes/bug-1743575-dcacfa668eaf51a6.yaml | 6 ++++++ tripleoclient/v1/overcloud_deploy.py | 17 +++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 releasenotes/notes/bug-1743575-dcacfa668eaf51a6.yaml diff --git a/releasenotes/notes/bug-1743575-dcacfa668eaf51a6.yaml b/releasenotes/notes/bug-1743575-dcacfa668eaf51a6.yaml new file mode 100644 index 000000000..94bde9358 --- /dev/null +++ b/releasenotes/notes/bug-1743575-dcacfa668eaf51a6.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + This patch fixes https://bugs.launchpad.net/tripleo/+bug/1743575 + The bug prevents a successeful stack creation when using a custom role with + a composable service. diff --git a/tripleoclient/v1/overcloud_deploy.py b/tripleoclient/v1/overcloud_deploy.py index 2b6bc6fa6..33958f7ce 100644 --- a/tripleoclient/v1/overcloud_deploy.py +++ b/tripleoclient/v1/overcloud_deploy.py @@ -319,14 +319,8 @@ class DeployOvercloud(command.Command): path = path[1:] env['resource_registry'][name] = path - # Parameters are removed from the environment and sent to the update - # parameters action, this stores them in the plan environment and - # means the UI can find them. - if 'parameter_defaults' in env: - params = env.pop('parameter_defaults') - workflow_params.update_parameters( - self.workflow_client, container=container_name, - parameters=params) + # Parameters are removed from the environment + params = env.pop('parameter_defaults', None) contents = yaml.safe_dump(env, default_flow_style=False) @@ -348,6 +342,13 @@ class DeployOvercloud(command.Command): self.object_client.put_object( container_name, constants.PLAN_ENVIRONMENT, yaml_string) + # Parameters are sent to the update parameters action, this stores them + # in the plan environment and means the UI can find them. + if params: + workflow_params.update_parameters( + self.workflow_client, container=container_name, + parameters=params) + def _upload_missing_files(self, container_name, files_dict, tht_root): """Find the files referenced in custom environments and upload them