Pass env-files and roles-data file to update/upgrade prepare cli.
To bypass issue described in RHBZ#1541024 it's needed to pass
all the environment files, used during initial overcloud deploy,
to the 'overcloud update|upgrade prepare' cli.
Depends-On: I9db2c9256ed20d4d0b74bb467ee6ae0a9633bcc8
Change-Id: I9b488d84fa6e86ed9ce03c7b5fda5d42f713724d
(cherry picked from commit 937274088c
)
This commit is contained in:
parent
a8c5a70f26
commit
20e89f5e3a
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
- name: get env files used during deploy
|
||||
shell: |
|
||||
awk '/-e\s|--environment-file\s/ {gsub(/[[:space:]]/, "", $2); print $2}' {{ overcloud_deploy_script }}
|
||||
register: initial_env_file
|
||||
|
||||
- name: set initial_env_file fact
|
||||
set_fact:
|
||||
initial_env_file: "{{ initial_env_file }}"
|
||||
|
||||
- name: fetch roles-data file referenced in initial deploy script
|
||||
shell: |
|
||||
awk '/-r\s|--roles-file\s/ {gsub(/[[:space:]]/, "", $2); print $2}' {{ overcloud_deploy_script }}
|
||||
register: roles_data_file
|
||||
|
||||
- name: set roles-data fact
|
||||
vars:
|
||||
default_roles_data: "{{ tht_directory }}/roles_data.yaml"
|
||||
roles_data: "{{ roles_data_file.stdout }}"
|
||||
set_fact:
|
||||
roles_data: "{{ (roles_data_file.stdout|length > 0) | ternary(roles_data, default_roles_data)}}"
|
|
@ -1,4 +1,12 @@
|
|||
---
|
||||
- name: create a comptatible deployment scripts from oooq
|
||||
include: ../upgrade/use_oooq.yaml
|
||||
tags: use_oooq
|
||||
when: use_oooq|bool
|
||||
|
||||
- name: get auxiliary facts for major upgrades
|
||||
include: ../common/auxilary-facts.yaml
|
||||
|
||||
- name: create undercloud update script
|
||||
vars:
|
||||
log_prefix: "update"
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
---
|
||||
- name: create a comptatible deployment scripts from oooq
|
||||
include: use_oooq.yaml
|
||||
tags: use_oooq
|
||||
when: use_oooq|bool
|
||||
|
||||
- name: get auxiliary facts for major upgrades
|
||||
include: ../common/auxilary-facts.yaml
|
||||
|
||||
- name: register is_upstream variable
|
||||
shell: |
|
||||
rpm -q openstack-tripleo-heat-templates | grep '\.el[[:digit:]]\.'
|
||||
|
|
|
@ -15,4 +15,10 @@ openstack overcloud update prepare --templates {{ tht_directory }} \
|
|||
{% if tripleo_upgrade_validations_non_fatal|bool %}
|
||||
--validation-errors-nonfatal \
|
||||
{% 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 }} \
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
--roles-file {{ roles_data }} \
|
||||
--container-registry-file {{ working_dir }}/{{ container_registry_file }} 2>&1
|
||||
|
|
|
@ -15,7 +15,12 @@ openstack overcloud upgrade prepare --templates --stack {{ overcloud_stack_name
|
|||
--validation-errors-nonfatal \
|
||||
{% endif %}
|
||||
--container-registry-file {{ working_dir }}/{{ container_registry_file }} \
|
||||
{% if initial_env_file is defined and initial_env_file.stdout_lines|length > 0 %}
|
||||
{% for _env in initial_env_file.stdout_lines %}
|
||||
-e {{ _env }} \
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if upgrade_prepare_extra_params %}
|
||||
-e {{ upgrade_prepare_extra_params | join(' -e ') }} \
|
||||
{% endif %}
|
||||
-e {{ tht_directory }}/environments/noop-deploy-steps.yaml 2>&1
|
||||
--roles-file {{ roles_data }} 2>&1
|
||||
|
|
Loading…
Reference in New Issue