]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: use timeout for fs asok operations 25332/head
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 6 Oct 2018 17:32:18 +0000 (10:32 -0700)
committerPrashant D <pdhange@redhat.com>
Fri, 30 Nov 2018 01:36:24 +0000 (20:36 -0500)
Otherwise a bug preventing an asok operation from completing will cause the
entire job to fail.

Fixes: http://tracker.ceph.com/issues/36335
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 296d89b0463ee3aad8dfb50b0e41a27e2c852ddb)

qa/tasks/cephfs/filesystem.py

index cd18c40f61f4b873f17c3c8f5db14b7eefb3cf29..8764753c21c41ee9d22390876cf636710f1d1ac6 100644 (file)
@@ -172,8 +172,10 @@ class CephCluster(object):
         del self._ctx.ceph['ceph'].conf[subsys][key]
         write_conf(self._ctx)
 
-    def json_asok(self, command, service_type, service_id):
-        proc = self.mon_manager.admin_socket(service_type, service_id, command)
+    def json_asok(self, command, service_type, service_id, timeout=None):
+        if timeout is None:
+            timeout = 15*60
+        proc = self.mon_manager.admin_socket(service_type, service_id, command, timeout=timeout)
         response_data = proc.stdout.getvalue()
         log.info("_json_asok output: {0}".format(response_data))
         if response_data.strip():
@@ -909,15 +911,15 @@ class Filesystem(MDSCluster):
 
         return version
 
-    def mds_asok(self, command, mds_id=None):
+    def mds_asok(self, command, mds_id=None, timeout=None):
         if mds_id is None:
             mds_id = self.get_lone_mds_id()
 
-        return self.json_asok(command, 'mds', mds_id)
+        return self.json_asok(command, 'mds', mds_id, timeout=timeout)
 
-    def rank_asok(self, command, rank=0, status=None):
+    def rank_asok(self, command, rank=0, status=None, timeout=None):
         info = self.get_rank(rank=rank, status=status)
-        return self.json_asok(command, 'mds', info['name'])
+        return self.json_asok(command, 'mds', info['name'], timeout=timeout)
 
     def read_cache(self, path, depth=None):
         cmd = ["dump", "tree", path]