[Ovirt-devel] [PATCH] wrappers for taskomatic.rb and host-status.rb

steve linabery slinabery at gmail.com
Thu May 1 22:37:04 UTC 2008


Hi Ovirt!

taskomatic.rb and host-status.rb were becoming daemons by using
"Daemons.daemonize".

This had the unfortunate effect of detaching them from any controlling
terminal, and so using killproc in /etc/init.d/ovirt-wui was *not*
killing them. I noticed that after repeated 'service ovirt-wui
restart', I had many stray taskomatic & host-status processes, all
making connections to postgresql, and sending my appliance way into
swap.

So this patch:
0) renames taskomatic.rb and host-status.rb to taskomatic_.rb and
host-status_.rb, respectively.
1) replaces taskomatic.rb and host-status.rb with wrapper scripts for
taskomatic_.rb and host-status_.rb. The wrappers use the
"Daemons.run(script,options)" method instead of Daemons.daemonize.
2) edits /etc/init.d/ovirt-wui to invoke 'taskomatic.rb start' and
'taskomatic.rb stop' (same for host-status.rb) instead of the
initscript functions daemon and killproc.

Please note that the original scripts accepted some command line
arguments; that code is still present in taskomatic_.rb and
host-status_.rb, but I did not provide a mechanism for passing command
line options via the wrapper scripts.

Thanks for your consideration,
Steve Linabery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: daemons.patch
Type: text/x-patch
Size: 15970 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20080501/9a62f4fd/attachment.bin>


More information about the ovirt-devel mailing list