]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/cls_rbd: removed mirror peer pool test cases 30948/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 16 Oct 2019 00:42:29 +0000 (20:42 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 16 Oct 2019 00:42:29 +0000 (20:42 -0400)
The mirror peer pool id has never been used and has been dropped
from the Octopus release. This will fix the breakage in the test
cases where the pool id was tested.

Fixes: https://tracker.ceph.com/issues/42333
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/cls/rbd/cls_rbd_client.cc
src/cls/rbd/cls_rbd_client.h
src/test/cls_rbd/test_cls_rbd.cc

index ebf2104ad96a6791b3672923a4a55dbdcf772135..9b868c55d788ba9832d15a5e61bc380458475e14 100644 (file)
@@ -1808,8 +1808,8 @@ int mirror_peer_list(librados::IoCtx *ioctx,
 
 int mirror_peer_add(librados::IoCtx *ioctx, const std::string &uuid,
                     const std::string &cluster_name,
-                    const std::string &client_name, int64_t pool_id) {
-  cls::rbd::MirrorPeer peer(uuid, cluster_name, client_name, pool_id);
+                    const std::string &client_name) {
+  cls::rbd::MirrorPeer peer(uuid, cluster_name, client_name, -1);
   bufferlist in_bl;
   encode(peer, in_bl);
 
index e03f0f410c1dd9c363ba77b4e8fb91014d3dbefb..27a64cc23b7d755851b3f60135afa85d3116fd82 100644 (file)
@@ -385,8 +385,7 @@ int mirror_peer_list(librados::IoCtx *ioctx,
                      std::vector<cls::rbd::MirrorPeer> *peers);
 int mirror_peer_add(librados::IoCtx *ioctx, const std::string &uuid,
                     const std::string &cluster_name,
-                    const std::string &client_name,
-                    int64_t pool_id = -1);
+                    const std::string &client_name);
 int mirror_peer_remove(librados::IoCtx *ioctx,
                        const std::string &uuid);
 int mirror_peer_set_client(librados::IoCtx *ioctx,
index b3ee9e44a12b9b869fbe13cfb384fe0c99e72337..8b5bafcea400bf2e30b3a7b5fc01b4bc5083f776 100644 (file)
@@ -1555,21 +1555,17 @@ TEST_F(TestClsRbd, mirror) {
   ASSERT_EQ(0, mirror_peer_add(&ioctx, "uuid2", "cluster2", "admin"));
   ASSERT_EQ(-ESTALE, mirror_peer_add(&ioctx, "uuid2", "cluster3", "foo"));
   ASSERT_EQ(-EEXIST, mirror_peer_add(&ioctx, "uuid3", "cluster1", "foo"));
-  ASSERT_EQ(0, mirror_peer_add(&ioctx, "uuid3", "cluster3", "admin", 123));
+  ASSERT_EQ(0, mirror_peer_add(&ioctx, "uuid3", "cluster3", "admin"));
   ASSERT_EQ(-EEXIST, mirror_peer_add(&ioctx, "uuid4", "cluster3", "admin"));
-  ASSERT_EQ(-EEXIST, mirror_peer_add(&ioctx, "uuid4", "cluster3", "admin", 123));
-  ASSERT_EQ(0, mirror_peer_add(&ioctx, "uuid4", "cluster3", "admin", 234));
 
   ASSERT_EQ(0, mirror_peer_list(&ioctx, &peers));
   std::vector<cls::rbd::MirrorPeer> expected_peers = {
     {"uuid1", "cluster1", "client", -1},
     {"uuid2", "cluster2", "admin", -1},
-    {"uuid3", "cluster3", "admin", 123},
-    {"uuid4", "cluster3", "admin", 234}};
+    {"uuid3", "cluster3", "admin", -1}};
   ASSERT_EQ(expected_peers, peers);
 
   ASSERT_EQ(0, mirror_peer_remove(&ioctx, "uuid5"));
-  ASSERT_EQ(0, mirror_peer_remove(&ioctx, "uuid4"));
   ASSERT_EQ(0, mirror_peer_remove(&ioctx, "uuid2"));
 
   ASSERT_EQ(-ENOENT, mirror_peer_set_client(&ioctx, "uuid4", "new client"));
@@ -1581,7 +1577,7 @@ TEST_F(TestClsRbd, mirror) {
   ASSERT_EQ(0, mirror_peer_list(&ioctx, &peers));
   expected_peers = {
     {"uuid1", "cluster1", "new client", -1},
-    {"uuid3", "new cluster", "admin", 123}};
+    {"uuid3", "new cluster", "admin", -1}};
   ASSERT_EQ(expected_peers, peers);
   ASSERT_EQ(-EBUSY, mirror_mode_set(&ioctx, cls::rbd::MIRROR_MODE_DISABLED));