tripleo-upgrade/templates/ceph-update-run.sh.j2
Yurii Prokulevych c0c804dfbb Use external-(upgrade|update) commands for Ceph.
After switching from Heat workflow resources to external_deploy_tasks,
the `ceph-upgrade run` command no longer works and is dropped.
Instead use `external-update run` and `external-upgrade run` commands.

Also run ping/L3/load tests, if requested, during Ceph update/upgrade.

Change-Id: Ib2a6d4d8b4d4256841bf78dbe1e79d796c84b6e5
2018-10-16 18:54:06 +00:00

60 lines
1.6 KiB
Django/Jinja

#!/bin/env bash
set -euo pipefail
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 %}
{% if fip_http_check|bool %}
source {{ overcloud_rc }}
kill -9 $( lsof -t {{ working_dir }}/fip_http_check_start.sh ) || :
bash {{ working_dir }}/fip_http_check_start.sh &
{% endif %}
source {{ undercloud_rc }}
echo "[$(date)] Started Ceph minor update step"
openstack overcloud external-update run \
--stack {{ overcloud_stack_name }} \
{% if overcloud_ssh_user != '' -%}
--ssh-user {{ overcloud_ssh_user }} \
{% endif -%}
{% if ceph_update_skip_tags|default(false) -%}
--skip-tags "{{ ceph_update_skip_tags }}" \
{% endif -%}
--tags ceph 2>&1
echo "[$(date)] Finished CEPH minor update"
{% 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 %}
{% if fip_http_check|bool %}
source {{ overcloud_rc }}
kill -9 $( lsof -t {{ working_dir }}/fip_http_check_start.sh )
bash {{ working_dir }}/fip_http_check_stop.sh
{% endif %}