SCIENTIFIC-LINUX-USERS Archives

May 2007

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Troy Dawson <[log in to unmask]>
Reply To:
Troy Dawson <[log in to unmask]>
Date:
Mon, 7 May 2007 16:11:31 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (82 lines)
Jon, if this is a simple question, I'd hate to see a complex one. :)

First, let's separate yum from rpm.
All yum does is install and update rpm packages.  It doesn't restart any 
services, it doesn't reboot any machines.

But, rpm packages have scripts, and those scripts may or may not restart 
a service.  They may, or may not, trigger another package to restart 
it's service.

As far as I know, there isn't any rpm script that restarts your machine, 
whether it's updating a kernel or not.

So, do all the rpm packages restart their own service after an update or 
install?
I personally don't know.

How do you find out?
   rpm -q --scripts --triggers <package>

Troy

Jon Peatfield wrote:
> 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


-- 
__________________________________________________
Troy Dawson  [log in to unmask]  (630)840-6468
Fermilab  ComputingDivision/LCSI/CSI DSS Group
__________________________________________________

ATOM RSS1 RSS2