]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart_runner: log commands in a more usable form 36546/head
authorRishabh Dave <ridave@redhat.com>
Mon, 10 Aug 2020 12:48:05 +0000 (18:18 +0530)
committerRishabh Dave <ridave@redhat.com>
Wed, 2 Sep 2020 17:22:27 +0000 (22:52 +0530)
Currently commands are printed as ['arg1', 'arg2', 'arg3']. Instead, log
them as '> arg1 arg2 arg3' so that it's simpler to copy and run them
manually. The reason behind prepending '> ' to these logs entries is
just to follow the practice followed by teuthology logs.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/vstart_runner.py

index 262fe65454a96e5c0f05c1e71c701d53f6fda1e0..0af5b2848214838cb4f890f2ddcd7a713c35c591 100644 (file)
@@ -381,7 +381,8 @@ class LocalRemote(object):
                     args[0]
                 ))
 
-        log.info("Running {0}".format(args))
+        log.info('> ' +
+                 ' '.join([str(a.value) if isinstance(a, Raw) else a for a in args]))
 
         if shell:
             subproc = subprocess.Popen(quote(args),