From 854f084fbf7dc71e702dc3c578db0e8283edf5b5 Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Wed, 19 Aug 2020 11:46:31 +0200 Subject: [PATCH] FFWD: L3 fixup Before we fix workload accounting and l3 test scripts we need to remove extra wokload test during FFWD. Change-Id: Ia36c52712c2bc32005d40c53a8b4f9cb71760cb0 --- tasks/fast-forward-upgrade/main.yml | 54 ++++++++----- .../fast-forward-upgrade/overcloud_bulk.yaml | 37 --------- .../fast-forward-upgrade/overcloud_role.yaml | 81 ------------------- 3 files changed, 36 insertions(+), 136 deletions(-) delete mode 100644 tasks/fast-forward-upgrade/overcloud_bulk.yaml delete mode 100644 tasks/fast-forward-upgrade/overcloud_role.yaml diff --git a/tasks/fast-forward-upgrade/main.yml b/tasks/fast-forward-upgrade/main.yml index c05858a7..2300ad9b 100644 --- a/tasks/fast-forward-upgrade/main.yml +++ b/tasks/fast-forward-upgrade/main.yml @@ -159,28 +159,40 @@ - '../common/l3_agent_failover_check_post_script.yml' tags: ffu_overcloud_prepare - - name: start L3 connectivity script - import_tasks: ../common/l3_agent_connectivity_check_start_script.yml - tags: ffu_overcloud_run + # This l3 check code is for now commented out for two reasons: + # 1) There is separate ping test in overcloud upgrade run which + # will be running at the same time, but the cleanup script runs + # kill -s INT $(pidof ping) which will kill them both and than + # we will fail on the final cleanup. + # 2) The workload creation and cleanup scripts work in simillar + # way. The workload cleanup does not check which workload we + # are cleaning specifically but it just removes first one on + # the list which in our case will be the host we are pinging + # here. + # - name: start L3 verification scripts + # include_tasks: "{{ item }}" + # args: + # apply: + # tags: ffu_overcloud_run + # loop: + # - '../common/l3_agent_connectivity_check_start_script.yml' + # - '../common/l3_agent_failover_check_pre_script.yml' + # tags: ffu_overcloud_run ############## OS upgrade + Overcloud node upgrade run ############## - name: Start overcloud upgrade run for all roles. import_tasks: overcloud_upgrade_roles.yaml tags: ffu_overcloud_run - - name: stop L3 connectivity script - import_tasks: ../common/l3_agent_connectivity_check_stop_script.yml - tags: ffu_overcloud_run - - # TODO(jfrancoa): We might need to do something like this to make the job quicker. - # we can either upgrade all overcloud nodes at one or per role/node - # - name: upgrade all overcloud nodes at once - # include_tasks: overcloud_bulk.yaml - # args: - # apply: - # tags: ffu_overcloud_upgrade_bulk - # tags: ffu_overcloud_upgrade_bulk - # when: ffu_bulk|bool + # - name: stop L3 verification scripts + # include_tasks: "{{ item }}" + # args: + # apply: + # tags: ffu_overcloud_run + # loop: + # - '../common/l3_agent_connectivity_check_stop_script.yml' + # - '../common/l3_agent_failover_check_post_script.yml' + # tags: ffu_overcloud_run ################ UPGRADE CONVERGE ############### - name: apply pre ffu overcloud converge workarounds @@ -221,8 +233,14 @@ include_tasks: ../upgrade/ceph_upgrade_run.yml tags: ffu_overcloud_ceph - - name: start L3 connectivity script - import_tasks: ../common/l3_agent_connectivity_check_start_script.yml + - name: start L3 verification scripts + include_tasks: "{{ item }}" + args: + apply: + tags: ffu_overcloud_ceph + loop: + - '../common/l3_agent_connectivity_check_start_script.yml' + - '../common/l3_agent_failover_check_pre_script.yml' tags: ffu_overcloud_ceph - name: import ceph ugrade tasks diff --git a/tasks/fast-forward-upgrade/overcloud_bulk.yaml b/tasks/fast-forward-upgrade/overcloud_bulk.yaml deleted file mode 100644 index 5f33986f..00000000 --- a/tasks/fast-forward-upgrade/overcloud_bulk.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -- name: create FFU role ugrades scripts - template: - src: fast-forward-upgrade/overcloud_upgrade_role.sh.j2 - dest: "{{ working_dir }}/overcloud_upgrade_{{ item }}.sh" - mode: 0775 - tags: ffu_overcloud_upgrade - loop: - - "all" - -- name: apply pre overcloud upgrade run workarounds - command: "{{ working_dir }}/pre_ffu_overcloud_upgrade_workarounds.sh" - when: ffu_upgrade_workarounds|bool - tags: ffu_overcloud_upgrade - -- name: import ../common/l3_agent_connectivity_check_start_script tasks - import_tasks: ../common/l3_agent_connectivity_check_start_script.yml - tags: ffu_overcloud_upgrade - -- name: run all roles upgrade steps - command: "{{ working_dir }}//overcloud_upgrade_all.sh" - tags: ffu_overcloud_upgrade - -- name: include L3 connectivity tasks - include_tasks: "{{ item }}" - args: - apply: - tags: ffu_overcloud_upgrade - loop: - - '../common/l3_agent_connectivity_check_stop_script.yml' - - '../common/l3_agent_failover_check_post_script.yml' - tags: ffu_overcloud_upgrade - -- name: apply post overcloud upgrade run workarounds - command: "{{ working_dir }}/post_ffu_overcloud_upgrade_workarounds.sh" - when: ffu_upgrade_workarounds|bool - tags: ffu_overcloud_upgrade diff --git a/tasks/fast-forward-upgrade/overcloud_role.yaml b/tasks/fast-forward-upgrade/overcloud_role.yaml deleted file mode 100644 index 26b33c7d..00000000 --- a/tasks/fast-forward-upgrade/overcloud_role.yaml +++ /dev/null @@ -1,81 +0,0 @@ ---- -- name: generate roles list from inventory file - import_tasks: ../common/load_roles_from_inventory.yaml - -- name: create FFU role ugrades scripts - template: - src: fast-forward-upgrade/overcloud_upgrade_role.sh.j2 - dest: "{{ working_dir }}/overcloud_upgrade_{{ item }}.sh" - mode: 0775 - tags: ffu_overcloud_upgrade_controller - loop: "{{ oc_roles|default([]) }}" - -- name: start L3 connectivity check - import_tasks: ../common/l3_agent_connectivity_check_start_script.yml - tags: ffu_overcloud_upgrade_controller - -- name: pre controller role upgrade steps workarounds - command: "{{ working_dir }}/pre_ffu_overcloud_upgrade_workarounds.sh" - when: ffu_upgrade_workarounds|bool - tags: ffu_overcloud_upgrade_controller - -- name: run FFU control plane ugrade scripts - command: "{{ working_dir }}/overcloud_upgrade_{{ item }}.sh" - tags: ffu_overcloud_upgrade_controller - loop: "{{ oc_roles|difference(['Compute','ComputeAlt','CephStorage']) }}" - -- name: run L3 validation - include_tasks: "{{ item }}" - loop: - - '../common/l3_agent_connectivity_check_stop_script.yml' - - '../common/l3_agent_failover_check_post_script.yml' - tags: ffu_overcloud_upgrade_controller - -- name: start L3 connectivity check - import_tasks: ../common/l3_agent_connectivity_check_start_script.yml - tags: ffu_overcloud_upgrade_compute - -- name: run FFU compute ugrade scripts - command: "{{ working_dir }}/overcloud_upgrade_{{ item }}.sh" - tags: ffu_overcloud_upgrade_compute - loop: "{{ oc_roles|intersect(['Compute','ComputeAlt']) }}" - when: - - not ffu_computes_rolling|bool - -- name: validate L3 connectivity result - import_tasks: ../common/l3_agent_connectivity_check_stop_script.yml - tags: ffu_overcloud_upgrade_compute - -- block: - - name: register compute nodes from tripleo ansible inventory - shell: | - awk -F':' '/^[^ \n]*compute-/ {print $1}' {{ working_dir }}/tripleo-ansible-inventory.yaml - register: tripleo_compute_nodes - tags: ffu_overcloud_upgrade_compute - - - name: Create compute nodes FFU ugrade playbooks scripts - template: - src: fast-forward-upgrade/overcloud_upgrade_nodes.sh.j2 - dest: "{{ working_dir }}/overcloud_upgrade_{{ item }}.sh" - mode: 0775 - tags: ffu_overcloud_upgrade_compute - loop: '{{ tripleo_compute_nodes.stdout_lines }}' - - - name: start L3 connectivity check - import_tasks: ../common/l3_agent_connectivity_check_start_script.yml - tags: ffu_overcloud_upgrade_compute - - - name: Rolling upgrade compute nodes - command: "{{ working_dir }}/overcloud_upgrade_{{ item }}.sh" - tags: ffu_overcloud_upgrade_compute - loop: '{{ tripleo_compute_nodes.stdout_lines }}' - - - name: validate L3 connectivity result - import_tasks: ../common/l3_agent_connectivity_check_stop_script.yml - tags: ffu_overcloud_upgrade_compute - when: ffu_computes_rolling|bool - -- name: post controller role upgrade steps workarounds - command: "{{ working_dir }}/post_ffu_overcloud_upgrade_workarounds.sh" - when: ffu_upgrade_workarounds|bool - tags: ffu_overcloud_upgrade_controller