help-cfengine
[Top][All Lists]
Advanced

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

Re: non-convergent file edit?


From: rader
Subject: Re: non-convergent file edit?
Date: Tue, 16 Mar 2004 16:09:49 -0600

Steven & Mark:

Thank you for your prompt replies!

Please know that I have a sincere and very deep appreciation for
cfengine's goal of having repeatable results.  (None of use would
use cfengine if it was unpredictable!?)  I also understand that
ReplaceOnce could lead to un-reproducible results or non-converging
results.

That said--my apologies in advance for being dense!--but I just
don't see how...

 editfiles:
   { /etc/motd 
       ReplaceOnce "year is [[:digit:]]{4}" With "year is $(year)" }

...could be unpredictable or "add extra things" to /etc/motd.

Purely for my own selfish desire to have elegant .conf files, I think 
ReplaceOnce is desirable.

I think what we have here is a philosophical judgment call: other
programming languages trust me to not do stupid things (like creating
endless loops), why not cfengine?  Or, put the other way, cfengine
will let me do plenty of stupid things (like killing cfservd on
the remote end!), why shouldn't it let me do stupid things with
ReplaceOnce?

My apologies if it seems like I'm beating a dead horse.  But if
I construct ReplaceOnce stmts that lead to un-reproducible results
or non-converging results or add extra stuff, then IMHO that's *my*
problem, not cfengine's.

steve 
- - - 
systems & network guy
high energy physics
university of wisconsin

 > ---- Original Message ----
 > From: "Jenkins, Steven"
 >  
 > Steve, 
 >  
 > I believe what you're missing is that cfengine tries to be repeatable -- i
 > e, if you run a cfengine script once, and then re-run it, the second run w
 > on't 'add extra things' that the first run would not have.  If you have a 
 > 'ReplaceOnce' function, then running it a second time would add the item a
 >  second time.  sed, perl, and other utiilities are able to do a 'replaceon
 > ce' because they don't try to solve the problem of the script being re-run
 >  without making additional changes.
 >  
 > On the other hand, a function like 'EnsureOnlyOneEntry' would be in the sp
 > irit of cfengine, as it could be run safely multiple times.
 >  
 > Steven




reply via email to

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