12db9ba27a
This make the ping check independent of the task time. We can now specify in absolute time how long we tolerate a ping loss during the ping test. We set this to 0 by default for update as no such cut should happen during this workflow. For other tasks it's 60 seconds. We also maintain a percentage check for tasks that are very short in total time (less than 10min for instance) as the total number of seconds there could be less than 60 seconds, but with a 100% packet loss. Eventually, we shield printf against locale that would use a comma as a separator for number decimal and make sure it's always a point. Change-Id: I69ac4ee4f7eb3214c925686c1efd1bd2f5972185
65 lines
1.8 KiB
Django/Jinja
65 lines
1.8 KiB
Django/Jinja
#!/bin/env bash
|
|
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 }}
|
|
|
|
set +o pipefail
|
|
EXTERNAL_ANSWER=""
|
|
if openstack overcloud external-update run --help | grep -qe "--yes"; then
|
|
EXTERNAL_ANSWER="--yes"
|
|
fi
|
|
set -o pipefail
|
|
|
|
echo "[$(date)] Started Ceph minor update step"
|
|
|
|
openstack overcloud external-update run ${EXTERNAL_ANSWER} \
|
|
--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 {{ update_loss_threshold }}
|
|
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 %}
|