Skip to content

Commit

Permalink
rbd: use correct radosnamespace
Browse files Browse the repository at this point in the history
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 <[email protected]>
(cherry picked from commit 8a66575)
  • Loading branch information
iPraveenParihar authored and mergify[bot] committed Jan 24, 2025
1 parent 4429a99 commit fb0f164
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/rbd/rbd_journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit fb0f164

Please sign in to comment.