]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: get asok path from ceph.conf 17679/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 12 Sep 2017 22:51:30 +0000 (15:51 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 12 Sep 2017 22:52:54 +0000 (15:52 -0700)
The asok path was recently moved to /tmp to resolve unix path too long errors.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/vstart_runner.py

index 11f77befae0aafc21995bb15eb17edbfbcb92fbd..6901382489c7b7fa655185ccf93d04160c953633 100644 (file)
@@ -419,7 +419,18 @@ class LocalFuseMount(FuseMount):
         # the PID of the launching process, not the long running ceph-fuse process.  Therefore
         # we need to give an exact path here as the logic for checking /proc/ for which
         # asok is alive does not work.
-        path = "./out/client.{0}.{1}.asok".format(self.client_id, self.fuse_daemon.subproc.pid)
+
+        # Load the asok path from ceph.conf as vstart.sh now puts admin sockets
+        # in a tmpdir. All of the paths are the same, so no need to select
+        # based off of the service type.
+        d = "./out"
+        with open(self.config_path) as f:
+            for line in f:
+                asok_conf = re.search("^\s*admin\s+socket\s*=\s*(.*?)[^/]+$", line)
+                if asok_conf:
+                    d = asok_conf.groups(1)[0]
+                    break
+        path = "{0}/client.{1}.{2}.asok".format(d, self.client_id, self.fuse_daemon.subproc.pid)
         log.info("I think my launching pid was {0}".format(self.fuse_daemon.subproc.pid))
         return path