From: John Spray Date: Wed, 8 Jun 2016 15:23:13 +0000 (+0100) Subject: tasks/cephfs: fix vstart runner _get_pid X-Git-Tag: v11.1.1~58^2^2~179^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4d3b4cd753b0e7797d8178c5f28a8d37cdc905e3;p=ceph.git tasks/cephfs: fix vstart runner _get_pid Dropping the 'x' caused the ps lines not to include the "-i " part of the command line that we use to find named daemons' pids. Signed-off-by: John Spray --- diff --git a/tasks/cephfs/vstart_runner.py b/tasks/cephfs/vstart_runner.py index b268152b568..f552f60eb6c 100644 --- a/tasks/cephfs/vstart_runner.py +++ b/tasks/cephfs/vstart_runner.py @@ -257,14 +257,14 @@ class LocalDaemon(object): Return PID as an integer or None if not found """ ps_txt = self.controller.run( - args=["ps", "-u"+str(os.getuid())] + args=["ps", "-xu"+str(os.getuid())] ).stdout.getvalue().strip() lines = ps_txt.split("\n")[1:] for line in lines: if line.find("ceph-{0} -i {1}".format(self.daemon_type, self.daemon_id)) != -1: log.info("Found ps line for daemon: {0}".format(line)) - return int(line.split()[0]) + return int(line.split()[1]) return None