mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-15 02:40:23 +00:00
e2e: add function to create rbd pool
added a new function to create rbd pool in e2e. Co-authored-by: Madhu Rajanna <madhupr007@gmail.com> Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
parent
e302797217
commit
76e9b4b02a
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user