Merge "Prevent ovn dbs related facts to run on each step."
This commit is contained in:
commit
1ed76a298c
@ -315,12 +315,6 @@ outputs:
|
|||||||
shell: "pcs resource ban ovn-dbs-bundle $(hostname | cut -d. -f1)"
|
shell: "pcs resource ban ovn-dbs-bundle $(hostname | cut -d. -f1)"
|
||||||
when:
|
when:
|
||||||
- step|int == 1
|
- step|int == 1
|
||||||
- name: Get docker ovn-dbs image
|
|
||||||
set_fact:
|
|
||||||
ovn_dbs_image: {get_param: ContainerOvnDbsImage}
|
|
||||||
ovn_dbs_image_latest: *ovn_dbs_image_pcmklatest
|
|
||||||
- name: set is_ovn_dbs_bootstrap_node fact
|
|
||||||
set_fact: is_ovn_dbs_bootstrap_node={{ovn_dbs_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
|
||||||
- name: ovn-dbs fetch and retag container image for pacemaker
|
- name: ovn-dbs fetch and retag container image for pacemaker
|
||||||
when:
|
when:
|
||||||
- step|int == 3
|
- step|int == 3
|
||||||
@ -342,6 +336,9 @@ outputs:
|
|||||||
container_image_latest: "{{ovn_dbs_image_latest}}"
|
container_image_latest: "{{ovn_dbs_image_latest}}"
|
||||||
when:
|
when:
|
||||||
- old_ovn_dbs_image_id.stdout != new_ovn_dbs_image_id.stdout
|
- old_ovn_dbs_image_id.stdout != new_ovn_dbs_image_id.stdout
|
||||||
|
vars:
|
||||||
|
ovn_dbs_image: {get_param: ContainerOvnDbsImage}
|
||||||
|
ovn_dbs_image_latest: *ovn_dbs_image_pcmklatest
|
||||||
# We remove any leftover error and remove the ban.
|
# We remove any leftover error and remove the ban.
|
||||||
- name: Ensure the cluster converge back even in case of schema change
|
- name: Ensure the cluster converge back even in case of schema change
|
||||||
shell: "pcs resource cleanup ovn-dbs-bundle"
|
shell: "pcs resource cleanup ovn-dbs-bundle"
|
||||||
@ -359,7 +356,7 @@ outputs:
|
|||||||
- name: Update ovn-dbs-bundle resource to use pcmklatest tag image if not used
|
- name: Update ovn-dbs-bundle resource to use pcmklatest tag image if not used
|
||||||
when:
|
when:
|
||||||
- step|int == 5
|
- step|int == 5
|
||||||
- is_ovn_dbs_bootstrap_node
|
- ovn_dbs_short_bootstrap_node_name|lower == ansible_hostname|lower
|
||||||
block:
|
block:
|
||||||
- name: Get the present image used by ovn-dbs-bundle
|
- name: Get the present image used by ovn-dbs-bundle
|
||||||
shell: "pcs resource config ovn-dbs-bundle | grep -Eo 'image=[^ ]+' | awk -F= '{print $2;}'"
|
shell: "pcs resource config ovn-dbs-bundle | grep -Eo 'image=[^ ]+' | awk -F= '{print $2;}'"
|
||||||
@ -411,13 +408,10 @@ outputs:
|
|||||||
- name: Set fact ovn_dbs_pcs_res
|
- name: Set fact ovn_dbs_pcs_res
|
||||||
set_fact:
|
set_fact:
|
||||||
ovn_dbs_pcs_res: "{{ ovn_dbs_pcs_result.rc == 0 }}"
|
ovn_dbs_pcs_res: "{{ ovn_dbs_pcs_result.rc == 0 }}"
|
||||||
- name: set is_ovn_dbs_bootstrap_node fact
|
|
||||||
tags: common
|
|
||||||
set_fact: is_ovn_dbs_bootstrap_node={{ovn_dbs_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
|
||||||
- name: Update ovn_dbs pcs resource bundle for new container image
|
- name: Update ovn_dbs pcs resource bundle for new container image
|
||||||
when:
|
when:
|
||||||
- step|int == 1
|
- step|int == 1
|
||||||
- is_ovn_dbs_bootstrap_node
|
- ovn_dbs_short_bootstrap_node_name|lower == ansible_hostname|lower
|
||||||
- ovn_dbs_pcs_res|bool
|
- ovn_dbs_pcs_res|bool
|
||||||
- ovn_dbs_image_current != ovn_dbs_image_latest
|
- ovn_dbs_image_current != ovn_dbs_image_latest
|
||||||
block:
|
block:
|
||||||
|
Loading…
Reference in New Issue
Block a user