]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
tasks: add run_ceph_w to CephManager
authorJohn Spray <john.spray@redhat.com>
Fri, 27 Nov 2015 15:47:57 +0000 (15:47 +0000)
committerJohn Spray <john.spray@redhat.com>
Tue, 5 Jan 2016 18:58:00 +0000 (18:58 +0000)
Analogous to raw_cluster_command, but instead
of calling blocking CLI command we're invoking
the -w mode.

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/ceph_manager.py
tasks/cephfs/vstart_runner.py

index 396e5d814b5e6747bdf7150d86a2b64898f4673f..9c98e39d933d1b99b04803c549ff32cba03f0527 100644 (file)
@@ -841,6 +841,14 @@ class CephManager:
             )
         return proc.exitstatus
 
+    def run_ceph_w(self):
+        """
+        Execute "ceph -w" in the background with stdout connected to a StringIO,
+        and return the RemoteProcess.
+        """
+        return self.controller.run(args=["sudo", "daemon-helper", "kill", "ceph", "-w"],
+                                   wait=False, stdout=StringIO(), stdin=run.PIPE)
+
     def do_rados(self, remote, cmd):
         """
         Execute a remote rados command.
index 3e2dd5cf28103882e5bf87b67a20baa7703b25c9..8ebbc68e5e6717ec355a2fd4455c49912234f408 100644 (file)
@@ -502,6 +502,10 @@ class LocalCephManager(CephManager):
         """
         return LocalRemote()
 
+    def run_ceph_w(self):
+        proc = self.controller.run(["./ceph", "-w"], wait=False, stdout=StringIO())
+        return proc
+
     def raw_cluster_cmd(self, *args):
         """
         args like ["osd", "dump"}