[bug-notifications] [cswclassutils 0003634]: Please add smf service state persistence across upgrade

Mantis Bug Tracker noreply at opencsw.org
Thu Jun 4 10:54:11 CEST 2009


The following issue has been CLOSED 
====================================================================== 
http://www.opencsw.org/mantis/view.php?id=3634 
====================================================================== 
Reported By:                yann
Assigned To:                bonivart
====================================================================== 
Project:                    cswclassutils
Issue ID:                   3634
Category:                   regular use
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-04-13 19:48 CEST
Last Modified:              2009-06-04 10:54 CEST
====================================================================== 
Summary:                    Please add smf service state persistence across
upgrade
Description: 

Currently, if someone installs a daemon (provided by a csw package) under
Solaris with SMF support and chooses to disable it, this state will not be
preserved across upgrades.
Next time, the package is upgraded, the service will be automatically
started and will be configured to do so at boot time, 

In other word: the "svcadm disable" command is useless with opencsw
packaged daemons.


It would be nice to add smf service state persistence across upgrade in
cswclassutils to allow the state of service to stay the same across
upgrades.
====================================================================== 

---------------------------------------------------------------------- 
 (0005959) yann (reporter) - 2009-04-13 19:54
 http://www.opencsw.org/mantis/view.php?id=3634#c5959 
---------------------------------------------------------------------- 
I upload a patch which implement this behaviour.

However, it will only do so when autoenable_daemons is enabled, because
the standard explicitely says to not start daemons when autoenable_daemons
is set to no.

I would prefer the smf saved state to override the autoenable_daemons but
I think that would require some discussion. 

---------------------------------------------------------------------- 
 (0005994) bonivart (manager) - 2009-04-21 18:51
 http://www.opencsw.org/mantis/view.php?id=3634#c5994 
---------------------------------------------------------------------- 
I have implemented your patch in 1.6. 

---------------------------------------------------------------------- 
 (0005999) bonivart (manager) - 2009-04-22 17:58
 http://www.opencsw.org/mantis/view.php?id=3634#c5999 
---------------------------------------------------------------------- 
Just discovered a (non related) problem with packages that set up multiple
services and realized that this patch doesn't cover that either. It only
saves one state per package, not separate state for each service of the
package. ClamAV is one example of a package that sets up multiple services. 

---------------------------------------------------------------------- 
 (0006000) yann (reporter) - 2009-04-22 18:01
 http://www.opencsw.org/mantis/view.php?id=3634#c6000 
---------------------------------------------------------------------- 
Ok, I will have a look at this problem. 

---------------------------------------------------------------------- 
 (0006027) bonivart (manager) - 2009-04-24 18:46
 http://www.opencsw.org/mantis/view.php?id=3634#c6027 
---------------------------------------------------------------------- 
I'm testing some other changes to cswinitsmf and it never starts the
service. It seems that the only way a service can be enabled is if there
existed a state file that says it was enabled before but this means that
new installations can never be enabled..? 

---------------------------------------------------------------------- 
 (0006123) yann (reporter) - 2009-05-17 16:54
 http://www.opencsw.org/mantis/view.php?id=3634#c6123 
---------------------------------------------------------------------- 
Hi Peter,

I had a look at the multiple service case, and the smf persistance code
already handled it fine. I tested with clamav, disabling one of the two
service (clamav-milter) and the state was properly restored upon
reinstallation.

However, I fixed the bug you mentionned in your last note, now the code
will properly enable the service even if the state file is not present.

I attached a patch against cswclassutils 1.9 to re-enable the code and
apply the fix: smf_state_persistence_multiple.patch 

---------------------------------------------------------------------- 
 (0006212) bonivart (manager) - 2009-05-28 13:56
 http://www.opencsw.org/mantis/view.php?id=3634#c6212 
---------------------------------------------------------------------- 
Ok, I have applied your patch in 1.11, it's in testing:

http://mirror.opencsw.org/testing/cswclassutils-1.11,REV=2009.05.28-SunOS5.8-all-CSW.pkg.gz


---------------------------------------------------------------------- 
 (0006262) bonivart (manager) - 2009-06-04 10:53
 http://www.opencsw.org/mantis/view.php?id=3634#c6262 
---------------------------------------------------------------------- 
Confirmed to work by Mike Watters. Closing. 

---------------------------------------------------------------------- 
 (0006263) bonivart (manager) - 2009-06-04 10:54
 http://www.opencsw.org/mantis/view.php?id=3634#c6263 
---------------------------------------------------------------------- 
Fix in 1.16 released today. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-04-13 19:48 yann           New Issue                                    
2009-04-13 19:49 yann           File Added: smf_state_persistence.patch         
          
2009-04-13 19:54 yann           Note Added: 0005959                          
2009-04-21 16:15 bonivart       Status                   new => assigned     
2009-04-21 16:15 bonivart       Assigned To               => bonivart        
2009-04-21 18:51 bonivart       Note Added: 0005994                          
2009-04-22 17:58 bonivart       Note Added: 0005999                          
2009-04-22 18:01 yann           Note Added: 0006000                          
2009-04-24 18:46 bonivart       Note Added: 0006027                          
2009-05-17 16:52 yann           File Added: smf_state_persistence_multiple.patch
                   
2009-05-17 16:54 yann           Note Added: 0006123                          
2009-05-28 13:56 bonivart       Note Added: 0006212                          
2009-06-04 10:53 bonivart       Note Added: 0006262                          
2009-06-04 10:54 bonivart       Note Added: 0006263                          
2009-06-04 10:54 bonivart       Status                   assigned => closed  
======================================================================



More information about the bug-notifications mailing list