Bug 115926

Summary: subdomain_utils hanging during installation
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Dominic W Reynolds <dreynolds>
Component: AppArmorAssignee: Jesse Michael <jmichael>
Status: RESOLVED FIXED QA Contact: Keiran Haggerty <khaggerty>
Severity: Blocker    
Priority: P5 - None CC: matz
Version: RC 1   
Target Milestone: RC 2   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Dominic W Reynolds 2005-09-08 17:35:52 UTC
New installation and update. The installation of the subdomain_utils package is
hanging:

/usr/bin/perl -w  /usr/sbin/sd-event-dispatch.pl -o
PidFile=/var/run/sd-event-dispatch.init.pid

Some part of the inssrv call to setup the sd-event-dispatch daemon is not
returning properly.
Comment 1 Michael Matz 2005-09-08 18:38:09 UTC
Note that with "hanging" I meant that startpar didn't return:   
root     22867  0.0  0.0   1520   448 ?        Ss   19:08   0:00 startpar -f   
-- sd-event-dispatch   
   
This usually means, that the program keeps stdin/stdout or stderr open. 
   
Further, I can't stop this service with "/etc/init.d/sd-event-dispatch stop".   
I believe this is because there is no PID file generated:   
   
% ls -l /var/run/sd-event-dispatch.init.pid   
/bin/ls: /var/run/sd-event-dispatch.init.pid: No such file or directory   
   
Even when manually killing the process, and doing an   
"/etc/init.d/sd-event-dispatch start", the PID file is not created.  Looking  
at the /usr/sbin/sd-event-dispatch.pl I also don't see where it would  
be created.  In fact I don't see any option handling at all in that script. 
 
Please note that the "-p pidfile" option to startproc (as used in the 
init script) does _not_ create a PID file, but rather uses it for reading 
only (see manpage). 
 
So in the end, this service is running without any need (on a system 
with disabled subdomain), and can't be stopped by usual means. 
Comment 2 Jesse Michael 2005-09-09 08:03:41 UTC
i've fixed sd-event-dispatch.pl to daemonize itself and write the pid file
correctly.

we've also removed the separate sd-event-dispatch init script and made it be
started and stopped by the main subdomain init script so it will only be running
when subdomain is enabled.

we've made these fixes in our tree and dominic (dreynolds@suse.de) is going to
be pushing the changes into autobuild in a few.
Comment 4 Dominic W Reynolds 2005-09-09 10:28:55 UTC
pushed to abuild
Comment 5 Michael Matz 2005-09-09 13:07:30 UTC
That's most excellent, thanks.  Shouldn't subdomain-parser-common now 
also require subdomain-utils? 
Comment 6 Jesse Michael 2005-09-09 17:27:13 UTC
we were thinking that there might be some instances where someone might want a
super-minimal setup without the subdomain-utils and yast2-subdomain packages
installed, so we made the init script only try to start and stop
sd-event-dispatcher.pl if it exists.  thanks for your help.