tripleo-upgrade/templates/overcloud_upgrade_converge.sh.j2
Jose Luis Franco Arza bb44ee55a3 Pass neutron-ovs.yaml environment in upgrade prepare.
If the environmet is deployed in Rocky with OVS then we need to pass
the neutron-ovs.yml environment file for the upgrade prepare and converge
steps to work. Otherwise, as OVN is the Neutron engine by default in
Stein it will try to deploy with OVN and the upgrade will fail.

Also, the containers-prepare-parameter.yaml is shared between the UC
and the OC upgrade. For the case of the UC, there is no possibility to
deploy with ovn, so we force the neutron_driver option (defaulted to ovn
when creating the default containers-prepare-parameter.yaml file) to
openvswitch. However, for the OC, we need to identify if it was deployed
with the OVN service enabled and if so, set the netron_driver to ovn instead.

In summary, we first upgrade from Rocky with OVS to Stein with OVS and
if required, a post-upgrade step to upgrade from OVS to OVN would be
performed. In the case the Rocky deployment was with OVN enabled we
perform a Rocky with OVN to Stein with OVN upgrade.

Change-Id: I21bbf9cda977a1c269e2c1caad4bf88d3f6173b0
2019-07-30 11:12:33 +02:00

103 lines
3.4 KiB
Django/Jinja

#!/bin/env bash
#
# 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 %}
{% 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)] 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 \
{% endif -%}
{% 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 -%}
{% if tripleo_upgrade_converge_plan_only|bool -%}
--update-plan-only \
{% 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 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 }} \
{% endfor -%}
{% endif -%}
{% if ffu_overcloud_upgrade and deployment_with_ha_upstream -%}
-e {{ tht_directory }}/environments/docker.yaml \
-e {{ tht_directory }}/environments/docker-ha.yaml \
{% endif -%}
{% if cli_converted_options|default(false)|bool -%}
-e {{working_dir}}/cli_opts_params.yaml \
{% endif -%}
{% if ffu_overcloud_upgrade -%}
-e {{ working_dir }}/{{ container_registry_file }} \
{% if ceph_osd_enabled -%}
-e {{working_dir}}/ceph-ansible-env.yaml \
{% endif -%}
{% endif -%}
{% if deployment_with_ovs|default(true)|bool -%}
-e {{ tht_directory }}/environments/services/neutron-ovs.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 {% 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 %}
{% 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 %}