negative process match and general promise state rambling

2012-04-25 Thread Neil Watson
Greetings, I'm trying to set a class if a process is not running. Has anyone done negative process matching? I often find myself trying to understand what state a promise will be in, e.g. kept, repaired or failed. For instance a files promise that copies will be kept if no copy was needed or re

CFEngine Help: Deleting extra entries inside config that's built by edit_line(s)

2012-04-25 Thread no-reply
Forum: CFEngine Help Subject: Deleting extra entries inside config that's built by edit_line(s) Author: terok Link to topic: https://cfengine.com/forum/read.php?3,25689,25689#msg-25689 Hi, I have a promise that sets configuration values in sections. Now this works just fine. I'm looking to enhan

CFEngine Help: Re: negative process match and general promise state rambling

2012-04-25 Thread no-reply
Forum: CFEngine Help Subject: Re: negative process match and general promise state rambling Author: terok Link to topic: https://cfengine.com/forum/read.php?3,25688,25690#msg-25690 Wouldn't the restart_class work for that? ___ Help-cfengine mailing list

Re: CFEngine Help: Re: negative process match and general promise state rambling

2012-04-25 Thread Neil Watson
On Wed, Apr 25, 2012 at 04:09:19PM +0200, no-re...@cfengine.com wrote: >Wouldn't the restart_class work for that? Sorry, I worded that poorly. Trying to set a class if a process is running. Have to do something like this: "proc" restart_class => "proc_not_running", comment => "Restart c

CFEngine Help: Re: CFEngine Help: Re: negative process match and general promise state rambling

2012-04-25 Thread no-reply
Forum: CFEngine Help Subject: Re: CFEngine Help: Re: negative process match and general promise state rambling Author: terok Link to topic: https://cfengine.com/forum/read.php?3,25688,25692#msg-25692 > "proc" > restart_class => "proc_not_running", > comment => "Restart class should not be

CFEngine Help: Re: negative process match and general promise state rambling

2012-04-25 Thread no-reply
Forum: CFEngine Help Subject: Re: negative process match and general promise state rambling Author: mikesphar Link to topic: https://cfengine.com/forum/read.php?3,25688,25693#msg-25693 Neil Watson Wrote: > I would like to see the documentation clearly > explain the promise states > for each type o

Re: CFEngine Help: Re: negative process match and general promise state rambling

2012-04-25 Thread Neil Watson
On Wed, Apr 25, 2012 at 05:31:10PM +0200, no-re...@cfengine.com wrote: >Kept: Cfengine didn't need to do anything >Repaired: Cfengine did something (copied a file, started a process, generated >a report, set a class, etc) >Broken: Cfengine should have done something but couldn't, or what it tri

Re: CFEngine Help: Re: CFEngine Help: Re: negative process match and general promise state rambling

2012-04-25 Thread Nick Anderson
On 04/25/2012 10:16 AM, no-re...@cfengine.com wrote: > Ok, now I get what you mean. Without the restart_class, the promise is 'kept' > > > even if the pro

Re: CFEngine Help: Re: CFEngine Help: Re: negative process match and general promise state rambling

2012-04-25 Thread Nicolas Charles
On 25/04/2012 17:51, Nick Anderson wrote: > On 04/25/2012 10:16 AM, no-re...@cfengine.com wrote: >> Ok, now I get what you mean. Without the restart_class, the promise is 'kept' >> even if the process isn't running. otoh, we don't really promise anything if >> there's no restart_class.. might be th

CFEngine Help: Re: Process matching by start time

2012-04-25 Thread no-reply
Forum: CFEngine Help Subject: Re: Process matching by start time Author: msvob...@linkedin.com Link to topic: https://cfengine.com/forum/read.php?3,25522,25697#msg-25697 I'm trying to do the same Jesse. I think we're using stime_range incorrectly here. The first value probably shouldn't be zero

CFEngine Help: Re: Process matching by start time

2012-04-25 Thread no-reply
Forum: CFEngine Help Subject: Re: Process matching by start time Author: msvob...@linkedin.com Link to topic: https://cfengine.com/forum/read.php?3,25522,25698#msg-25698 The problem you're seeing here is in process_result. Its inconsistant at best, misleading at worst. You're using stime_rang

Re: negative process match and general promise state rambling

2012-04-25 Thread Aleksey Tsalolikhin
On Wed, Apr 25, 2012 at 6:38 AM, Neil Watson wrote: > > I'm trying to set a class if a process is not running.  Has anyone done > negative process matching? Yes, isn't that what "restart_class" does? It sets a class if the process is not running? Aleksey ___

Re: CFEngine Help: Re: negative process match and general promise state rambling

2012-04-25 Thread Aleksey Tsalolikhin
On Wed, Apr 25, 2012 at 7:22 AM, Neil Watson wrote: > > > Sorry, I worded that poorly.  Trying to set a class if a process is > running.  Have to do something like this: > > "proc" >    restart_class => "proc_not_running", >    comment => "Restart class should not be needed here.", >    classes =>