Forum: CFEngine Help
Subject: Re: On persistent classes
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,24095,24158#msg-24158
Well, if it's not gonna work, it should at least look pretty. :) In any event,
I'd expect that a classes promise would be considered kept if
Forum: CFEngine Help
Subject: Re: On persistent classes
Author: toddnni
Link to topic: https://cfengine.com/forum/read.php?3,24095,24150#msg-24150
sauer,
nice try and quite elegant too. This reminds me of my experiments which I did
months ago, I tried to set a class using 'classes =>
Forum: CFEngine Help
Subject: Re: On persistent classes
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,24095,24148#msg-24148
The classes body applies to all promise types, including class promises, right?
I wonder what happens if you just specify a persist_time attribute in
Forum: CFEngine Help
Subject: Re: On persistent classes
Author: toddnni
Link to topic: https://cfengine.com/forum/read.php?3,24095,24109#msg-24109
To my understanding this is the only way currently. However this proposition
https://cfengine.com/bugtracker/view.php?id=875 seems interesting
Forum: CFEngine Help
Subject: On persistent classes
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,24095,24095#msg-24095
Persisting a class seems to be tied to a classes body. Suppose I want to
persist a class defined in a classes section instead. Is this possible
menting.
My thoughts exactly. Why outsource to external scripts when Cfengine can
do the job. While for now this is merely of theoretical interest to me,
I can imagine real-life scenarios where class persistence may prove to
be a useful feature.
>From what I can gather about persistent classes, it
o the next
>> 5-minute run will try again) while the "I was able to wget" class may
>> have a persistence of several hours (and maybe a splayclass as well) to
>> prevent hammering the target server.
>
> While I see the potential value of "persistent classes&quo
> 5-minute run will try again) while the "I was able to wget" class may
> have a persistence of several hours (and maybe a splayclass as well) to
> prevent hammering the target server.
While I see the potential value of "persistent classes" -- I've always done
th
Forum: Cfengine Help
Subject: Re: Persistent classes
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,18183,18213#msg-18213
You can set a different ifelapsed for any promise you like.
body action if_elapsed(x)
{
ifelapsed => "$(x)";
expireafter =>
5
Linux/Unix Systems Engineering Cell: (512) 791-0686
Global IT InfrastructureFax: (512) 602-0468
On 09/13/10 13:10, no-re...@cfengine.com wrote:
> Forum: Cfengine Help Subject: Re: Persistent classes Author:
> neilhwatson Link to topic:
> https://cfengine.com/forum/rea
no-re...@cfengine.com writes:
> Persistence for the sake of it. I can't argue that. Perhaps attempt
> the wget command, and upon failure set a persistent class. However, I
> can't see much benefit to this versus using ifelapsed to limit my wget
> promise to once every four hours.
Yeah, that ma
Forum: Cfengine Help
Subject: Re: Persistent classes
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,18183,18206#msg-18206
Persistence for the sake of it. I can't argue that. Perhaps attempt the wget
command, and upon failure set a persistent class. However, I
but for now persistent classes is exactly what I'm trying
to achieve :)
I found the stuff about persistence in the documentation and decided to
give it a try. The idea of running potentially heavy tasks (e.g. once a
day), but having the result of the last run of such as task at hand
every ti
Forum: Cfengine Help
Subject: Re: Persistent classes
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,18183,18203#msg-18203
Forget all about classes and persistence for a moment. What are you trying to
accomplish above that
no-re...@cfengine.com writes:
> I think you want to change the class strcmp to a command action
> instead. Then define the class as repaired or not.
> http://www.cfengine.org/manuals/cf3-solutions.html
Thanks Neil. I've been playing around with this. However, I'm a bit
stuck. I have a command th
Michael Potter writes:
> I'm not I'm understanding what you mean by class persistance. Do you
> mean persistant over invokations of cf-agent?
Yes. The logic that defines the class is run every hour, but the
resulting class lives on for 120 minutes or until it is reset by another
run of the logic
roach, I would have to maintain the persistance state in
the module script (state file or whatever), which is not ideal. I'm
trying to avoid this by making Cfengine remember the class.
What I don't understand about persistent classes is that I can't set the
persistance unless I
ate things
> like persistent classes.
Thanks for the suggestion, Michael. Modules may very well be the
answer. But if I understand modules correctly, they are just little
scripts/programs that are executed by Cfengine and return classes. Not
very unlike using stringcmp() and execresult() like in m
Forum: Cfengine Help
Subject: Re: Persistent classes
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,18183,18187#msg-18187
I think you want to change the class strcmp to a command action instead. Then
define the class as repaired or not.
http://www.cfengine.org/manuals
I'm pretty sure modules can do what you want. They are programs that are
executed by cfengine, and return in serialized form a stream of classes to
be defined (or undefined). You can make that program as smart or dumb as you
want, and simulate things like persistent classes.
On Mon, Sep 13,
Hi,
I've been playing with class persistence recently. The idea is to run
potentially heavy class-generating commands not too frequently, but
being able to use those classes every time Cfengine runs.
What I have now is this:
bun
21 matches
Mail list logo