mirror of
https://git.mirrors.martin98.com/https://github.com/ceph/ceph-csi.git
synced 2025-08-15 19:15:59 +08:00
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> (cherry picked from commit 8a66575825be125b5c9f1762cc60f7e118e856ce)
This commit is contained in:
parent
4429a992b2
commit
fb0f1643fe
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user