
Each patch included in this commit contains a commit message that describes the required purpose of the patch. Change-Id: Ia92158b77478c602e65280b09a744414c1bb31aa Depends-On: Ic788a2c86edfbceca1f1ff18dd0344472546c81b Story: 2004520 Task: 29966 Signed-off-by: Robert Church <robert.church@windriver.com>
51 lines
1.8 KiB
Diff
51 lines
1.8 KiB
Diff
From 71972bb0f45ca2bdd1aefa70061d087400b5251c Mon Sep 17 00:00:00 2001
|
|
From: Robert Church <robert.church@windriver.com>
|
|
Date: Fri, 22 Mar 2019 13:02:23 -0400
|
|
Subject: [PATCH 4/5] Enable Ceph Jewel support for gnocchi
|
|
|
|
Current upstream charts align to Ceph Luminous/Mimic. Revert
|
|
functionality that is not present in Jewel.
|
|
|
|
Drop this after the Ceph rebase to Mimic is complete.
|
|
|
|
Signed-off-by: Robert Church <robert.church@windriver.com>
|
|
---
|
|
gnocchi/templates/bin/_storage-init.sh.tpl | 20 ++++++++------------
|
|
1 file changed, 8 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/gnocchi/templates/bin/_storage-init.sh.tpl b/gnocchi/templates/bin/_storage-init.sh.tpl
|
|
index 328d27b..39a0f8c 100644
|
|
--- a/gnocchi/templates/bin/_storage-init.sh.tpl
|
|
+++ b/gnocchi/templates/bin/_storage-init.sh.tpl
|
|
@@ -36,19 +36,15 @@ function ensure_pool () {
|
|
ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} "gnocchi-metrics"
|
|
|
|
if USERINFO=$(ceph auth get client.${RBD_POOL_USER}); then
|
|
- echo "Cephx user client.${RBD_POOL_USER} already exist."
|
|
- echo "Update its cephx caps"
|
|
- ceph auth caps client.${RBD_POOL_USER} \
|
|
- mon "profile r" \
|
|
- osd "profile rwx pool=${RBD_POOL_NAME}" \
|
|
- mgr "allow r"
|
|
- ceph auth get client.${RBD_POOL_USER} -o ${KEYRING}
|
|
+ KEYSTR=$(echo $USERINFO | sed 's/.*\( key = .*\) caps mon.*/\1/')
|
|
+ echo $KEYSTR > ${KEYRING}
|
|
else
|
|
- ceph auth get-or-create client.${RBD_POOL_USER} \
|
|
- mon "profile r" \
|
|
- osd "profile rwx pool=${RBD_POOL_NAME}" \
|
|
- mgr "allow r" \
|
|
- -o ${KEYRING}
|
|
+ #NOTE(Portdirect): Determine proper privs to assign keyring
|
|
+ ceph auth get-or-create client.${RBD_POOL_USER} \
|
|
+ mon "allow *" \
|
|
+ osd "allow *" \
|
|
+ mgr "allow *" \
|
|
+ -o ${KEYRING}
|
|
fi
|
|
|
|
ENCODED_KEYRING=$(sed -n 's/^[[:blank:]]*key[[:blank:]]\+=[[:blank:]]\(.*\)/\1/p' ${KEYRING} | base64 -w0)
|
|
--
|
|
2.16.5
|
|
|