From bc3a00af0fe681f9fad1f2050e13f6f3ea3515b0 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 12 Sep 2017 15:51:30 -0700 Subject: [PATCH] qa: get asok path from ceph.conf The asok path was recently moved to /tmp to resolve unix path too long errors. Signed-off-by: Patrick Donnelly --- qa/tasks/vstart_runner.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 11f77befae0..6901382489c 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -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 -- 2.39.5