Bug 971879 - [RFE] rlWatchdog should have additional callback parameter
Summary: [RFE] rlWatchdog should have additional callback parameter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: beakerlib
Version: rawhide
Hardware: All
OS: All
medium
medium
Target Milestone: ---
Assignee: Petr Muller
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: Release
Depends On:
Blocks: Fedora-beakerlib-1.9-3 1116317
TreeView+ depends on / blocked
 
Reported: 2013-06-07 13:34 UTC by Miroslav Franc
Modified: 2016-02-01 02:28 UTC (History)
4 users (show)

Fixed In Version: beakerlib-1.9-3.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1108693 (view as bug list)
Environment:
Last Closed: 2014-07-30 06:57:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to provide callback parameter to rlWatchdog (1.54 KB, patch)
2013-06-07 14:51 UTC, Miroslav Franc
pmuller: review+
Details | Diff

Description Miroslav Franc 2013-06-07 13:34:36 UTC
Description of problem:
rlWatchdog while great feature is very limited in that it can only send a signal to each process within a process group once the time is up.  It would be very useful to have additional parameter that would be treated as callback function to be run with PGID of the process group as its first parameter before the processes of that process group are signalled. 

Use case is this: We have a lot of test cases where the tested process might hang/end up the spinning forever and we need to get some info (strace/ltrace/gdb/pstree/lsof/logs//proc/*/... whatever) before we terminate it with SIGKILL.  In this case we would simply write the function that takes PGID as the first argument and let the rlWathdog call it.

I would be willing to write a patch if you are not against it.

Comment 1 Petr Muller 2013-06-07 13:37:29 UTC
Seems useful to me, will happily accept a patch.

Comment 2 Miroslav Franc 2013-06-07 14:51:46 UTC
Created attachment 758195 [details]
Patch to provide callback parameter to rlWatchdog

Does this look sane enough?  I tried it on RHEL 5.9 and Fedora 17.

Comment 4 Fedora Update System 2014-06-17 13:42:47 UTC
beakerlib-1.9-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/beakerlib-1.9-1.fc20

Comment 5 Fedora Update System 2014-06-17 23:30:13 UTC
Package beakerlib-1.9-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing beakerlib-1.9-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7442/beakerlib-1.9-1.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-07-02 08:02:28 UTC
beakerlib-1.9-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/beakerlib-1.9-2.fc20

Comment 7 Dalibor Pospíšil 2014-07-04 08:50:59 UTC
Please consider the package fixing this bug available in Fedora stable repos once bz1116308 is closed and RHEL stable repos once bz1116317 is closed.

Fixed in:
beakerlib-1.9-2.fc19
beakerlib-1.9-2.fc20
beakerlib-1.9-2.fc21
beakerlib-1.9-3.el5
beakerlib-1.9-2.el6
beakerlib-1.9-2.el7

Comment 8 Fedora Update System 2014-07-17 13:16:20 UTC
beakerlib-1.9-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/beakerlib-1.9-3.fc20

Comment 9 Fedora Update System 2014-07-30 06:57:58 UTC
beakerlib-1.9-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.