help-cfengine
[Top][All Lists]
Advanced

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

Re: problem with copy stanza not firing


From: Eric Sorenson
Subject: Re: problem with copy stanza not firing
Date: Thu, 4 Dec 2003 16:54:30 -0800 (PST)

On Thu, 4 Dec 2003, Luke A. Kanies wrote:

> What problem is it a solution to?  Storing the entire config in RAM?
> That's not much, and I'm not sure it's worth the extra effort.  I haven't
> looked into this portion of the code, so I'm not really sure how it's done
> or how much of a difference it can make, but I can't think it would be a
> very large performance optimization.

The problem is with dynamic class definition. At some point during the run,
a 'define=dynClass' might add onto the list of currently-defined classes,
say, as the result of a file being copied. If there's a 

shellcommands:
    dynClass::
        '/sbin/service restart daemon'

in the configuration, out of parse order with the copy: class, it'll get 
skipped and never executed without the two-pass split. With AddInstallable,
the parser can know that any action predicated upon a class in the A-I list
ought to be delayed until the first pass is through. At that point, all
the possible places it could end up becoming defined will have had their
chance to do so.

Simply reading it through (loading into RAM) isn't enough, you have to actually
*do* the non-predicated actions, for instance a define inside shellcommands: 
depends upon successful execution of a program outside cfengine -- it has 
to actually open the box, because whether the cat's dead or not determines
whether we run it through the blender. (Or whatever.)

-- 

    Eric Sorenson - EXPLOSIVE Networking - http://explosive.net





reply via email to

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