Swap tasks to avoid non-existing variable error.
The upgrade workflow to Stein has a guard task that
checks that the --limit option is being used when
running the overcloud upgrade run command, as the
upgrade needs to be performed node by node due to
the operating system upgrade. However, if the --limit
option is not passed, the upgrade tasks fails in the
task right before the guard, as that task already
references the undefined variable. So, it is needed
to invert the order so we fail at will in the guard
task.
Closes-Bug: #1861663
(cherry picked from commit bca35e611b
)
Change-Id: I1def295469875e648ad1c9d1e0de00b241acc3fd
This commit is contained in:
parent
e07214ca8d
commit
541170e514
|
@ -350,8 +350,6 @@ outputs:
|
|||
- groups['cinder_backup'] | length > 1
|
||||
- item.split('.')[0] in ansible_limit.split(',')
|
||||
loop: "{{ cinder_backup_node_names }}"
|
||||
- debug:
|
||||
msg: "Prepare cinder_backup upgrade for {{ cinder_backup_short_node_names_upgraded }}"
|
||||
- fail:
|
||||
msg: >
|
||||
You can't upgrade cinder_backup without
|
||||
|
@ -362,6 +360,8 @@ outputs:
|
|||
cinder_backup_short_node_names_upgraded | length == 0 or
|
||||
cinder_backup_node_names_upgraded is not defined or
|
||||
cinder_backup_node_names_upgraded | length == 0
|
||||
- debug:
|
||||
msg: "Prepare cinder_backup upgrade for {{ cinder_backup_short_node_names_upgraded }}"
|
||||
- name: remove cinder_backup init container on upgrade-scaleup to force re-init
|
||||
shell: |
|
||||
if podman inspect cinder_backup_init_bundle &> /dev/null; then
|
||||
|
|
|
@ -336,8 +336,6 @@ outputs:
|
|||
- groups['cinder_volume'] | length > 1
|
||||
- item.split('.')[0] in ansible_limit.split(',')
|
||||
loop: "{{ cinder_volume_node_names }}"
|
||||
- debug:
|
||||
msg: "Prepare cinder_volume upgrade for {{ cinder_volume_short_node_names_upgraded }}"
|
||||
- fail:
|
||||
msg: >
|
||||
You can't upgrade cinder_volume without
|
||||
|
@ -348,6 +346,8 @@ outputs:
|
|||
cinder_volume_short_node_names_upgraded | length == 0 or
|
||||
cinder_volume_node_names_upgraded is not defined or
|
||||
cinder_volume_node_names_upgraded | length == 0
|
||||
- debug:
|
||||
msg: "Prepare cinder_volume upgrade for {{ cinder_volume_short_node_names_upgraded }}"
|
||||
- name: remove cinder_volume init container on upgrade-scaleup to force re-init
|
||||
shell: |
|
||||
if podman inspect cinder_volume_init_bundle &> /dev/null; then
|
||||
|
|
|
@ -336,8 +336,6 @@ outputs:
|
|||
- groups['manila_share'] | length > 1
|
||||
- item.split('.')[0] in ansible_limit.split(',')
|
||||
loop: "{{ manila_share_node_names }}"
|
||||
- debug:
|
||||
msg: "Prepare manila_share upgrade for {{ manila_share_short_node_names_upgraded }}"
|
||||
- fail:
|
||||
msg: >
|
||||
You can't upgrade manila_share without
|
||||
|
@ -348,6 +346,8 @@ outputs:
|
|||
manila_share_short_node_names_upgraded | length == 0 or
|
||||
manila_share_node_names_upgraded is not defined or
|
||||
manila_share_node_names_upgraded | length == 0
|
||||
- debug:
|
||||
msg: "Prepare manila_share upgrade for {{ manila_share_short_node_names_upgraded }}"
|
||||
- name: remove manila_share init container on upgrade-scaleup to force re-init
|
||||
shell: |
|
||||
if podman inspect manila_share_init_bundle &> /dev/null; then
|
||||
|
|
|
@ -375,9 +375,6 @@ outputs:
|
|||
- groups['ovn_dbs'] | length > 1
|
||||
- item.split('.')[0] in ansible_limit.split(',')
|
||||
loop: "{{ ovn_dbs_short_node_names }}"
|
||||
|
||||
- debug:
|
||||
msg: "Prepare ovn_dbs upgrade for {{ ovn_dbs_short_node_names_upgraded }}"
|
||||
- fail:
|
||||
msg: >
|
||||
You can't upgrade ovn_dbs without staged
|
||||
|
@ -386,7 +383,8 @@ outputs:
|
|||
when: >-
|
||||
ovn_dbs_short_node_names_upgraded is not defined or
|
||||
ovn_dbs_short_node_names_upgraded | length == 0
|
||||
|
||||
- debug:
|
||||
msg: "Prepare ovn_dbs upgrade for {{ ovn_dbs_short_node_names_upgraded }}"
|
||||
- name: remove ovn_dbs init container on upgrade-scaleup to force re-init
|
||||
shell: |
|
||||
if podman inspect ovn_dbs_init_bundle &> /dev/null; then
|
||||
|
|
Loading…
Reference in New Issue