From f8c58ed9695954e2a8dc5985550c2e5838d637be Mon Sep 17 00:00:00 2001 From: portdirect Date: Thu, 28 Dec 2017 19:29:43 -0500 Subject: [PATCH] Glance: Update RBD pool management to better support luminious This PS updates the RBD pool management job to better support luminious, which expects an application to be assigned to the pool. Change-Id: I6c77853c761491ddc42171a3521b70518d63242a --- ceph/templates/templates/_admin.keyring.tpl | 1 + glance/templates/bin/_storage-init.sh.tpl | 4 +++- glance/values.yaml | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ceph/templates/templates/_admin.keyring.tpl b/ceph/templates/templates/_admin.keyring.tpl index 7c5de607b6..e012ebe858 100644 --- a/ceph/templates/templates/_admin.keyring.tpl +++ b/ceph/templates/templates/_admin.keyring.tpl @@ -4,3 +4,4 @@ caps mds = "allow" caps mon = "allow *" caps osd = "allow *" + caps mgr = "allow *" diff --git a/glance/templates/bin/_storage-init.sh.tpl b/glance/templates/bin/_storage-init.sh.tpl index 754cbb82f9..e02aebeaf5 100644 --- a/glance/templates/bin/_storage-init.sh.tpl +++ b/glance/templates/bin/_storage-init.sh.tpl @@ -33,8 +33,9 @@ elif [ "x$STORAGE_BACKEND" == "xrbd" ]; then ceph -s function ensure_pool () { ceph osd pool stats $1 || ceph osd pool create $1 $2 + ceph osd pool application enable $1 $3 } - ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} + ensure_pool ${RBD_POOL_NAME} ${RBD_POOL_CHUNK_SIZE} "glance-image" if USERINFO=$(ceph auth get client.${RBD_POOL_USER}); then KEYSTR=$(echo $USERINFO | sed 's/.*\( key = .*\) caps mon.*/\1/') @@ -44,6 +45,7 @@ elif [ "x$STORAGE_BACKEND" == "xrbd" ]; then ceph auth get-or-create client.${RBD_POOL_USER} \ mon "allow *" \ osd "allow *" \ + mgr "allow *" \ -o ${KEYRING} fi diff --git a/glance/values.yaml b/glance/values.yaml index 3a6921fca3..319ddc2638 100644 --- a/glance/values.yaml +++ b/glance/values.yaml @@ -216,8 +216,8 @@ conf: memcache_security_strategy: ENCRYPT glance_store: rbd_store_chunk_size: 8 - rbd_store_pool: images - rbd_store_user: images + rbd_store_pool: glance.images + rbd_store_user: glance rbd_store_ceph_conf: /etc/ceph/ceph.conf filesystem_store_datadir: /var/lib/glance/images default_swift_reference: ref1