From 37ac688842b276d3daf53797c16711d835e10b3e Mon Sep 17 00:00:00 2001 From: ju217q Date: Tue, 12 Apr 2022 08:27:08 -0400 Subject: [PATCH] [RabbitMQ] Fixed guest account removal Fixed condition where node names were blank under certain conditions and account would not get removed Change-Id: Idf895eb649a439844b9a90fdcb57f5f022717079 --- rabbitmq/Chart.yaml | 2 +- rabbitmq/templates/bin/_rabbitmq-wait-for-cluster.sh.tpl | 2 ++ releasenotes/notes/rabbitmq.yaml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rabbitmq/Chart.yaml b/rabbitmq/Chart.yaml index 3ccfc89e7..b6b99f135 100644 --- a/rabbitmq/Chart.yaml +++ b/rabbitmq/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v3.9.0 description: OpenStack-Helm RabbitMQ name: rabbitmq -version: 0.1.22 +version: 0.1.23 home: https://github.com/rabbitmq/rabbitmq-server ... diff --git a/rabbitmq/templates/bin/_rabbitmq-wait-for-cluster.sh.tpl b/rabbitmq/templates/bin/_rabbitmq-wait-for-cluster.sh.tpl index 142088a03..7ea2fa6d5 100644 --- a/rabbitmq/templates/bin/_rabbitmq-wait-for-cluster.sh.tpl +++ b/rabbitmq/templates/bin/_rabbitmq-wait-for-cluster.sh.tpl @@ -79,6 +79,8 @@ if test "$(active_rabbit_nodes)" -gt "$RABBIT_REPLICA_COUNT"; then rabbitmqctl -l -n "${PRIMARY_NODE}" cluster_status fi +# Get current node list +PRIMARY_NODE="$(sorted_node_list | awk '{ print $1; exit }')" # Delete guest admin user echo "Removing Guest admin user account" rabbitmqctl -l -n "${PRIMARY_NODE}" delete_user guest || true diff --git a/releasenotes/notes/rabbitmq.yaml b/releasenotes/notes/rabbitmq.yaml index b7a57d8c3..ca1394923 100644 --- a/releasenotes/notes/rabbitmq.yaml +++ b/releasenotes/notes/rabbitmq.yaml @@ -22,4 +22,5 @@ rabbitmq: - 0.1.20 Bump Rabbitmq version to 3.9.0 - 0.1.21 Updated naming for subchart compatibility - 0.1.22 Remove guest admin account + - 0.1.23 Fixed guest account removal ...