]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
squid: mds: command_quiesce_path: rename `--wait` to `--await` for consistency
authorLeonid Usov <leonid.usov@ibm.com>
Wed, 22 May 2024 18:35:51 +0000 (21:35 +0300)
committerLeonid Usov <leonid.usov@ibm.com>
Tue, 28 May 2024 18:59:32 +0000 (21:59 +0300)
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
(cherry picked from commit c20221574e4600d22dd3c0238647cc5671c8b43c)
Fixes: https://tracker.ceph.com/issues/66258
qa/tasks/cephfs/test_quiesce.py
src/mds/MDSDaemon.cc
src/mds/MDSRank.cc

index c5b015d465a90812fbe54d0fda8821a6d9d7c171..a93dcc758e26004ef7b49c65e45950035184e53d 100644 (file)
@@ -470,7 +470,7 @@ class TestQuiesce(QuiesceTestCase):
         self.mount_a.run_shell_payload("ln -s ../.. subvol_quiesce")
         path = self.mount_a.cephfs_mntpt + "/subvol_quiesce"
 
-        J = self.fs.rank_tell(["quiesce", "path", path, '--wait'], check_status=False)
+        J = self.fs.rank_tell(["quiesce", "path", path, '--await'], check_status=False)
         log.debug(f"{J}")
         self.assertEqual(J['op']['result'], -20) # ENOTDIR: the link is not a directory
 
@@ -484,7 +484,7 @@ class TestQuiesce(QuiesceTestCase):
         self.mount_a.run_shell_payload("ln -s ../../.. _nogroup")
         path = self.mount_a.cephfs_mntpt + "/_nogroup/" + self.QUIESCE_SUBVOLUME
 
-        J = self.fs.rank_tell(["quiesce", "path", path, '--wait'], check_status=False)
+        J = self.fs.rank_tell(["quiesce", "path", path, '--await'], check_status=False)
         log.debug(f"{J}")
         self.assertEqual(J['op']['result'], -20) # ENOTDIR: path_traverse: the intermediate link is not a directory
 
@@ -498,7 +498,7 @@ class TestQuiesce(QuiesceTestCase):
         self.mount_a.run_shell_payload("mkdir dir")
         path = self.mount_a.cephfs_mntpt + "/dir"
 
-        J = self.fs.rank_tell(["quiesce", "path", path, '--wait'], check_status=False)
+        J = self.fs.rank_tell(["quiesce", "path", path, '--await'], check_status=False)
         reqid = self._reqid_tostr(J['op']['reqid'])
         self._wait_for_quiesce_complete(reqid, path=path)
         self._verify_quiesce(root=path)
@@ -513,7 +513,7 @@ class TestQuiesce(QuiesceTestCase):
         self.mount_a.run_shell_payload("touch file")
         path = self.mount_a.cephfs_mntpt + "/file"
 
-        J = self.fs.rank_tell(["quiesce", "path", path, '--wait'], check_status=False)
+        J = self.fs.rank_tell(["quiesce", "path", path, '--await'], check_status=False)
         log.debug(f"{J}")
         self.assertEqual(J['op']['result'], -20) # ENOTDIR
 
@@ -527,7 +527,7 @@ class TestQuiesce(QuiesceTestCase):
 
         op1 = self.fs.rank_tell(["quiesce", "path", self.subvolume], check_status=False)['op']
         op1_reqid = self._reqid_tostr(op1['reqid'])
-        op2 = self.fs.rank_tell(["quiesce", "path", self.subvolume, '--wait'], check_status=False)['op']
+        op2 = self.fs.rank_tell(["quiesce", "path", self.subvolume, '--await'], check_status=False)['op']
         op1 = self.fs.get_op(op1_reqid)['type_data'] # for possible dup result
         log.debug(f"op1 = {op1}")
         log.debug(f"op2 = {op2}")
@@ -545,7 +545,7 @@ class TestQuiesce(QuiesceTestCase):
         self.mount_a.run_shell_payload("touch file")
         self.mount_a.setfattr("file", "ceph.quiesce.block", "1")
 
-        J = self.fs.rank_tell(["quiesce", "path", self.subvolume, '--wait'], check_status=False)
+        J = self.fs.rank_tell(["quiesce", "path", self.subvolume, '--await'], check_status=False)
         log.debug(f"{J}")
         self.assertEqual(J['op']['result'], 0)
         self.assertEqual(J['state']['inodes_blocked'], 1)
@@ -684,7 +684,7 @@ class TestQuiesceMultiRank(QuiesceTestCase):
         self._client_background_workload()
         self._wait_distributed_subtrees(2*2, rank="all", path=self.mntpnt)
 
-        op = self.fs.rank_tell(["quiesce", "path", self.subvolume, '--wait'], rank=0, check_status=False)['op']
+        op = self.fs.rank_tell(["quiesce", "path", self.subvolume, '--await'], rank=0, check_status=False)['op']
         self.assertEqual(op['result'], -1) # EPERM
 
     @unittest.skip("https://tracker.ceph.com/issues/66152")
index 9f39fd8f6fa4acbe31ec407dca10b09113eca903..8fb1109b8caa2ba7ed0de6a228eed21164e44b22 100644 (file)
@@ -375,7 +375,7 @@ void MDSDaemon::set_up_admin_socket()
   ceph_assert(r == 0);
   r = admin_socket->register_command("quiesce path"
                                      " name=path,type=CephString,req=true"
-                                     " name=wait,type=CephBool,req=false"
+                                     " name=await,type=CephBool,req=false"
                                     ,asok_hook
                                     ,"quiesce a subtree");
   ceph_assert(r == 0);
index ebac99014d6894451bd79218fce3c39df2efe8f0..1a9af6786f35d2653e5118de9916a3a399b6d647 100644 (file)
@@ -3483,7 +3483,7 @@ void MDSRank::command_quiesce_path(Formatter* f, const cmdmap_t& cmdmap, std::fu
     return;
   }
 
-  bool wait = cmd_getval_or<bool>(cmdmap, "wait", false);
+  bool await = cmd_getval_or<bool>(cmdmap, "await", false);
 
   C_SaferCond cond;
   auto* quiesce_ctx = new C_MDS_QuiescePathCommand(mdcache);
@@ -3510,7 +3510,7 @@ void MDSRank::command_quiesce_path(Formatter* f, const cmdmap_t& cmdmap, std::fu
   // We should still be under the mds lock for this test to be valid.
   // MDCache will delete the quiesce_ctx if it manages to complete syncrhonously,
   // so we are testing the `mdr->internal_op_finish` to see if that has happend
-  if (!wait && mdr && mdr->internal_op_finish) {
+  if (!await && mdr && mdr->internal_op_finish) {
     ceph_assert(mdr->internal_op_finish == quiesce_ctx);
     quiesce_ctx->finish(mdr->result.value_or(0));
   }