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
This commit is contained in:
parent
a3916383d3
commit
bca35e611b
|
@ -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
|
||||
|
|
|
@ -496,9 +496,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.
|
||||
|
@ -508,7 +505,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
|
||||
|
|
|
@ -428,9 +428,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
|
||||
|
@ -439,7 +436,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
|
||||
|
|
|
@ -548,9 +548,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
|
||||
|
@ -559,7 +556,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
|
||||
|
|
|
@ -337,8 +337,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
|
||||
|
@ -349,6 +347,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
|
||||
|
|
|
@ -431,9 +431,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
|
||||
|
@ -442,7 +439,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:
|
||||
|
|
|
@ -390,9 +390,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
|
||||
|
@ -403,7 +400,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
|
||||
|
|
|
@ -389,9 +389,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
|
||||
|
@ -400,7 +397,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
|
||||
|
|
|
@ -396,9 +396,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
|
||||
|
@ -409,7 +406,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