HomeClusterLabs Projects

Low: cts: Make cts-lab valgrind-aware

Description

Low: cts: Make cts-lab valgrind-aware

Signaling a process with killall doesn't work if the process is running
under valgrind. The command line might be something like
"/usr/bin/valgrind /usr/share/libexec/pacemaker-attrd". In that example,
"killall pacemaker-attrd" won't match the process, while "killall
valgrind" is too broad.

The pkill command accepts a regex, so we can match a process whether
it's running under valgrind or not.

As noted in a comment, it would be nice to use psutil, as we do in
process.py. However, psutil only works locally. To use it on remote
nodes, we would have to copy a Python script to each node or run a long
"python -c" command. This is an option, but using ssh with pkill seems
more straightforward.

Maybe someday we'll be using a Python-based remote execution system
(would Fabric[1] do this?). Until then, everything we do remotely has to
be a shell command.

Closes T545

[1] https://www.fabfile.org/

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Thu, Aug 21, 4:39 AM
Parents
rP89e1959f443c: Build: dependencies: Update optional testing dependencies
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task