Add floating ip connectivity check to common dir and use it for FFU

This change adds the floating IP connectivity check scripts to the
common directory and adjusts existing update and upgrade to use the
new location. In addition it runs the connectivity check scripts
before and after the FFU overcloud upgrade stages.

Change-Id: I8c2fe2ad88c8388a673a4b6c415f6a76bebfd72d
This commit is contained in:
Marius Cornea 2018-02-15 16:22:33 -05:00
parent b579889632
commit db75499539
7 changed files with 41 additions and 37 deletions

View File

@ -0,0 +1,8 @@
---
- name: start l3 agent connectivity check
shell: |
source {{ overcloud_rc }}
{{ l3_agent_connectivity_check_start_script }}
when: l3_agent_connectivity_check
async: 21660
poll: 0

View File

@ -0,0 +1,6 @@
---
- name: stop l3 agent connectivity check
shell: |
source {{ overcloud_rc }}
{{ l3_agent_connectivity_check_stop_script }}
when: l3_agent_connectivity_check

View File

@ -23,6 +23,8 @@
when: ffu_undercloud_upgrade|bool
- block:
- include: ../common/l3_agent_connectivity_check_start_script.yml
- name: apply pre ffu update stack outputs workarounds
command: "{{working_dir}}/pre_ffu_update_stack_outputs_workarounds.sh"
when: ffu_upgrade_workarounds|bool
@ -31,6 +33,8 @@
- include: ffu_update_stack_outputs.yaml
tags: ffu_update_stack_outputs
- include: ../common/l3_agent_connectivity_check_stop_script.yml
- name: apply pre ffu download config workarounds
command: "{{working_dir}}/pre_ffu_download_config_workarounds.sh"
when: ffu_upgrade_workarounds|bool
@ -60,35 +64,51 @@
when: ffu_upgrade_workarounds|bool
tags: ffu_upgrade_playbook
- include: ../common/l3_agent_connectivity_check_start_script.yml
- name: Run FFU fast_forward_upgrade_playbook.yaml
command: "{{working_dir}}/ffu_upgrade_playbook_script.sh"
tags: ffu_upgrade_playbook
- include: ../common/l3_agent_connectivity_check_stop_script.yml
- name: apply pre ffu upgrade steps playbook workarounds
command: "{{working_dir}}/pre_ffu_upgrade_steps_playbook_workarounds.sh"
when: ffu_upgrade_workarounds|bool
tags: ffu_upgrade_steps_playbook
- include: ../common/l3_agent_connectivity_check_start_script.yml
- name: Run upgrade_steps_playbook.yaml
command: "{{working_dir}}/ffu_upgrade_steps_playbook_script.sh"
tags: ffu_upgrade_steps_playbook
- include: ../common/l3_agent_connectivity_check_stop_script.yml
- name: apply pre ffu deploy steps playbook workarounds
command: "{{working_dir}}/pre_ffu_deploy_steps_playbook_workarounds.sh"
when: ffu_upgrade_workarounds|bool
tags: ffu_deploy_steps_playbook
- include: ../common/l3_agent_connectivity_check_start_script.yml
- name: Run deploy_steps_playbook.yaml
command: "{{working_dir}}/ffu_deploy_steps_playbook_script.sh"
tags: ffu_deploy_steps_playbook
- include: ../common/l3_agent_connectivity_check_stop_script.yml
- name: apply pre ffu ceph upgrade workarounds
command: "{{working_dir}}/pre_ffu_upgrade_ceph_workarounds.sh"
when: ffu_upgrade_workarounds|bool
tags: ffu_upgrade_ceph
- include: ../common/l3_agent_connectivity_check_start_script.yml
- include: ffu_upgrade_ceph.yaml
when: ceph_ansible|succeeded
tags: ffu_upgrade_ceph
- include: ../common/l3_agent_connectivity_check_stop_script.yml
when: ffu_overcloud_upgrade|bool

View File

@ -28,13 +28,7 @@
when: undercloud_update|bool
- block:
- name: start l3 agent connectivity check
shell: |
source {{ overcloud_rc }}
{{ l3_agent_connectivity_check_start_script }}
when: l3_agent_connectivity_check
async: 21660
poll: 0
- include: ../common/l3_agent_connectivity_check_start_script.yml
- name: overcloud pre-update workarounds
shell: |
@ -73,10 +67,6 @@
- overcloud_update
- overcloud_images_validate
- name: stop l3 agent connectivity check
shell: |
source {{ overcloud_rc }}
{{ l3_agent_connectivity_check_stop_script }}
when: l3_agent_connectivity_check
- include: ../common/l3_agent_connectivity_check_stop_script.yml
when: overcloud_update|bool

View File

@ -1,11 +1,5 @@
---
- name: start l3 agent connectivity check
shell: |
source {{ overcloud_rc }}
{{ l3_agent_connectivity_check_start_script }}
when: l3_agent_connectivity_check
async: 21660
poll: 0
- include: ../common/l3_agent_connectivity_check_start_script.yml
- name: run docker upgrade composable step
shell: |
@ -29,8 +23,4 @@
- fail: msg="Overcloud upgrade composable step failed... :("
when: overcloud_composable_upgrade.rc != 0
- name: stop l3 agent connectivity check
shell: |
source {{ overcloud_rc }}
{{ l3_agent_connectivity_check_stop_script }}
when: l3_agent_connectivity_check
- include: ../common/l3_agent_connectivity_check_stop_script.yml

View File

@ -1,11 +1,5 @@
---
- name: start l3 agent connectivity check
shell: |
source {{ overcloud_rc }}
{{ l3_agent_connectivity_check_start_script }}
when: l3_agent_connectivity_check
async: 21660
poll: 0
- include: ../common/l3_agent_connectivity_check_start_script.yml
- name: run docker upgrade converge step
shell: |
@ -23,8 +17,4 @@
- fail: msg="Overcloud upgrade converge step failed... :("
when: overcloud_converge_upgrade.rc != 0
- name: stop l3 agent connectivity check
shell: |
source {{ overcloud_rc }}
{{ l3_agent_connectivity_check_stop_script }}
when: l3_agent_connectivity_check
- include: ../common/l3_agent_connectivity_check_stop_script.yml

View File

@ -3,4 +3,4 @@
# Script which start an ICMP connectivity check on the first in use
# floating IP during upgrade
FIP=$(openstack floating ip list -f json | jq -r -c '.[] | select(.Port) | .["Floating IP Address"]' | head -1)
ping -D ${FIP} >> ~/ping_results_$(date +%Y%m%d%H%M) &
ping -D ${FIP} >> ~/ping_results_$(date +%Y%m%d%H%M).log &