mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rbd: update namespace name in rados object
If a PV is reattached to a new PVC in a different namespace we need to update the namespace name in the rados object. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
019628c8c2
commit
07aa9dea5c
@ -864,3 +864,9 @@ func (conn *Connection) ReserveNewUUIDMapping(ctx context.Context,
|
||||
|
||||
return setOMapKeys(ctx, conn, journalPool, cj.namespace, cj.csiDirectory, setKeys)
|
||||
}
|
||||
|
||||
// ResetVolumeOwner updates the owner in the rados object.
|
||||
func (conn *Connection) ResetVolumeOwner(ctx context.Context, pool, reservedUUID, owner string) error {
|
||||
return setOMapKeys(ctx, conn, pool, conn.config.namespace, conn.config.cephUUIDDirectoryPrefix+reservedUUID,
|
||||
map[string]string{conn.config.ownerKey: owner})
|
||||
}
|
||||
|
Reference in New Issue
Block a user