Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "ovn_dbs upgrade-with-os work" into stable/train
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Dec 5, 2019
2 parents 90c9916 + b1abede commit 9a0d74a
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions deployment/ovn/ovn-dbs-pacemaker-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,54 @@ outputs:
register: output
retries: 5
until: output.rc == 0
- when:
- step|int == 1
block:
- name: set ovn_dbs upgrade node facts in a single-node environment
set_fact:
ovn_dbs_short_node_names_upgraded: "{{ ovn_dbs_short_node_names }}"
cacheable: no
when: groups['ovn_dbs'] | length <= 1
- name: set ovn_dbs upgrade node facts from the limit option
set_fact:
ovn_dbs_short_node_names_upgraded: "{{ ovn_dbs_short_node_names_upgraded|default([]) + [item.split('.')[0]] }}"
cacheable: no
when:
- 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
upgrade. You need to use the limit option in order
to do so.
when: >-
ovn_dbs_short_node_names_upgraded is not defined or
ovn_dbs_short_node_names_upgraded | length == 0
- name: remove ovn_dbs init container on upgrade-scaleup to force re-init
shell: |
if podman inspect ovn_dbs_init_bundle &> /dev/null; then
podman rm ovn_dbs_init_bundle
fi
when: ovn_dbs_short_node_names_upgraded | length > 1
- name: add the ovn_dbs short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera
tasks_from: set.yml
vars:
tripleo_upgrade_key: ovn_dbs_short_node_names_override
tripleo_upgrade_value: "{{ovn_dbs_short_node_names_upgraded}}"
- name: remove the extra hiera data needed for the upgrade.
include_role:
name: tripleo-upgrade-hiera
tasks_from: remove.yml
vars:
tripleo_upgrade_key: ovn_dbs_short_node_names_override
when: ovn_dbs_short_node_names_upgraded | length == ovn_dbs_short_node_names | length
- name: Retag the pacemaker image if containerized
when:
- step|int == 3
Expand Down

0 comments on commit 9a0d74a

Please sign in to comment.