Proceed with installation/upgrade even if cluster not healthy

At the moment rabbitmq_upgrade flag is being used on unhealthy
clusters to repair them. However with change [1] we've introduced
running this task standalone very early during the playbook.
In case cluster is unhelathy - there is no good way to repair it anymore
as
`rabbitmqctl cluster_status` might fail right away with.
So let's ignore failures at this point and run feature_flags only if
we were successfull on fetching the status.
[1] https://review.opendev.org/q/Idf33b6810e1afb3a89dad5e65a48e86ac0a58a67
Change-Id: Ie453f327850f9c9ae54823c17b0292517fa56a82
This commit is contained in:
Dmitriy Rabotyagov
2024年10月08日 16:55:01 +02:00
parent de2c7d19d3
commit 6b4a766db6

View File

@@ -17,6 +17,7 @@
command:"rabbitmqctl cluster_status --formatter json"
register:_cluster_status
changed_when:False
failed_when:False
tags:
- rabbitmq-upgrade
@@ -38,6 +39,7 @@
when:
- (_feature_flags.stdout_lines | length) > 0
when:
- _cluster_status.rc == 0
- ((_cluster_status.stdout | from_json)['running_nodes'] | length) == (groups[rabbitmq_host_group] | length)
- ((_cluster_status.stdout | from_json)['alarms'] | length) == 0
- ((_cluster_status.stdout | from_json)['partitions'] | length) == 0
Reference in New Issue
openstack/openstack-ansible-rabbitmq_server
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.