From a6bbe031f17d82e2a4ef7338de65acb762e9527a Mon Sep 17 00:00:00 2001 From: Yuriy Nesenenko Date: Wed, 23 Dec 2015 16:00:02 +0200 Subject: [PATCH] Fix restoring a backup volume to a larger volume We cannot restore a backup to a larger volume on ceph because it fails with status "error_restoring". This patch adds read/write permissions to volumes pool for backup user. We need such permissions to change volume size during restoring backup when the backup is smaller than a volume. Change-Id: I794c1126bcee4e07baf5a9dcfee779fd61da5636 Closes-Bug: 1519749 --- lib/cinder_backends/ceph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cinder_backends/ceph b/lib/cinder_backends/ceph index c21350ba01..9bff5bef4f 100644 --- a/lib/cinder_backends/ceph +++ b/lib/cinder_backends/ceph @@ -62,7 +62,7 @@ function configure_cinder_backend_ceph { sudo ceph -c ${CEPH_CONF_FILE} osd pool set ${CINDER_BAK_CEPH_POOL} crush_ruleset ${RULE_ID} fi fi - sudo ceph -c ${CEPH_CONF_FILE} auth get-or-create client.${CINDER_BAK_CEPH_USER} mon "allow r" osd "allow class-read object_prefix rbd_children, allow rwx pool=${CINDER_BAK_CEPH_POOL}" | sudo tee ${CEPH_CONF_DIR}/ceph.client.${CINDER_BAK_CEPH_USER}.keyring + sudo ceph -c ${CEPH_CONF_FILE} auth get-or-create client.${CINDER_BAK_CEPH_USER} mon "allow r" osd "allow class-read object_prefix rbd_children, allow rwx pool=${CINDER_BAK_CEPH_POOL}, allow rwx pool=${CINDER_CEPH_POOL}" | sudo tee ${CEPH_CONF_DIR}/ceph.client.${CINDER_BAK_CEPH_USER}.keyring sudo chown $(whoami):$(whoami) ${CEPH_CONF_DIR}/ceph.client.${CINDER_BAK_CEPH_USER}.keyring iniset $CINDER_CONF DEFAULT backup_driver "cinder.backup.drivers.ceph"