From 155c7b53d55bb9008d9c33a583c5240fa2ec1256 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Tue, 3 Apr 2018 09:42:36 -0500 Subject: [PATCH] Ceph: Mgr: force key creation on each restart This PS forces keyring creation on each start of the mgr container. It resolves an issue found following k8s outage, where sometimes the key is not created correctly the 1st time the container starts. Change-Id: I7e642ca49883ac823196730362b796cd52cd841c --- ceph/templates/bin/mgr/_start.sh.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ceph/templates/bin/mgr/_start.sh.tpl b/ceph/templates/bin/mgr/_start.sh.tpl index 6fc7686ca0..be622ac317 100644 --- a/ceph/templates/bin/mgr/_start.sh.tpl +++ b/ceph/templates/bin/mgr/_start.sh.tpl @@ -17,7 +17,8 @@ if [ ${CEPH_GET_ADMIN_KEY} -eq 1 ]; then fi fi -# Check to see if our MGR has been initialized +# Create a MGR keyring +rm -rf $MGR_KEYRING if [ ! -e "$MGR_KEYRING" ]; then # Create ceph-mgr key timeout 10 ceph --cluster "${CLUSTER}" auth get-or-create mgr."${MGR_NAME}" mon 'allow profile mgr' osd 'allow *' mds 'allow *' -o "$MGR_KEYRING"