[bug-notifications] [cswclassutils 0003764]: Problems with service manifest generation and buggy stop methods

Mantis Bug Tracker noreply at opencsw.org
Tue Jul 21 15:56:58 CEST 2009


The following issue has been ASSIGNED. 
====================================================================== 
http://www.opencsw.org/mantis/view.php?id=3764 
====================================================================== 
Reported By:                gadavis
Assigned To:                bonivart
====================================================================== 
Project:                    cswclassutils
Issue ID:                   3764
Category:                   packaging
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             2009-07-10 21:53 CEST
Last Modified:              2009-07-21 15:56 CEST
====================================================================== 
Summary:                    Problems with service manifest generation and buggy
stop methods
Description: 
I've noticed some issues with the NRPE package which I think might actually
be a bug with either cswclassutils or mgar, with regards to the service
manifests. When trying to install a package from the global zone on a zone
that is in the halted state, the package installation errors out. The gory
details are in bug 0003730 for NRPE.

I've also noticed that if a buggy start/stop script fails to actually stop
the daemon in question that the system will hang on shutdown due to the
method script timeout values all being set to 18446744073709551615. 

This isn't the first time that I've had a package with a bad stop method
hang the system on shutdown. I'd like to propose a couple of mitigating
strategies: 

* Set the method script timeout values to something reasonable so that SMF
can complain about the bug in the stop method script properly

* Allow a package to specify in it's GAR Makefile that the stop method
should be ":kill" rather than "/path/to/init/script stop". Obviously some
packages will need to do a bit more cleanup than just killing a process.
However, for simple daemons like nrpe letting SMF handle the process
termination with ":kill" seems like it will suffice. I see that a package
can provide it's own custom written service manifest in GAR, but it seems
like overkill in simple cases like NRPE.
====================================================================== 

---------------------------------------------------------------------- 
 (0006431) gadavis (reporter) - 2009-07-13 19:28
 http://www.opencsw.org/mantis/view.php?id=3764#c6431 
---------------------------------------------------------------------- 
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf
tries to use -1 as the timeout value for all of the method scripts. I think
that 18446744073709551615 is what happens when you printf a signed 64-bit
integer as an unsigned 64-bit integer. According to smf_method(5) (see
http://docs.sun.com/app/docs/doc/816-5175/smf-method-5?a=view ), timeout
values of -1 are deprecated, and timeout values of 0 or -1 are not
recommended.

Can the default timeout be set to something more reasonable like 120
seconds? Since individual services can provide their own manifests if they
need to, those services that take longer than 2 minutes to shutdown can
specify this in their custom manifests.




More information about the bug-notifications mailing list