| Summary: | [RFE] Provide an easy way to kill all child processes (in Cleanup phase) | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Peter Hostačný <phostacn> |
| Component: | beakerlib | Assignee: | Dalibor Pospíšil <dapospis> |
| Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | low | ||
| Version: | rawhide | CC: | azelinka, dapospis, dkutalek, mkyral, ohudlick |
| Target Milestone: | --- | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Peter Hostačný
2016-03-24 15:07:45 UTC
I used to do something like this using pgrep -P and recursive go through the tree of children and then sending signal to all the processes. This might be an option. I do not know it if is sufficiently powerful, though. Anyway it is questionable if such function should be in core beakerlib. Now wait for other maintainers to express themselves. is this aimed at preventing the task from getting stuck at the very end and then getting killed by watchdog? If yes then ack+ I am not sure how running processes left on the machine would cause watchdog come to play. Anyway I can imagine I would like to kill everything I executed on background but I never touched that as I kill exactly what I have executed using library(distribution/Cleanup). Can you provide us with some real/life examples? I was looking into some issue with python test. Test was passing on clean machine but failing if you run it for second, third... time. That was nice use-case for test-inspector, but TI only detected few created/changed files that didn't cause this behavior (backuping them and restoring in cleanup phase didn'ŧ solve this problem). Problem was in running processes (openssl running in background), that TI cannot catch. jprokes helped me find out what caused this problem in 1MT, because it was passing there after using retest option, but failing after repeated manual runs (1MT probably reset ssh session if you do retest by 1MT option). Problem was solved by using "pkill openssl" in cleanup phase, but pkill should be sometimes a little bit drastic, because it is killing all processes with matched name ... so something like "kill all my child" feature would help to solve this issue in more elegantly way. http://pkgs.devel.redhat.com/cgit/tests/python/diff/Regression/bz1219108-python-backport-PEP-476-with-global-toggle-to/runtest.sh?id=ee0a7de55d08949f201fc05600f4d7f865b12136 |