mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
rbd: make pool optional in rbd sc if topologyconstraints are present
if rbd storage class is created with topologyconstraintspools replicated pool was still mandatory, making the pool optional if the topologyconstraintspools is requested Closes: https://github.com/ceph/ceph-csi/issues/4380 Signed-off-by: parth-gr <partharora1010@gmail.com>
This commit is contained in:
@ -1270,9 +1270,12 @@ func genVolFromVolumeOptions(
|
||||
)
|
||||
|
||||
rbdVol := &rbdVolume{}
|
||||
|
||||
rbdVol.Pool, ok = volOptions["pool"]
|
||||
if !ok {
|
||||
return nil, errors.New("missing required parameter pool")
|
||||
if _, ok = volOptions["topologyConstrainedPools"]; !ok {
|
||||
return nil, errors.New("empty pool name or topologyConstrainedPools to provision volume")
|
||||
}
|
||||
}
|
||||
|
||||
rbdVol.DataPool = volOptions["dataPool"]
|
||||
|
Reference in New Issue
Block a user