]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology/task/pexec.py: add logs to command executed wip-matanb-pexec-logs 2110/head
authorMatan Breizman <mbreizma@redhat.com>
Wed, 19 Nov 2025 13:49:36 +0000 (15:49 +0200)
committerMatan Breizman <mbreizma@redhat.com>
Wed, 19 Nov 2025 13:55:44 +0000 (15:55 +0200)
The current output by pexec is:
```
INFO:teuthology.run_tasks:Running task pexec...
INFO:teuthology.task.pexec:Executing custom commands...
INFO:teuthology.task.pexec:Running commands on host ubuntu@smithi012.front.sepia.ceph.com
DEBUG:teuthology.orchestra.run.smithi012:> TESTDIR=/home/ubuntu/cephtest bash -s
```

The output should include the acutal command executed, similar to
exec.py:

```
INFO:teuthology.run_tasks:Running task exec...
INFO:teuthology.task.exec:Executing custom commands...
INFO:teuthology.task.exec:Running commands on role client.0 host ubuntu@smithi168.front.sepia.ceph.com
DEBUG:teuthology.orchestra.run.smithi168:> sudo TESTDIR=/home/ubuntu/cephtest bash -c 'sudo ceph osd pool create low_tier 4'
```

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
teuthology/task/pexec.py

index 4d18d27193078c387ecdf64c1d05ad7002c225ee..d61979e9c8e8d1f45b740d199cabf0680d8d13d6 100644 (file)
@@ -34,7 +34,6 @@ def _do_barrier(barrier, barrier_queue, remote):
 
 def _exec_host(barrier, barrier_queue, remote, sudo, testdir, ls):
     """Execute command remotely"""
-    log.info('Running commands on host %s', remote.name)
     args = [
         'TESTDIR={tdir}'.format(tdir=testdir),
         'bash',
@@ -57,6 +56,9 @@ def _exec_host(barrier, barrier_queue, remote, sudo, testdir, ls):
     r.stdin.writelines(['\n'])
     r.stdin.flush()
     r.stdin.close()
+    log.info('Running commands on host %s', remote.name)
+    for l in ls:
+        log.info('%s', l)
     tor.wait([r])
 
 def _generate_remotes(ctx, config):