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.
Change-Id: I9ffddcaa52314c615362969757c94ebdf01a3b6d
Closes-Bug: #1861663
(cherry picked from commit bca35e611b
)
This commit is contained in:
parent
97c2d4b99a
commit
26e00764f7
|
@ -357,8 +357,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
|
||||
|
@ -369,6 +367,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
|
||||
include_role:
|
||||
name: tripleo-container-rm
|
||||
|
|
|
@ -343,8 +343,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
|
||||
|
@ -355,6 +353,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
|
||||
include_role:
|
||||
name: tripleo-container-rm
|
||||
|
|
|
@ -503,9 +503,6 @@ outputs:
|
|||
- groups['mysql'] | length > 1
|
||||
- item.split('.')[0] in ansible_limit.split(',')
|
||||
loop: "{{ mysql_node_names }}"
|
||||
|
||||
- debug:
|
||||
msg: "Prepare galera upgrade for {{ mysql_short_node_names_upgraded }}"
|
||||
- fail:
|
||||
msg: >
|
||||
You can't upgrade galera without staged upgrade.
|
||||
|
@ -515,7 +512,8 @@ outputs:
|
|||
mysql_short_node_names_upgraded | length == 0 or
|
||||
mysql_node_names_upgraded is not defined or
|
||||
mysql_node_names_upgraded | length == 0
|
||||
|
||||
- debug:
|
||||
msg: "Prepare galera upgrade for {{ mysql_short_node_names_upgraded }}"
|
||||
- name: remove mysql init container on upgrade-scaleup to force re-init
|
||||
include_role:
|
||||
name: tripleo-container-rm
|
||||
|
|
|
@ -436,9 +436,6 @@ outputs:
|
|||
- groups['redis'] | length > 1
|
||||
- item.split('.')[0] in ansible_limit.split(',')
|
||||
loop: "{{ redis_short_node_names }}"
|
||||
|
||||
- debug:
|
||||
msg: "Prepare redis upgrade for {{ redis_short_node_names_upgraded }}"
|
||||
- fail:
|
||||
msg: >
|
||||
You can't upgrade redis without staged
|
||||
|
@ -447,7 +444,8 @@ outputs:
|
|||
when: >-
|
||||
redis_short_node_names_upgraded is not defined or
|
||||
redis_short_node_names_upgraded | length == 0
|
||||
|
||||
- debug:
|
||||
msg: "Prepare redis upgrade for {{ redis_short_node_names_upgraded }}"
|
||||
- name: remove redis init container on upgrade-scaleup to force re-init
|
||||
include_role:
|
||||
name: tripleo-container-rm
|
||||
|
|
|
@ -555,9 +555,6 @@ outputs:
|
|||
- groups['haproxy'] | length > 1
|
||||
- item.split('.')[0] in ansible_limit.split(',')
|
||||
loop: "{{ haproxy_short_node_names }}"
|
||||
|
||||
- debug:
|
||||
msg: "Prepare haproxy upgrade for {{ haproxy_short_node_names_upgraded }}"
|
||||
- fail:
|
||||
msg: >
|
||||
You can't upgrade haproxy without staged
|
||||
|
@ -566,7 +563,8 @@ outputs:
|
|||
when: >-
|
||||
haproxy_short_node_names_upgraded is not defined or
|
||||
haproxy_short_node_names_upgraded | length == 0
|
||||
|
||||
- debug:
|
||||
msg: "Prepare haproxy upgrade for {{ haproxy_short_node_names_upgraded }}"
|
||||
- name: remove haproxy init container on upgrade-scaleup to force re-init
|
||||
include_role:
|
||||
name: tripleo-container-rm
|
||||
|
|
|
@ -345,8 +345,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
|
||||
|
@ -357,6 +355,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
|
||||
include_role:
|
||||
name: tripleo-container-rm
|
||||
|
|
|
@ -439,9 +439,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
|
||||
|
@ -450,7 +447,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
|
||||
include_role:
|
||||
name: tripleo-container-rm
|
||||
|
|
|
@ -223,9 +223,6 @@ outputs:
|
|||
- groups['pacemaker'] | length > 1
|
||||
- item.split('.')[0] in ansible_limit.split(',')
|
||||
loop: "{{ pacemaker_short_node_names }}"
|
||||
|
||||
- debug:
|
||||
msg: "Prepare pacemaker upgrade for {{ pacemaker_short_node_names_upgraded }}"
|
||||
- fail:
|
||||
msg: >
|
||||
You can't upgrade pacemaker without staged
|
||||
|
@ -234,6 +231,8 @@ outputs:
|
|||
when: >-
|
||||
pacemaker_short_node_names_upgraded is not defined or
|
||||
pacemaker_short_node_names_upgraded | length == 0
|
||||
- debug:
|
||||
msg: "Prepare pacemaker upgrade for {{ pacemaker_short_node_names_upgraded }}"
|
||||
- name: set pacemaker node ips fact from the names fact
|
||||
set_fact:
|
||||
# Generate matching IPs for the names, e.g. for these varaible values:
|
||||
|
|
|
@ -398,9 +398,6 @@ outputs:
|
|||
- groups['oslo_messaging_notify'] | length > 1
|
||||
- item.split('.')[0] in ansible_limit.split(',')
|
||||
loop: "{{ oslo_messaging_notify_node_names }}"
|
||||
|
||||
- debug:
|
||||
msg: "Prepare oslo_messaging_notify upgrade for {{ oslo_messaging_notify_short_node_names_upgraded }}"
|
||||
- fail:
|
||||
msg: >
|
||||
You can't upgrade oslo_messaging_notify without
|
||||
|
@ -411,7 +408,8 @@ outputs:
|
|||
oslo_messaging_notify_short_node_names_upgraded | length == 0 or
|
||||
oslo_messaging_notify_node_names_upgraded is not defined or
|
||||
oslo_messaging_notify_node_names_upgraded | length == 0
|
||||
|
||||
- debug:
|
||||
msg: "Prepare oslo_messaging_notify upgrade for {{ oslo_messaging_notify_short_node_names_upgraded }}"
|
||||
- name: remove rabbitmq init container on upgrade-scaleup to force re-init
|
||||
include_role:
|
||||
name: tripleo-container-rm
|
||||
|
|
|
@ -397,9 +397,6 @@ outputs:
|
|||
- groups['rabbitmq'] | length > 1
|
||||
- item.split('.')[0] in ansible_limit.split(',')
|
||||
loop: "{{ rabbitmq_short_node_names }}"
|
||||
|
||||
- debug:
|
||||
msg: "Prepare rabbitmq upgrade for {{ rabbitmq_short_node_names_upgraded }}"
|
||||
- fail:
|
||||
msg: >
|
||||
You can't upgrade rabbitmq without staged
|
||||
|
@ -408,7 +405,8 @@ outputs:
|
|||
when: >-
|
||||
rabbitmq_short_node_names_upgraded is not defined or
|
||||
rabbitmq_short_node_names_upgraded | length == 0
|
||||
|
||||
- debug:
|
||||
msg: "Prepare rabbitmq upgrade for {{ rabbitmq_short_node_names_upgraded }}"
|
||||
- name: remove rabbitmq init container on upgrade-scaleup to force re-init
|
||||
include_role:
|
||||
name: tripleo-container-rm
|
||||
|
|
|
@ -404,9 +404,6 @@ outputs:
|
|||
- groups['oslo_messaging_rpc'] | length > 1
|
||||
- item.split('.')[0] in ansible_limit.split(',')
|
||||
loop: "{{ oslo_messaging_rpc_node_names }}"
|
||||
|
||||
- debug:
|
||||
msg: "Prepare oslo_messaging_rpc upgrade for {{ oslo_messaging_rpc_short_node_names_upgraded }}"
|
||||
- fail:
|
||||
msg: >
|
||||
You can't upgrade oslo_messaging_rpc without
|
||||
|
@ -417,7 +414,8 @@ outputs:
|
|||
oslo_messaging_rpc_short_node_names_upgraded | length == 0 or
|
||||
oslo_messaging_rpc_node_names_upgraded is not defined or
|
||||
oslo_messaging_rpc_node_names_upgraded | length == 0
|
||||
|
||||
- debug:
|
||||
msg: "Prepare oslo_messaging_rpc upgrade for {{ oslo_messaging_rpc_short_node_names_upgraded }}"
|
||||
- name: remove rabbitmq init container on upgrade-scaleup to force re-init
|
||||
include_role:
|
||||
name: tripleo-container-rm
|
||||
|
|
Loading…
Reference in New Issue