mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
rbd: Fix dataPool in createVolumeResponse
Return the dataPool used to create the image instead of the default one provided by the createVolumeRequest. In case of topologyConstrainedDataPools, they may differ. Don't add datapool if it's not present Signed-off-by: Sébastien Bernard <sebastien.bernard@sfr.com>
This commit is contained in:
parent
8f6a7da538
commit
ee8fb3f05f
@ -166,6 +166,11 @@ func buildCreateVolumeResponse(req *csi.CreateVolumeRequest, rbdVol *rbdVolume)
|
||||
if rbdVol.RadosNamespace != "" {
|
||||
volumeContext["radosNamespace"] = rbdVol.RadosNamespace
|
||||
}
|
||||
|
||||
if rbdVol.DataPool != "" {
|
||||
volumeContext["dataPool"] = rbdVol.DataPool
|
||||
}
|
||||
|
||||
volume := &csi.Volume{
|
||||
VolumeId: rbdVol.VolID,
|
||||
CapacityBytes: rbdVol.VolSize,
|
||||
|
Loading…
Reference in New Issue
Block a user