From 507844c9b108992f1d6e8b5e8a6d9113e3e5fb9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Knecht?= Date: Wed, 6 Jul 2022 11:03:12 +0200 Subject: [PATCH] rbd: Use rados namespace when getting clone depth MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the Ceph user is restricted to a specific namespace in the pool, it is crucial that evey interaction with the cluster is done within that namespace. This wasn't the case in `getCloneDepth()`. This issue was causing snapshot creation to fail with > Failed to check and update snapshot content: failed to take snapshot of the > volume X: "rpc error: code = Internal desc = rbd: ret=-1, Operation not > permitted" Signed-off-by: BenoƮt Knecht --- internal/rbd/rbd_util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/rbd/rbd_util.go b/internal/rbd/rbd_util.go index e5ece5658..3d36cf6f7 100644 --- a/internal/rbd/rbd_util.go +++ b/internal/rbd/rbd_util.go @@ -681,6 +681,7 @@ func (ri *rbdImage) getCloneDepth(ctx context.Context) (uint, error) { vol.Pool = ri.Pool vol.Monitors = ri.Monitors vol.RbdImageName = ri.RbdImageName + vol.RadosNamespace = ri.RadosNamespace vol.conn = ri.conn.Copy() for {