Subject: | |
From: | |
Reply To: | |
Date: | Mon, 7 May 2007 21:32:02 +0100 |
Content-Type: | TEXT/PLAIN |
Parts/Attachments: |
|
|
Historically we used a hugely complex set of scripts to apply updates
(which re-implemented depsolvers in 2 different incompatible ways and had
all sorts of nasty things in them).
As I'm working through the changes we can make with SL5 I've been assuming
that at least most of the time I can just use yum to apply updates.
However something I'm unclear about is under what circumstances yum will
re-start services or trigger a reboot if core things (e.g. kernel) are
updated.
I can't spot anything obvious which will automatically restart services,
or is that now all handled by magic in the rpm scripts?
The cases I'm thinking of are (for security updates anyway):
package containing daemon foo is updated:
foo must be restarted
update containing shared library *used* by servics foo, bar, baz:
foo, bar, baz should be restarted, in some circumstances it may be
simpler to just reboot...
kernel (or kernel module) us updated
system needs rebooting
In our old scripts (for sl3 etc), we treated kernel packages specially
(which we can probably still do with yum). A test kernel update didn't
cause a reboot -- though maybe there is a config option I need to set...
Any package containing a shared library caused us to scan /proc/*/maps
for deleted mapped libraries and try to guess from those which services
may need re-starting (by looking at the corresponding exe link etc).
Similary by looking at the link for /proc/.../exe one could check for
those being deleted but generally we just looked for init scripts in the
packages being updated is easier...
Now most (perhaps all) packages containing services seem to have a
postuninstall script which does a condrestart. Is that enough?
Does yum do something like run the scriptlet for all packages which
*depend* on a package being updated to catch libraries being updated?
Does that even make sense or is there something more subtle which gets
done?
I'm hoping to be able to throw away most of the old scripts rather than
have to re-write them for SL5... :-)
-- Jon
|
|
|