From b24dd5df628247e3c9149f4cfa9ce433b73fa030 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Thu, 3 Sep 2020 08:43:23 -0600 Subject: [PATCH] Fix network configuration execution ordering https://review.opendev.org/#/c/749432/ moved network configuration before the deployments.yaml execution. The deployment.yaml included legacy executions of deployments (e.g. *PreConfig ExtraConfigPre) which may be necessary prior to running the network configuration. We shouldn't change up the ordering of executions where the things being executed may be dynamic. Change-Id: I496005ef7f3e75382d2bb20f7c6dc9ed96762695 --- common/deploy-steps.j2 | 47 ++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index b55f3f3b89..d3cf086d61 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -525,7 +525,18 @@ outputs: gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}" any_errors_fatal: yes tasks: +{% raw %} - import_tasks: hiera_steps_tasks.yaml + - name: Server deployments + delegate_to: localhost + run_once: true + debug: + msg: Use --start-at-task 'Server deployments' to resume from this task + - include_tasks: deployments.yaml + vars: + force: false + with_items: "{{ hostvars[inventory_hostname]['pre_deployments_' ~ tripleo_role_name]|default([]) }}" +{% endraw %} tags: - overcloud - pre_deploy_steps @@ -537,6 +548,11 @@ outputs: any_errors_fatal: yes tasks: {% raw %} + - name: Network Configuration + delegate_to: localhost + run_once: true + debug: + msg: Use --start-at-task 'Network Configuration' to resume from this task - name: Check NetworkConfig script existence local_action: module: stat @@ -573,31 +589,6 @@ outputs: - network_deploy_steps {% endraw %} - - hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST - strategy: tripleo_free - name: Server deployments - gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}" - any_errors_fatal: yes - tasks: -{% raw %} - - name: Server deployments - delegate_to: localhost - run_once: true - debug: - msg: Use --start-at-task 'Server deployments' to resume from this task - - include_tasks: deployments.yaml - vars: - force: false - with_items: "{{ hostvars[inventory_hostname]['pre_deployments_' ~ tripleo_role_name]|default([]) }}" - - name: ArtifactsConfig - script: deploy-artifacts.sh - environment: - artifact_urls: "{{ deploy_artifact_urls }}" - tags: - - overcloud - - pre_deploy_steps -{% endraw %} - - hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST strategy: tripleo_free name: Host prep steps @@ -616,6 +607,12 @@ outputs: docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET tasks: +{% raw %} + - name: ArtifactsConfig + script: deploy-artifacts.sh + environment: + artifact_urls: "{{ deploy_artifact_urls }}" +{% endraw %} {%- for role in roles %} - name: {{role.name}} Host prep block when: