From eef8ea131aaeb9996755dba23286bee80e19e451 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Wed, 31 Jul 2019 12:42:27 -0500 Subject: [PATCH] RabbitMQ: Dont remove definitions.json and erlang cookie when resetting This PS udpated the reset node function to leave the assets generated via init containers in place when resetting the node. Change-Id: Iac52ca82e95bb372dbcbca0eeea3b262215e9c12 Signed-off-by: Pete Birley --- rabbitmq/templates/bin/_rabbitmq-start.sh.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl b/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl index 7993518a7..93096475c 100644 --- a/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl +++ b/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl @@ -64,7 +64,7 @@ if ! [ "${POD_INCREMENT}" -eq "0" ] && ! [ -d "/var/lib/rabbitmq/mnesia" ] ; the function reset_rabbit () { rabbitmqctl shutdown || true - rm -rf /var/lib/rabbitmq/* + find /var/lib/rabbitmq/ ! -name 'definitions.json' ! -name '.erlang.cookie' -exec rm -rf {} + exit 1 }