Bug 578 - need restart action or equivalent to poke smf(5) services
: need restart action or equivalent to poke smf(5) services
Status: RESOLVED FIXINSOURCE
Product: pkg
actions
: unspecified
: Other Solaris
: P4 minor (vote)
: in100
Assigned To: Bart Smaalders
: pkg/actions watcher
:
:
:
:
: pkg-blocker-2008-11
  Show dependency treegraph
 
Reported: 2008-02-21 15:29 UTC by Stephen Hahn
Modified: 2008-10-10 22:40 UTC (History)
11 users (show)

See Also:


Attachments


Note

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


Description Stephen Hahn 2008-02-21 15:29:28 UTC
One approach to handling indices, caches, and other forms of accumulated
configuration is to compose an smf(5) service that can process the
elements delivered by one or more packages into some coherent form.  Recently
discussed examples include fonts, manual pages, and GNU info files.  When
a package installs or uninstalls content of this kind, we could choose to
restart an associated service, either by having the package author explicitly
offer an FMRI to restart, or by associating a content tag with a specific FMRI.
Comment 1 David Comay 2008-02-21 21:29:59 UTC
*** Bug 574 has been marked as a duplicate of this bug. ***
Comment 2 Bart Smaalders 2008-02-22 18:41:52 UTC
The most straightforward approach appears to be something like an action that
monitors subsequently installed actions w/ a filter; anything passing the filer
would cause the refresh to occur.

A example might be:

refresh fmri=svc://application/man/whatis when=[install,update,remove]
filter="man=true"

Subsequent to the installation of this action, any actions
installed/removed/updated w/ "man=true" would cause a record to be appended to
var/pkg/refresh/application/man/whatis containing the name of the transition
and the action that passed the filter.  If this pkg command was running on a
live image, 

svcadm refresh svc://application/man/whatis

would be invoked on the (presumably) transient whatis service, which would read
the log file to perform any desired actions.  Locking is still tbd.  If the
image isn't live, the transient service should take care of the necessary
processing on next boot.  The pkg command would collapse multiple refresh
requests into a single event; even if hundreds of packages containing man pages
were installed, the whatis db would be rebuilt just once.

Each refresh action would be written to a known location in the /var/pkg
hierarchy during installation; any pkg commands modifying an image would load
the installed refresh actions so that any action changes could be filtered.
Comment 3 Bart Smaalders 2008-02-25 11:27:00 UTC
It may be useful to make the creation of the log file of modified actions
optional; some types of svc updates (such as bootadm update-archive)
rebuild the world each time so a log file isn't needed.  A mechanism is
still needed to let the svc know that work needs to be done in the non-live
case; the existence of an empty log file (to be deleted by the svc on
successful completion) might suffice here.
Comment 4 ludo 2008-02-25 13:01:39 UTC
see also http://defect.opensolaris.org/bz/show_bug.cgi?id=542 regarding Desktop
Gnome menus not updated after an IPS install of packages that declare user
menus.

Might be a fix to be done at the Gnome level, but not sure it can be done by
May 2008.  
I think IPS install/remove should have a way to notify the desktop of some
changes instead of having the desktop to constantly check for changes on the
filesystem.
Comment 5 Joe Di Pol 2008-02-27 14:32:00 UTC
Please keep in mind that there is an effort to use IPS as a
cross-platform packaging system. So we need a solution to this
general problem (triggering post-installation logic) for other 
platforms as well.

Note that on other platforms we are pretty much limited to 
installing into User images, often by a non-root user. In this
case a simple, generic solution that can be used across all
(non-Solaris?) platforms is desirable. For example, maybe the fmri 
could point to an executable that is run directly by pkg, after all 
installation/update is complete, right before exit (maybe first
thing for removal). It would be defined that pkg() is only acting
as a trigger for this logic, and failure of one of these executables
would never impact the install/update/removal of a package.
Comment 6 ludo 2008-05-02 16:48:04 UTC
*** Bug 1758 has been marked as a duplicate of this bug. ***
Comment 7 Dan Price 2008-07-10 18:45:49 UTC
Spoke to Bart, he's targeting build 96.
Comment 8 Sriram Natarajan 2008-07-10 20:00:24 UTC
we would appreciate, if you could also document as to what upstream developers
like myself should do to ensure that apache or mysql services are enabled at
the end of installing IPS packages
Comment 9 Dan Price 2008-07-10 22:43:36 UTC
(In reply to comment #8)
> we would appreciate, if you could also document as to what upstream developers
> like myself should do to ensure that apache or mysql services are enabled at
> the end of installing IPS packages

Please file that request as a separate defect.  Thanks.
Comment 10 Dan Price 2008-08-20 17:05:50 UTC
Resetting target milestone to 97
Comment 11 Dan Price 2008-09-11 00:32:16 UTC
Resetting to 99
Comment 12 Dan Price 2008-10-06 16:52:25 UTC
Resetting target milestone.
Comment 13 Bart Smaalders 2008-10-10 22:40:50 UTC
Fixed in 584:22bc748edce6