Add support for network-data-file.

TripleO offers a default network topology when deploying
with network isolation enabled, and this is reflected in
the network_data.yaml file in tripleo-heat-templates.
If this is the case it has to be handled during update/upgrade.

Change-Id: If50109753d4845357c869986c256186e8e22006d
(cherry picked from commit 663d380f6f)
This commit is contained in:
Yurii Prokulevych 2019-05-23 08:27:49 +02:00
parent 7edf35830b
commit 44810b2a10
5 changed files with 21 additions and 0 deletions

View File

@ -16,6 +16,15 @@
set_fact:
deployment_with_ha_upstream: "{{ is_upstream.rc == 0 and pacemaker_present.rc == 0 }}"
- name: get network-data-file
shell: |
awk '/-n\s/ {gsub(/[[:space:]]/, "", $2); print $2}' {{ overcloud_deploy_script }}
register: network_data_file
- name: set network_data_file fact
set_fact:
network_data_file: "{{ network_data_file.stdout }}"
- name: get env files used during deploy
shell: |
awk '/-e\s|--environment-file\s/ {gsub(/[[:space:]]/, "", $2); print $2}' {{ overcloud_deploy_script }}

View File

@ -25,6 +25,9 @@ openstack overcloud update converge \
--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 -%}
-e {{ _env }} \

View File

@ -22,6 +22,9 @@ openstack overcloud update prepare --templates {{ tht_directory }} \
{% if tripleo_upgrade_validations_non_fatal|bool -%}
--validation-errors-nonfatal \
{% 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 -%}
-e {{ _env }} \

View File

@ -48,6 +48,9 @@ openstack overcloud {% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} upgra
--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 }} \

View File

@ -25,6 +25,9 @@ openstack overcloud{% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} upgrad
--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 }} \