mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
rbd: Use rados namespace when getting clone depth
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 <bknecht@protonmail.ch>
This commit is contained in:
parent
aed7d8d4e4
commit
507844c9b1
@ -681,6 +681,7 @@ func (ri *rbdImage) getCloneDepth(ctx context.Context) (uint, error) {
|
|||||||
vol.Pool = ri.Pool
|
vol.Pool = ri.Pool
|
||||||
vol.Monitors = ri.Monitors
|
vol.Monitors = ri.Monitors
|
||||||
vol.RbdImageName = ri.RbdImageName
|
vol.RbdImageName = ri.RbdImageName
|
||||||
|
vol.RadosNamespace = ri.RadosNamespace
|
||||||
vol.conn = ri.conn.Copy()
|
vol.conn = ri.conn.Copy()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
Loading…
Reference in New Issue
Block a user