Fix designate upgrades when internal RPC version changes

When upgrading from 2023.1 to 2023.2 in a HA environment,
the Designate pool update command failed as it ran using
an upgraded client, but made RPC calls against instances
which had not been upgraded yet.

This commit moves the pool update to the last play host
in order to ensure that in an upgrade situation, all
virtualenvs have been upgraded first to ensure no client/
server version conflicts.

Change-Id: I93af581696de0913710592f9033545b87547b78a
This commit is contained in:
Andrew Bonney 2024-04-02 08:17:15 +01:00
parent e7f7e7d122
commit 151043d7f0
2 changed files with 7 additions and 1 deletions

View File

@ -198,7 +198,7 @@
group: "{{ designate_system_group_name }}"
when:
- designate_pools_yaml is defined
- _designate_is_first_play_host
- _designate_is_last_play_host
notify:
- Perform Designate pools update
tags:

View File

@ -19,6 +19,12 @@ _designate_is_first_play_host: >-
inventory_hostname == (groups[designate_services['designate-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
}}
_designate_is_last_play_host: >-
{{
(designate_services['designate-api']['group'] in group_names and
inventory_hostname == (groups[designate_services['designate-api']['group']] | intersect(ansible_play_hosts)) | last) | bool
}}
_designate_oslomsg_rpc_vhost_conf: >-
{{
(designate_oslomsg_rpc_vhost is string) | ternary(