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:
parth-gr
2024-02-26 19:29:58 +05:30
committed by mergify[bot]
parent 5224d58c13
commit 063319f6e5
8 changed files with 42 additions and 16 deletions

View File

@ -3043,19 +3043,21 @@ var _ = Describe("RBD", func() {
}
By("ensuring created PV has its CSI journal in the CSI journal specific pool")
err = checkPVCCSIJournalInPool(f, pvc, "replicapool")
err = checkPVCCSIJournalInPool(f, pvc, rbdTopologyPool)
if err != nil {
framework.Failf("failed to check csi journal in pool: %v", err)
}
err = deleteJournalInfoInPool(f, pvc, "replicapool")
err = deleteJournalInfoInPool(f, pvc, rbdTopologyPool)
if err != nil {
framework.Failf("failed to delete omap data: %v", err)
}
err = deletePVCAndApp("", f, pvc, app)
if err != nil {
framework.Failf("failed to delete PVC and application: %v", err)
}
validateRBDImageCount(f, 0, defaultRBDPool)
validateOmapCount(f, 0, rbdType, defaultRBDPool, volumesType)
@ -3092,7 +3094,7 @@ var _ = Describe("RBD", func() {
framework.Failf("failed to check data pool for image: %v", err)
}
err = deleteJournalInfoInPool(f, pvc, "replicapool")
err = deleteJournalInfoInPool(f, pvc, rbdTopologyPool)
if err != nil {
framework.Failf("failed to delete omap data: %v", err)
}