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
This commit is contained in:
Pete Birley 2018-04-03 09:42:36 -05:00
parent 5d0d1462fb
commit 155c7b53d5

View File

@ -17,7 +17,8 @@ if [ ${CEPH_GET_ADMIN_KEY} -eq 1 ]; then
fi fi
fi fi
# Check to see if our MGR has been initialized # Create a MGR keyring
rm -rf $MGR_KEYRING
if [ ! -e "$MGR_KEYRING" ]; then if [ ! -e "$MGR_KEYRING" ]; then
# Create ceph-mgr key # 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" timeout 10 ceph --cluster "${CLUSTER}" auth get-or-create mgr."${MGR_NAME}" mon 'allow profile mgr' osd 'allow *' mds 'allow *' -o "$MGR_KEYRING"