mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-02-05 10:59:29 +00: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 8a66575825
)
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…
Reference in New Issue
Block a user