On Wed, Apr 21, 2010 at 05:31:01PM -0400, Justin Lloyd wrote:
>As I understand it, it will reevalute the class promise, and therefore
>check for the file's existence, on all three iterations. A good way to
From what I've seen, this is correct. But once a promise has been
fulfilled, it is not executed again. For example, in this short bundle,
only one report is "executed."
bundle agent foo {
classes:
'foo' expression => isplain("/etc/hosts");
reports:
foo::
"Fubar";
}
I think that even for more complicated class combinations, perhaps
something involving an "or" condition like "foo.(bar|baz)", as soon as
one of the possiblilities is met, say "foo.bar", and the promise
fulfilled, it is not run again, even if "foo.baz" is later true.
>see what is happening is to run cf-agent in verbose mode (cf-agent -vK)
>and write its output to a file then read through it. You'll see lines
>like this (yours will be prefixed with something other than "nova>"):
>
>[r...@rhn ~]# cf-agent -vK > /tmp/out
>[r...@rhn ~]# grep '^nova>.* in bundle .* ([1-3])' /tmp/out
>nova> vars in bundle def (1)
>nova> classes in bundle def (1)
>nova> vars in bundle def (2)
>nova> classes in bundle def (2)
>nova> vars in bundle def (3)
>nova> classes in bundle def (3)
>nova> vars in bundle update (1)
>nova> classes in bundle update (1)
>nova> processes in bundle update (1)
>nova> commands in bundle update (1)
>nova> files in bundle update (1)
>nova> services in bundle update (1)
>nova> vars in bundle update (2)
>nova> classes in bundle update (2)
>nova> processes in bundle update (2)
>nova> commands in bundle update (2)
>nova> files in bundle update (2)
>nova> services in bundle update (2)
>nova> vars in bundle update (3)
>nova> classes in bundle update (3)
>nova> processes in bundle update (3)
>nova> commands in bundle update (3)
>nova> files in bundle update (3)
>nova> services in bundle update (3)
>nova> vars in bundle dg (1)
>nova> classes in bundle dg (1)
>nova> vars in bundle dg (2)
>nova> classes in bundle dg (2)
>nova> vars in bundle dg (3)
>nova> classes in bundle dg (3)
>
>Note how it does 3 iterations of the promise types in bundle "def", then
>3 of bundle "update", etc. ("dg" is a custom bundle of mine).
>
>Justin
>
>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]] On Behalf Of
>[email protected]
>Sent: Wednesday, April 21, 2010 3:22 PM
>To: [email protected]
>Subject: Cfengine Help: Re: RE: Cfengine Help: cfengine program flow
>
>Forum: Cfengine Help
>Subject: Re: RE: Cfengine Help: cfengine program flow
>Author: nicolas
>Link to topic:
>https://cfengine.com/forum/read.php?3,16959,16960#msg-16960
>
>thanks for the fast response.
>
>it helps, i thought this is a recommendation :-/ (i should read more
>exactly)
>
>but one question i still have:
>
>if i define a class:
>
>classes:
>
>"xy_installed" expression => fileexists("/usr/example");
>
>does it recheck this value each time i use
>
>xy_installed::
>
>or only once at the beginning of each of the 3 times?
>
>regards
>
>nicolas
>
>_______________________________________________
>Help-cfengine mailing list
>[email protected]
>https://cfengine.org/mailman/listinfo/help-cfengine
>
>This electronic communication and any attachments may contain confidential and
>proprietary
>information of DigitalGlobe, Inc. If you are not the intended recipient, or an
>agent or employee
>responsible for delivering this communication to the intended recipient, or if
>you have received
>this communication in error, please do not print, copy, retransmit,
>disseminate or
>otherwise use the information. Please indicate to the sender that you have
>received this
>communication in error, and delete the copy you received. DigitalGlobe
>reserves the
>right to monitor any electronic communication sent or received by its
>employees, agents
>or representatives.
>
>_______________________________________________
>Help-cfengine mailing list
>[email protected]
>https://cfengine.org/mailman/listinfo/help-cfengine
--
Jesse Becker
NHGRI Linux support (Digicon Contractor)
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine