From 58575fc849775b6471aa1b87a8683823f500ae16 Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Wed, 19 Nov 2025 15:49:36 +0200 Subject: [PATCH] teuthology/task/pexec.py: add logs to command executed 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 --- teuthology/task/pexec.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/teuthology/task/pexec.py b/teuthology/task/pexec.py index 4d18d2719..d61979e9c 100644 --- a/teuthology/task/pexec.py +++ b/teuthology/task/pexec.py @@ -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): -- 2.47.3