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

Commit

Permalink
Merge "Upgrade fixes for RabbitMQ and Pacemaker"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Jul 22, 2019
2 parents 1654fd2 + 47d1430 commit 91e418d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 12 deletions.
1 change: 0 additions & 1 deletion deployment/pacemaker/pacemaker-baremetal-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ outputs:
upgrade_leapp_enabled: {get_param: UpgradeLeappEnabled}
block:
- name: Check pacemaker cluster running before upgrade
when: step|int == 0
tags: validation
pacemaker_cluster: state=online check_and_fail=true
async: 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,25 +314,29 @@ outputs:
- name: set oslo_messaging_notify upgrade node facts in a single-node environment
set_fact:
oslo_messaging_notify_short_node_names_upgraded: "{{ oslo_messaging_notify_short_node_names }}"
oslo_messaging_notify_node_names_upgraded: "{{ oslo_messaging_notify_node_names }}"
cacheable: no
when: groups['oslo_messaging_notify'] | length == 1
- name: set oslo_messaging_notify upgrade node facts from the limit option
set_fact:
oslo_messaging_notify_short_node_names_upgraded: "{{ oslo_messaging_notify_short_node_names_upgraded|default([]) + [item.split('.')[0]] }}"
oslo_messaging_notify_node_names_upgraded: "{{ oslo_messaging_notify_node_names_upgraded|default([]) + [item] }}"
cacheable: no
when: item.split('.')[0] in ansible_limit.split(',')
loop: "{{ oslo_messaging_notify_short_node_names }}"
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 staged
upgrade. You need to use the limit option in order
You can't upgrade oslo_messaging_notify without
staged upgrade. You need to use the limit option in order
to do so.
when: >-
oslo_messaging_notify_short_node_names_upgraded is not defined or
oslo_messaging_notify_short_node_names_upgraded | length == 0
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
- name: add the oslo_messaging_notify short name to hiera data for the upgrade.
include_role:
Expand All @@ -341,13 +345,23 @@ outputs:
vars:
tripleo_upgrade_key: oslo_messaging_notify_short_node_names_override
tripleo_upgrade_value: "{{oslo_messaging_notify_short_node_names_upgraded}}"
- name: add the oslo_messaging_notify long name to hiera data for the upgrade
include_role:
name: tripleo-upgrade-hiera
tasks_from: set.yml
vars:
tripleo_upgrade_key: oslo_messaging_notify_node_names_override
tripleo_upgrade_value: "{{oslo_messaging_notify_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: oslo_messaging_notify_short_node_names_override
when: oslo_messaging_notify_short_node_names_upgraded | length == oslo_messaging_notify_short_node_names | length
tripleo_upgrade_key: "{{item}}"
loop:
- oslo_messaging_notify_short_node_names_override
- oslo_messaging_notify_node_names_override
when: oslo_messaging_notify_short_node_names_upgraded | length == oslo_messaging_notify_node_names | length
- when: step|int == 0
tags: common
block:
Expand Down
24 changes: 19 additions & 5 deletions deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -313,25 +313,29 @@ outputs:
- name: set oslo_messaging_rpc upgrade node facts in a single-node environment
set_fact:
oslo_messaging_rpc_short_node_names_upgraded: "{{ oslo_messaging_rpc_short_node_names }}"
oslo_messaging_rpc_node_names_upgraded: "{{ oslo_messaging_rpc_node_names }}"
cacheable: no
when: groups['oslo_messaging_rpc'] | length == 1
- name: set oslo_messaging_rpc upgrade node facts from the limit option
set_fact:
oslo_messaging_rpc_short_node_names_upgraded: "{{ oslo_messaging_rpc_short_node_names_upgraded|default([]) + [item.split('.')[0]] }}"
oslo_messaging_rpc_node_names_upgraded: "{{ oslo_messaging_rpc_node_names_upgraded|default([]) + [item] }}"
cacheable: no
when: item.split('.')[0] in ansible_limit.split(',')
loop: "{{ oslo_messaging_rpc_short_node_names }}"
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 staged
upgrade. You need to use the limit option in order
upgrade. You need to use the limit option in order
to do so.
when: >-
oslo_messaging_rpc_short_node_names_upgraded is not defined or
oslo_messaging_rpc_short_node_names_upgraded | length == 0
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
- name: add the oslo_messaging_rpc short name to hiera data for the upgrade.
include_role:
Expand All @@ -340,13 +344,23 @@ outputs:
vars:
tripleo_upgrade_key: oslo_messaging_rpc_short_node_names_override
tripleo_upgrade_value: "{{oslo_messaging_rpc_short_node_names_upgraded}}"
- name: add the oslo_messaging_rpc long name to hiera data for the upgrade
include_role:
name: tripleo-upgrade-hiera
tasks_from: set.yml
vars:
tripleo_upgrade_key: oslo_messaging_rpc_node_names_override
tripleo_upgrade_value: "{{oslo_messaging_rpc_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: oslo_messaging_rpc_short_node_names_override
when: oslo_messaging_rpc_short_node_names_upgraded | length == oslo_messaging_rpc_short_node_names | length
tripleo_upgrade_key: "{{item}}"
loop:
- oslo_messaging_rpc_short_node_names_override
- oslo_messaging_rpc_node_names_override
when: oslo_messaging_rpc_short_node_names_upgraded | length == oslo_messaging_rpc_node_names | length
- name: Get docker Rabbitmq image
set_fact:
rabbitmq_docker_image_latest: *rabbitmq_image_pcmklatest
Expand Down

0 comments on commit 91e418d

Please sign in to comment.