diff --git a/openstack-helm-infra/debian/deb_folder/patches/0019-Add-force_boot-command-to-rabbit-start-template.patch b/openstack-helm-infra/debian/deb_folder/patches/0019-Add-force_boot-command-to-rabbit-start-template.patch index 604965e2..f7fa0d4a 100644 --- a/openstack-helm-infra/debian/deb_folder/patches/0019-Add-force_boot-command-to-rabbit-start-template.patch +++ b/openstack-helm-infra/debian/deb_folder/patches/0019-Add-force_boot-command-to-rabbit-start-template.patch @@ -1,4 +1,4 @@ -From eac757e4a8ffd0e5db0bc1c9c2a652f65fd90353 Mon Sep 17 00:00:00 2001 +From a0206d9626323ed4ef57bd4ecc072e3f96aa043a Mon Sep 17 00:00:00 2001 From: Maik Catrinque Date: Fri, 14 Jan 2022 15:07:40 -0300 Subject: [PATCH] Add force_boot command to rabbit start template @@ -7,8 +7,8 @@ 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 from an -unexpected cluster shut down. +rabbitmqctl force_boot command to recover RabbitMQ cluster from +an unexpected shut down. Test plan: PASS: Shutdown and start a multi-node RabbitMQ cluster @@ -32,7 +32,7 @@ Change-Id: I56e966ea64e8881ba436213f0c9e1cbe547098e3 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl b/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl -index 794f0919..58eb5fc0 100644 +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 @@ -40,7 +40,7 @@ index 794f0919..58eb5fc0 100644 fi +{{- if .Values.forceBoot.enabled }} -+if [ -d "/var/lib/rabbitmq/mnesia/${RABBITMQ_NODENAME}" ]; then rabbitmqctl force_boot; fi ++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 diff --git a/openstack-helm-infra/files/0019-Add-force_boot-command-to-rabbit-start-template.patch b/openstack-helm-infra/files/0019-Add-force_boot-command-to-rabbit-start-template.patch index 604965e2..f7fa0d4a 100644 --- a/openstack-helm-infra/files/0019-Add-force_boot-command-to-rabbit-start-template.patch +++ b/openstack-helm-infra/files/0019-Add-force_boot-command-to-rabbit-start-template.patch @@ -1,4 +1,4 @@ -From eac757e4a8ffd0e5db0bc1c9c2a652f65fd90353 Mon Sep 17 00:00:00 2001 +From a0206d9626323ed4ef57bd4ecc072e3f96aa043a Mon Sep 17 00:00:00 2001 From: Maik Catrinque Date: Fri, 14 Jan 2022 15:07:40 -0300 Subject: [PATCH] Add force_boot command to rabbit start template @@ -7,8 +7,8 @@ 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 from an -unexpected cluster shut down. +rabbitmqctl force_boot command to recover RabbitMQ cluster from +an unexpected shut down. Test plan: PASS: Shutdown and start a multi-node RabbitMQ cluster @@ -32,7 +32,7 @@ Change-Id: I56e966ea64e8881ba436213f0c9e1cbe547098e3 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl b/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl -index 794f0919..58eb5fc0 100644 +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 @@ -40,7 +40,7 @@ index 794f0919..58eb5fc0 100644 fi +{{- if .Values.forceBoot.enabled }} -+if [ -d "/var/lib/rabbitmq/mnesia/${RABBITMQ_NODENAME}" ]; then rabbitmqctl force_boot; fi ++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 diff --git a/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml b/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml index 1c63620a..6866507f 100644 --- a/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml +++ b/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml @@ -351,6 +351,8 @@ data: release_group: osh-openstack-rabbitmq component: test values: + forceBoot: + enabled: true monitoring: prometheus: enabled: false