diff --git a/e2e/rbd_helper.go b/e2e/rbd_helper.go index 65ea27ea7..60fdeb5b6 100644 --- a/e2e/rbd_helper.go +++ b/e2e/rbd_helper.go @@ -419,6 +419,23 @@ func deletePool(name string, cephfs bool, f *framework.Framework) error { return nil } +func createPool(f *framework.Framework, name string) error { + var ( + pgCount = 128 + size = 1 + ) + // ceph osd pool create replicapool + cmd := fmt.Sprintf("ceph osd pool create %s %d", name, pgCount) + _, _, err := execCommandInToolBoxPod(f, cmd, rookNamespace) + if err != nil { + return err + } + // ceph osd pool set replicapool size 1 + cmd = fmt.Sprintf("ceph osd pool set %s size %d --yes-i-really-mean-it", name, size) + _, _, err = execCommandInToolBoxPod(f, cmd, rookNamespace) + return err +} + func getPVCImageInfoInPool(f *framework.Framework, pvc *v1.PersistentVolumeClaim, pool string) (string, error) { imageData, err := getImageInfoFromPVC(pvc.Namespace, pvc.Name, f) if err != nil {