From b1ac5e1e2bd793774657f0e2e67721f8218dc92b Mon Sep 17 00:00:00 2001 From: James Slagle Date: Wed, 22 Jan 2020 10:09:49 -0500 Subject: [PATCH] [TRAIN ONLY] Check for correct file during --skip-deploy-identifier handling. At some point, the file names that are checked for existence when determining to apply the logic for --skip-deploy-identifier must have changed. Since the file check was not updated, it was checking for a file that would never exist, and so the ansible tasks were always run (or re-run). Effectively, --skip-deploy-identifier was broken and it had no effect. This patch updates the file check to use the correct name, and also checks the right file per step. It only applies to Train since on master, these files were switched to write out per container files in a directory, and the fix was addressed at that time. Change-Id: Ia01a10c488d22e38cd86b0117e9c048ea5cc3298 Closes-Bug: #1860566 --- common/deploy-steps.j2 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index f401f1c1ce..a4b21a7697 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -820,13 +820,13 @@ outputs: docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET tasks: - - name: Check if /var/lib/tripleo-config/container-startup-config-1.json already exists + - name: Check if /var/lib/tripleo-config/container-startup-config-step_1.json already exists stat: - path: /var/lib/tripleo-config/container-startup-config-1.json + path: /var/lib/tripleo-config/container-startup-config-step_1.json register: container_startup_configs_json_stat - include_tasks: common_deploy_steps_tasks_step_1.yaml - when: - - ((deploy_identifier is defined and deploy_identifier != "" and deploy_identifier is not none) or not container_startup_configs_json_stat.stat.exists) + when: (deploy_identifier is defined and deploy_identifier != "" and deploy_identifier is not none) or + (container_startup_configs_json_stat is defined and not container_startup_configs_json_stat.stat.exists) tags: - overcloud - deploy_steps @@ -855,9 +855,9 @@ outputs: run_once: true debug: msg: Use --start-at-task "Overcloud common deploy step tasks {{step}}" to resume from this task - - name: Check if /var/lib/tripleo-config/container-startup-config-1.json already exists + - name: Check if /var/lib/tripleo-config/container-startup-config-step_{{ step }}.json already exists stat: - path: /var/lib/tripleo-config/container-startup-config-1.json + path: /var/lib/tripleo-config/container-startup-config-step_{{ step }}.json register: container_startup_configs_json_stat - include_tasks: common_deploy_steps_tasks.yaml when: (deploy_identifier is defined and deploy_identifier != "" and deploy_identifier is not none) or