]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: create secondary replicated pool
authorJason Dillaman <dillaman@redhat.com>
Thu, 26 May 2016 17:26:57 +0000 (13:26 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 31 May 2016 15:55:28 +0000 (11:55 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 839544ee6446b959f01290667592e44fc5ee6991)

qa/workunits/rbd/rbd_mirror.sh

index 74b8b8f04485bdfa27343cbe10830aabe8c2b7e7..35b412dab1a8ae58335fc6a952e0d0a634652ead 100755 (executable)
@@ -63,6 +63,7 @@
 CLUSTER1=cluster1
 CLUSTER2=cluster2
 POOL=mirror
+PARENT_POOL=mirror_parent
 SRC_DIR=$(readlink -f $(dirname $0)/../../../src)
 TEMPDIR=
 
@@ -134,12 +135,18 @@ setup()
 
     ceph --cluster ${CLUSTER1} osd pool create ${POOL} 64 64
     ceph --cluster ${CLUSTER2} osd pool create ${POOL} 64 64
+    ceph --cluster ${CLUSTER1} osd pool create ${PARENT_POOL} 64 64
+    ceph --cluster ${CLUSTER2} osd pool create ${PARENT_POOL} 64 64
 
     rbd --cluster ${CLUSTER1} mirror pool enable ${POOL} pool
     rbd --cluster ${CLUSTER2} mirror pool enable ${POOL} pool
+    rbd --cluster ${CLUSTER1} mirror pool enable ${PARENT_POOL} image
+    rbd --cluster ${CLUSTER2} mirror pool enable ${PARENT_POOL} image
 
     rbd --cluster ${CLUSTER1} mirror pool peer add ${POOL} ${CLUSTER2}
     rbd --cluster ${CLUSTER2} mirror pool peer add ${POOL} ${CLUSTER1}
+    rbd --cluster ${CLUSTER1} mirror pool peer add ${PARENT_POOL} ${CLUSTER2}
+    rbd --cluster ${CLUSTER2} mirror pool peer add ${PARENT_POOL} ${CLUSTER1}
 }
 
 cleanup()
@@ -158,6 +165,8 @@ cleanup()
     else
         ceph --cluster ${CLUSTER1} osd pool rm ${POOL} ${POOL} --yes-i-really-really-mean-it
         ceph --cluster ${CLUSTER2} osd pool rm ${POOL} ${POOL} --yes-i-really-really-mean-it
+        ceph --cluster ${CLUSTER1} osd pool rm ${PARENT_POOL} ${PARENT_POOL} --yes-i-really-really-mean-it
+        ceph --cluster ${CLUSTER2} osd pool rm ${PARENT_POOL} ${PARENT_POOL} --yes-i-really-really-mean-it
     fi
     rm -Rf ${TEMPDIR}
 }