]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: find processes correctly
authorJohn Spray <john.spray@redhat.com>
Mon, 23 May 2016 18:52:21 +0000 (19:52 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 26 May 2016 12:04:32 +0000 (13:04 +0100)
Don't mistake the daemon-helper line for the actual
daemon process.

Fixes: http://tracker.ceph.com/issues/15900
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 66901ccc04077c86dbb713ddb4c1ab6de075f482)

tasks/cephfs/test_sessionmap.py

index 7a7c89573fde6a08482998e54d4ccb9ad70b0321..eb46764c11d8f9f9cacdbe68a3c83e80f7e951ab 100644 (file)
@@ -36,7 +36,7 @@ class TestSessionMap(CephFSTestCase):
         lines = ps_txt.split("\n")[1:]
 
         for line in lines:
-            if line.find("ceph-mds") != -1:
+            if "ceph-mds" in line and not "daemon-helper" in line:
                 if line.find("-i {0}".format(mds_id)) != -1:
                     log.info("Found ps line for daemon: {0}".format(line))
                     return int(line.split()[0])