help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need 'UncommentAndSetValue' or some such


From: Luke Kanies
Subject: Re: Need 'UncommentAndSetValue' or some such
Date: Thu, 27 Oct 2005 14:48:36 -0500 (CDT)

On Thu, 27 Oct 2005, Paul Krizak wrote:

> I definitely see where you're coming from.  I like the idea of treating
> things like this as objects as well, but I think it would introduce a
> whole new kind of complexity to have cfengine "know" how to deal with
> various types of config files.  Besides that, what if you want to
> configure a service that cfengine hasn't been told how to manage?  Then
> you're right back at square one, trying to use editfiles to maintain the
> file.

Someone, somewhere has to "know" how to deal with the various files.  Either
each and every individual cfengine user has to know this, or the tool itself
needs to know this.  It's pretty obvious that it's both easier and more
stable to have the tool do it, because everyone's using the same mechanism,
and people can share work easily, instead of everyone reinventing the wheel
at every company for every single file.

As to what happens when the tool doesn't know how, well, yeah, you're back
to square one, to some extent.  Except that there's a straightforward
framework for you to develop that plugin (or to pay a consultant or
something to do it for you), so it's not very complicated to get that
functionality, and once it is in place, you can share it with others so that
they don't have to do the same thing.

> I've found that the facilities provided by editfiles are a fine way of
> maintaining our config files.  I think it's a *good* thing that more
> features get added to it, because there is nothing more generic than the
> ability to edit a text file.  There is nothing generic about cfengine
> having compiled-in knowledge about what a "hosts" file looks like, or
> what a "crontab" should look like.

There's also nothing generic about knowing how to get a process table
listing, but cfengine knows how to do that.

I'm pushing for a tool that will let me manage the objects I care about
(files, processes, hosts, cron jobs) without having to care about the
specifics of doing so.  Cfengine is good at doing so for the objects that
both me and the computer think of as discrete objects, but it makes no real
attempt to do so for the objects that only I think of as discrete.

Truthfully, parts of the computer think of the file contents as discrete
(e.g., cron sees discrete cron jobs, not a bunch of files), but there's no
way to access that discreteness outside of cron.  It would be great if the
OSes exposed APIs to that discreteness, and to some extent OS X is beginning
to do this.

-- 
A child can go only so far in life without potty training.  It is not
mere coincidence that six of the last seven presidents were potty
trained, not to mention nearly half of the nation's state legislators.
                -- Dave Barry
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]