Move L3 agent checks inside overcloud upgrade script.

Currently L3 agent checks are called from ansible tasks,
 though those scripts already exist at uc.
Current change calls those scripts from within `upgrade` script,
 which makes it easier for local reproducing.

Change-Id: Ib3a781f570155a2139b6e0cf3debfc97363c6a08
This commit is contained in:
Yurii Prokulevych
2018-06-04 08:42:54 +02:00
parent d9c0ac16cf
commit 651da4a016
2 changed files with 30 additions and 5 deletions

View File

@@ -1,6 +1,4 @@
---
- include: ../common/l3_agent_connectivity_check_start_script.yml
- name: run major upgrade converge step
shell: "bash {{ overcloud_upgrade_converge_script }} &> {{ working_dir }}/overcloud_upgrade_converge.log"
register: overcloud_converge_upgrade
@@ -16,5 +14,3 @@
- name: was the overcloud upgrade converge successful.
fail: msg="Overcloud upgrade converge step failed... :("
when: overcloud_converge_upgrade.rc != 0
- include: ../common/l3_agent_connectivity_check_stop_script.yml

View File

@@ -3,9 +3,22 @@
# Run major upgrade converge step on overcloud nodes
#
set -euo pipefail
{% if l3_agent_connectivity_check|bool %}
if [[ -e {{ working_dir }}/l3_agent_start_ping.sh ]]; then
source {{ overcloud_rc }}
bash {{ working_dir }}/l3_agent_start_ping.sh
fi
{% endif %}
{% if l3_agent_failover_check|bool %}
if [[ -e {{ working_dir }}/l3_agent_failover_pre.sh ]]; then
source {{ overcloud_rc }}
bash {{ working_dir }}/l3_agent_failover_pre.sh
fi
{% endif %}
source {{ undercloud_rc }}
echo "Running {% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} major {% endif %}upgrade converge step"
echo "[$(date)] Running {% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} major {% endif %}upgrade converge step"
openstack overcloud {% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} upgrade {% endif %}converge \
{% if ffu_overcloud_upgrade %}
--yes \
@@ -39,3 +52,19 @@ openstack overcloud {% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} upgra
{% endif %}
{% endif %}
{% if not ffu_overcloud_upgrade %}--roles-file {{ roles_data }}{% endif %} 2>&1
echo "[$(date)] Finished {% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} major {% endif %}upgrade converge step"
{% if l3_agent_connectivity_check|bool %}
if [[ -e {{ working_dir }}/l3_agent_stop_ping.sh ]]; then
source {{ overcloud_rc }}
bash {{ working_dir }}/l3_agent_stop_ping.sh
fi
{% endif %}
{% if l3_agent_failover_check|bool %}
if [[ -e {{ working_dir }}/l3_agent_failover_post.sh ]]; then
source {{ overcloud_rc }}
bash {{ working_dir }}/l3_agent_failover_post.sh
fi
{% endif %}