mirror of
https://github.com/ceph/ceph
synced 2025-02-20 17:37:29 +00:00
qa/tasks/ceph.py: quote "<kind>" in command line
otherwise bash will intepret "kind" as a file when handling command like ``` sudo zgrep <kind> /var/log/ceph/valgrind/* /dev/null | sort | uniq ``` and try to feed its content to zgrep, and write the output of zgrep to /var/log/ceph/valgrind/*. this is not the intended behavior. what we what to do is to pass "<kind>" as an argument to zgrep, along with the globbed files names which matches "/var/log/ceph/valgrind/*". in this change, "<kind>" is quoted as in the command line. it's also what `pipes.quote()` does before the change of35cf5131e7
. this addresses the regression introduced by35cf5131e7
. Fixes: https://tracker.ceph.com/issues/44454 Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
77425b3c4a
commit
da736c22c5
@ -314,10 +314,10 @@ def valgrind_post(ctx, config):
|
||||
for remote in ctx.cluster.remotes.keys():
|
||||
# look at valgrind logs for each node
|
||||
proc = remote.run(
|
||||
args='sudo zgrep <kind> /var/log/ceph/valgrind/* '
|
||||
args="sudo zgrep '<kind>' /var/log/ceph/valgrind/* "
|
||||
# include a second file so that we always get
|
||||
# a filename prefix on the output
|
||||
'/dev/null | sort | uniq',
|
||||
"/dev/null | sort | uniq",
|
||||
wait=False,
|
||||
check_status=False,
|
||||
stdout=BytesIO(),
|
||||
|
Loading…
Reference in New Issue
Block a user