Include connectivity check prepare scripts during FFU

This change includes the connectivity check prepare scripts step
during FFU and it moves the tasks covering it to the
common dir and assigns specific tags for each FFU stage. In
addition it saves the floating IP address to a file so it can be
used in stages where Neutron API is not available.

Change-Id: I9d61f6eaa105e9eb2854eb749f570c395de155fe
(cherry picked from commit 55ff3f72cd)
This commit is contained in:
Marius Cornea 2018-03-21 09:10:02 -04:00
parent ed98207fd8
commit be14a30756
5 changed files with 33 additions and 13 deletions

View File

@ -0,0 +1,13 @@
- block:
- name: create start l3 agent connectivity check scripts
template:
src: "{{ l3_agent_connectivity_check_start_template }}"
dest: "{{ l3_agent_connectivity_check_start_script }}"
mode: 0775
- name: create stop l3 agent connectivity check scripts
template:
src: "{{ l3_agent_connectivity_check_stop_template }}"
dest: "{{ l3_agent_connectivity_check_stop_script }}"
mode: 0775
when: l3_agent_connectivity_check|bool

View File

@ -88,3 +88,5 @@
- composable_scenario != ""
- include: ../common/ssh_config_skip_host.yml
- include: ../common/create_l3_agent_connectivity_check_script.yml

View File

@ -24,6 +24,7 @@
- block:
- include: ../common/l3_agent_connectivity_check_start_script.yml
tags: ffu_update_stack_outputs
- name: apply pre ffu update stack outputs workarounds
command: "{{working_dir}}/pre_ffu_update_stack_outputs_workarounds.sh"
@ -34,6 +35,7 @@
tags: ffu_update_stack_outputs
- include: ../common/l3_agent_connectivity_check_stop_script.yml
tags: ffu_update_stack_outputs
- name: apply pre ffu download config workarounds
command: "{{working_dir}}/pre_ffu_download_config_workarounds.sh"
@ -71,12 +73,14 @@
tags: ffu_upgrade_playbook
- include: ../common/l3_agent_connectivity_check_start_script.yml
tags: ffu_upgrade_playbook
- 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
tags: ffu_upgrade_playbook
- name: apply pre ffu upgrade steps playbook workarounds
command: "{{working_dir}}/pre_ffu_upgrade_steps_playbook_workarounds.sh"
@ -84,12 +88,14 @@
tags: ffu_upgrade_steps_playbook
- include: ../common/l3_agent_connectivity_check_start_script.yml
tags: ffu_upgrade_steps_playbook
- 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
tags: ffu_upgrade_steps_playbook
- name: apply pre ffu deploy steps playbook workarounds
command: "{{working_dir}}/pre_ffu_deploy_steps_playbook_workarounds.sh"
@ -97,12 +103,14 @@
tags: ffu_deploy_steps_playbook
- include: ../common/l3_agent_connectivity_check_start_script.yml
tags: ffu_deploy_steps_playbook
- 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
tags: ffu_deploy_steps_playbook
- name: apply pre ffu ceph upgrade workarounds
command: "{{working_dir}}/pre_ffu_upgrade_ceph_workarounds.sh"
@ -110,11 +118,13 @@
tags: ffu_upgrade_ceph
- include: ../common/l3_agent_connectivity_check_start_script.yml
tags: ffu_upgrade_ceph
- include: ffu_upgrade_ceph.yaml
when: ceph_ansible|succeeded
tags: ffu_upgrade_ceph
- include: ../common/l3_agent_connectivity_check_stop_script.yml
tags: ffu_upgrade_ceph
when: ffu_overcloud_upgrade|bool

View File

@ -54,18 +54,7 @@
- 'post_overcloud_converge_workarounds'
when: upgrade_workarounds
- block:
- name: create start l3 agent connectivity check scripts
template:
src: "{{ l3_agent_connectivity_check_start_template }}"
dest: "{{ l3_agent_connectivity_check_start_script }}"
mode: 0775
- name: create stop l3 agent connectivity check scripts
template:
src: "{{ l3_agent_connectivity_check_stop_template }}"
dest: "{{ l3_agent_connectivity_check_stop_script }}"
mode: 0775
- include: ../common/create_l3_agent_connectivity_check_script.yml
- name: create the custom upgrade init commands
template:

View File

@ -2,5 +2,11 @@
#
# 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)
if [ -f {{ working_dir }}/fip.sh ]; then
source {{ working_dir }}/fip.sh
else
echo export FIP=$(openstack floating ip list -f json | jq -r -c '.[] | select(.Port) | .["Floating IP Address"]' | head -1) > {{ working_dir }}/fip.sh
source {{ working_dir }}/fip.sh
fi
ping -D ${FIP} >> ~/ping_results_$(date +%Y%m%d%H%M).log &