From 8a66575825be125b5c9f1762cc60f7e118e856ce Mon Sep 17 00:00:00 2001 From: Praveen M Date: Tue, 21 Jan 2025 15:33:56 +0530 Subject: [PATCH] rbd: use correct radosnamespace Issue: When an RBD image is created in a non-default namespace, the OMAP data for the PersistentVolume fails to regenerate because it still attempts to locate the RBD image in the default namespace. This commit ensures the correct radosNamespace is retrieved from the ceph-csi-config. Signed-off-by: Praveen M --- internal/rbd/rbd_journal.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/rbd/rbd_journal.go b/internal/rbd/rbd_journal.go index c8e1fd3e1..67e13daba 100644 --- a/internal/rbd/rbd_journal.go +++ b/internal/rbd/rbd_journal.go @@ -608,6 +608,10 @@ func RegenerateJournal( if err != nil { return "", err } + rbdVol.RadosNamespace, err = util.GetRBDRadosNamespace(util.CsiConfigFile, rbdVol.ClusterID) + if err != nil { + return "", err + } if rbdVol.Pool, ok = volumeAttributes["pool"]; !ok { return "", errors.New("required 'pool' parameter missing in volume attributes")