tripleo-upgrade/templates/overcloud_upgrade_converge....

98 lines
3.0 KiB
Django/Jinja

#!/bin/env bash
#
# Run upgrade converge step on overcloud nodes
#
set -eu
{% 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 }}
CONVERGE_ANSWER=""
if openstack overcloud upgrade converge --help | grep -qe "--yes"; then
CONVERGE_ANSWER="--yes"
fi
set -o pipefail
echo "[$(date)] Running upgrade converge step"
openstack overcloud upgrade converge ${CONVERGE_ANSWER} \
{% if overcloud_ssh_user != '' -%}
--overcloud-ssh-user {{ overcloud_ssh_user }} \
{% endif -%}
{% if tripleo_upgrade_debug|bool -%}
--debug \
{% endif -%}
{% if tripleo_upgrade_validations_non_fatal|bool -%}
--validation-errors-nonfatal \
{% endif -%}
--templates {{ tht_directory }} \
--stack {{ overcloud_stack_name }} \
{% if splitstack_deployment|bool -%}
--disable-validations \
--deployed-server \
{% endif -%}
{% if network_data_file|length >0 -%}
-n {{ network_data_file }} \
{% endif -%}
{% if deployment_with_ovs|default(true)|bool -%}
-e {{ tht_directory }}/environments/services/neutron-ovs.yaml \
{% endif -%}
{% if initial_env_file is defined and initial_env_file.stdout_lines|length > 0 -%}
{% for _env in initial_env_file.stdout_lines|difference(old_img|default([])) -%}
-e {{ _env | replace('services-docker', 'services') }} \
{% endfor -%}
{% endif -%}
{% if config_heat_extra_yaml is defined -%}
-e {{ working_dir }}/{{ install.deployment.files | basename }}/config_heat_extra.yaml \
{% endif -%}
{% if cli_converted_options|default(false)|bool -%}
-e {{working_dir}}/cli_opts_params.yaml \
{% endif -%}
-e {{ working_dir }}/{{ uc_containers_prepare_file }} \
{% if (not ffu_overcloud_upgrade or roles_data != default_roles_data) %}--roles-file {{ roles_data }}{% endif %} 2>&1
echo "[$(date)] Finished 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 %}
{% 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 %}
{% if launch_sanity_workload|bool %}
bash {{ working_dir }}/workload_launch.sh 'sanity'
{% endif %}