Files
openstack-armada-app/openstack-helm-infra/debian/deb_folder/patches/0019-Add-force_boot-command-to-rabbit-start-template.patch
Thales Elero Cervi ca2a1d0fae Fix rabbitmq chart duplicated probes key
This change updates our openstack-helm-infra patches to rabbitmq chart
so that no duplicate keys are placed in a yaml file.

Initial stx-openstack tests on Debian showed that the most updated
platform version fails to upload an app that has duplicated keys, during
the sysinv map construction step. So this fix is required to update
stx-openstack with the best yaml syntax practices.

Test Plan:
PASS - Build openstack-helm-infra package
PASS - Build stx-openstack helm charts app
PASS - Upload stx-openstack on Debian

Closes-Bug: 1997564

Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Change-Id: Ib7f63fee2868b2ccea3ab95a8c83edba96af1c7e
2022-11-23 13:05:43 -03:00

67 lines
2.3 KiB
Diff

From a0206d9626323ed4ef57bd4ecc072e3f96aa043a Mon Sep 17 00:00:00 2001
From: Maik Catrinque <maik.wandercatrinqueandrade@windriver.com>
Date: Fri, 14 Jan 2022 15:07:40 -0300
Subject: [PATCH] Add force_boot command to rabbit start template
Currently, if a multi-node cluster is shut down unexpectedly,
RabbitMQ is not able to boot and sync with the other nodes.
The purpose of this change is to add the possibility to use the
rabbitmqctl force_boot command to recover RabbitMQ cluster from
an unexpected shut down.
Test plan:
PASS: Shutdown and start a multi-node RabbitMQ cluster
Regression:
PASS: OpenStack can be applied successfully
PASS: RabbitMQ nodes can join the RabbitMQ cluster
Story: 2009784
Task: 44290
Ref:
[0] https://www.rabbitmq.com/rabbitmqctl.8.html#force_boot
Signed-off-by: Maik Catrinque <maik.wandercatrinqueandrade@windriver.com>
Co-authored-by: Andrew Martins Carletti <Andrew.MartinsCarletti@windriver.com>
Change-Id: I56e966ea64e8881ba436213f0c9e1cbe547098e3
Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windrive.com>
---
rabbitmq/templates/bin/_rabbitmq-start.sh.tpl | 3 +++
rabbitmq/values.yaml | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl b/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl
index 794f0919..4ef849fd 100644
--- a/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl
+++ b/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl
@@ -94,4 +94,7 @@ if ! [ "${POD_INCREMENT}" -eq "0" ] && ! [ -d "/var/lib/rabbitmq/mnesia" ] ; the
rm -fv /tmp/rabbit-disable-readiness /tmp/rabbit-disable-liveness-probe
fi
+{{- if .Values.forceBoot.enabled }}
+if [ "${POD_INCREMENT}" -eq "0" ] && [ -d "/var/lib/rabbitmq/mnesia/${RABBITMQ_NODENAME}" ]; then rabbitmqctl force_boot; fi
+{{- end}}
exec rabbitmq-server
diff --git a/rabbitmq/values.yaml b/rabbitmq/values.yaml
index 90ed6d21..65a9526e 100644
--- a/rabbitmq/values.yaml
+++ b/rabbitmq/values.yaml
@@ -46,6 +46,12 @@ images:
- dep_check
- image_repo_sync
+# forceBoot: executes 'rabbitmqctl force_boot' to force boot on
+# cluster shut down unexpectedly in an unknown order.
+# ref: https://www.rabbitmq.com/rabbitmqctl.8.html#force_boot
+forceBoot:
+ enabled: false
+
pod:
probes:
readiness:
--
2.25.1