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 <m.praveen@ibm.com>
This commit is contained in:
Praveen M 2025-01-21 15:33:56 +05:30 committed by mergify[bot]
parent 12bc092369
commit 8a66575825

View File

@ -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")