confluentinc / ducktape

System integration and performance tests
16 stars 98 forks source link

RemoteAccount.kill_process doesn't work for java processes with ridiculous classpaths #125

Open hachikuji opened 9 years ago

hachikuji commented 9 years ago

For java processes with very long classpath options (such as those in the kafka command line tools), the full command is truncated in the process list, which makes the ps ax | grep {name} strategy ineffective. A more reliable option might be to use jps. I also noticed that kill_process currently only works for java processes. It might be better to make kill_process generic and include a java-specific kill_java_process so that ducktape can work with non-java processes.

ewencp commented 9 years ago

Both of these are reasonable. This has come up a couple of times recently and the better solution is to just move services over to using pid files. I think the existing approach was mainly based off of the kafka bin scripts which use the janky ps + grep approach.