[Yum-devel] New plugin: service-restart

David Lutterkort dlutter at redhat.com
Thu Feb 15 02:20:14 UTC 2007


On Wed, 2007-02-14 at 15:27 -0500, Konstantin Ryabitsev wrote:

> I actually wrote this plugin specifically because I didn't want to
> rely on bcfg2 to do it (in my case).

I can't really speak to the specifics of your situation, nor do I want
to tell anybody which plugins should or should not go into yum, but
there's a few points in your mail that deserve some comments:

> Yum is a package manager, and a config management system should not
> try to re-implement yum. 

At least in puppet's case, it doesn't reimplement yum: it simply uses
yum to find out if a new version of a package is available and to
install it if it is.

> Config management should be an aide, and never actually interfere with manual
> administration.

That's probably the heart of the philosophical disagreement you have
with centralized config management; in general, allowing manual local
changes leads to divergence between systems and makes administration
harder, because it becomes more and more unclear how much the actual
systems agree with what they should look like. (And I am working on a
tool, cft[1], that will take at least some of the pain with changing
configs under central control locally a little easier)

> I do use a config management system, but it should be clear that each time
> config management systems attempt to manage packages, they generally
> do a much poorer job than yum would, if only because they try to work
> on 15 different operating systems.

The way puppet solves that is to rely on the "native" package manager
for each of the 15 different OS's to do its job.

I lost your initial email, but IIRC, what you want to do would look in
puppet something like

        package { httpd: ensure => latest }
        
        file { "/etc/httpd/conf/httpd.conf":
          owner => root, group => root, mode => 644,
          source => "puppet://$server/myfiles/myhttpd.conf"
          require => Package[httpd]
        }
        
        service { httpd:
          ensure => running,
          subscribe => [ Package[httpd], File["/etc/httpd/conf/httpd.conf"] ] 
        }
        
This makes sure that (a) your modified httpd.conf gets installed after
any package updates and (b) that the httpd service is restarted whenever
there's a change to the package or the config file. (And there are ways
to make this a little less verbose)

David

[1] http://cft.et.redhat.com/




More information about the Yum-devel mailing list