Forum: CFEngine Help
Subject: Re: Passing parameters to methods bundle
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,26825,26830#msg-26830
It seems like a bug to me also. Head on over and report it.
___
Help-cfengine mailing
no-re...@cfengine.com writes:
> cf-promises seems be evaluating product before the parameters are
> passed. Without passing, product works as expected.
That would explain it. Seems like a bug, but I'm not sure.
Regards,
--
Trond H. Amundsen
Center for Information Technology Services, Universit
Forum: CFEngine Help
Subject: Re: Passing parameters to methods bundle
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,26825,26828#msg-26828
FYI, the using the sum function causes the same error. On a related matter why
do product and sum functions work with real numbers
Forum: CFEngine Help
Subject: Re: Passing parameters to methods bundle
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,26825,26827#msg-26827
cf-promises seems be evaluating product before the parameters are passed.
Without passing, product works as expected.
$ cat foo.cf
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: th
Link to topic: https://cfengine.com/forum/read.php?3,26723,26826#msg-26826
zzamboni Wrote:
---
> One way to ensure contents of the entire file and
>
Hello,
I'm having some trouble passing parameters of different types to a
methods bundle, using CFEngine 3.3.4. Consider this example:
body common control {
bundlesequence => { "main" };
}
bundle agent main {
methods:
"any" usebundle => test("10","15");
}
bundle age
Forum: CFEngine Help
Subject: Re: CFEngine Help: Re: Variable convergence mystery
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,26796,26824#msg-26824
Mark Burgess Wrote:
---
> The algorithm is simple: every attempt is m
Knowing the algorithm is not going to help anyone to understand it as
there are too many "variable issues".
The algorithm is simple: every attempt is made to converge variables
based on knowledge of defined classes,
whenever they are encountered in a scheduled promise, going around up to
three
Forum: CFEngine Help
Subject: Re: Using the new services promise types with Linux's chkconfig
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,26785,26822#msg-26822
Mike,
Good find. After checking the code and some discussions with developers, it
seems proper handling of ser
Hi Neil,
> I've learned something new today. Now I had a question. If agent re-evaluates
> vars and classes more than in the normal ordering of other promise types then
> what is the algorithm? How can we mortals similate in our minds what the
> agent will do?
I honestly don't know the details
Forum: CFEngine Help
Subject: Re: Variable convergence mystery
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,26796,26819#msg-26819
Thanks Diego,
I've learned something new today. Now I had a question. If agent re-evaluates
vars and classes more than in the normal order
Indeed, handles and depends_on attributes are only for documentation purposes
and for the knowledge map in Enterprise.
--Diego
On Jul 31, 2012, at 9:14 AM, no-re...@cfengine.com wrote:
> Forum: CFEngine Help
> Subject: Re: Order/dependency problem
> Author: nickanderson
> Link to topic: https:/
Forum: CFEngine Help
Subject: Re: Variable convergence mystery
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,26796,26818#msg-26818
Nick,
This is because promises within a section are evaluted in the order in which
they appear. So when the "debug" class is set and the vari
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,26723,26816#msg-26816
As Neil said, there's no "one true way" of doing things, since all systems are
different.
One way to ensure contents of
On 07/31/2012 12:14 PM, Diego Zamboni wrote:
> Nick,
>
> There is a bit of magic to properly resolve class-variable dependencies.
> This is mentioned in the reference guide:
> https://cfengine.com/manuals/cf3-Reference#Agent-normal-ordering
>
> CFEngine tries to keep variable and class promises
Forum: CFEngine Help
Subject: Re: Variable convergence mystery
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,26796,26815#msg-26815
That's a bit too black box/magic for me to be comfortable with. If the verbose
output showed the classes and vars promises being evaluated
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: th
Link to topic: https://cfengine.com/forum/read.php?3,26723,26814#msg-26814
th Wrote:
---
> One more thing I'm noticing :
>
> - edit_template seems to
Nick,
There is a bit of magic to properly resolve class-variable dependencies. This
is mentioned in the reference guide:
https://cfengine.com/manuals/cf3-Reference#Agent-normal-ordering
CFEngine tries to keep variable and class promises before starting to consider
any other kind of promise. In
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: th
Link to topic: https://cfengine.com/forum/read.php?3,26723,26812#msg-26812
One more thing I'm noticing :
- edit_template seems to start emptying the file, so execution time is the same
for each run, a
On 07/31/2012 10:18 AM, Tokarski Boleslaw wrote:
> Normal ordering specifies that vars are run before classes. So before
> anything else happens below this, debug is not declared, so "filename"
> is set to "/tmp/nodebug".
>
> Then, the class debug is declared, on the second CFEngine iteration this
Hello,
Funny thing, as I bumped into that today, using 3.1.4. With my own
policy, but here are my discoveries.
> bundle agent test(param){
> vars:
> debug::
> "filename" string => "/tmp/debug";
>
> !debug::
> "filename" string => "/tmp/nodebug";
>
> classes:
> "debug" expr
Forum: CFEngine Help
Subject: Re: Variable convergence mystery
Author: nickanderson
Link to topic: https://cfengine.com/forum/read.php?3,26796,26809#msg-26809
neilhwatson Wrote:
---
> An exception to normal ordering? That sir, is
> blasphemy. Jo
Forum: CFEngine Help
Subject: Re: Variable convergence mystery
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,26796,26808#msg-26808
Nick Anderson Wrote:
---
> I guess that's where the order kicks in. So if you have a var
On 07/31/2012 09:32 AM, Ted Zlatanov wrote:
> Thinking about it, I think the key is that !debug requires knowledge of
> the debug context, so it needs the context expression to converge. At
> least that was my instinctive thinking when I wrote the above. But I
> don't know the specific algorithm
On Tue, 31 Jul 2012 08:59:08 -0500 Nick Anderson wrote:
NA> The file making the promise $(filename) gets set to different values
NA> based on a class. I thought due to normal ordering, on the first pass
NA> filename should get set to "/tmp/nodebug" since the debug class has not
NA> been raise
Forum: CFEngine Help
Subject: Re: Order/dependency problem
Author: loopx
Link to topic: https://cfengine.com/forum/read.php?3,26797,26805#msg-26805
Hi Nickanderson,
Ok, I understand why it is not doing expected things ... ^^
Thank you, I will fix that ...
Forum: CFEngine Help
Subject: Re: Variable convergence mystery
Author: nickanderson
Link to topic: https://cfengine.com/forum/read.php?3,26796,26804#msg-26804
Ok this is interesting.
If I change the vars order and have no class set on filename, or if I have
specified the any class
vars:
"f
Forum: CFEngine Help
Subject: Re: CFEngine Help: Re: Append the content of file to another one
without checking for duplicate lines
Author: jbdenis
Link to topic: https://cfengine.com/forum/read.php?3,26711,26803#msg-26803
I'm talking about a "file_preserve_block" value for the insert_type attrib
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,26723,26802#msg-26802
There is no one true way to do something in Cfengine. There is always another
way. I only speak of what, in my expe
Forum: CFEngine Help
Subject: Re: Order/dependency problem
Author: nickanderson
Link to topic: https://cfengine.com/forum/read.php?3,26797,26801#msg-26801
Hi loopx,
depends_on is used for documentation purposes, not promise ordering (at least
to my knowledge).
https://cfengine.com/manuals/cf3-Re
Forum: CFEngine Help
Subject: Re: Variable convergence mystery
Author: nickanderson
Link to topic: https://cfengine.com/forum/read.php?3,26796,26800#msg-26800
Yeah I know about suppressing the warnings with policy free. This was just
unexpected behavior. I can't tell if its intended or a bug.
__
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: th
Link to topic: https://cfengine.com/forum/read.php?3,26723,26799#msg-26799
neilhwatson Wrote:
> Using edit_line, one can promise the entire
> contents of a file. Indeed, this is best practice
> rather
Forum: CFEngine Help
Subject: Re: Variable convergence mystery
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,26796,26798#msg-26798
Setting a policy of free would remove the duplicate warnings. Still, I would
expect /tmp/nodebug to be created during the first pass. It's
Forum: CFEngine Help
Subject: Order/dependency problem
Author: loopx
Link to topic: https://cfengine.com/forum/read.php?3,26797,26797#msg-26797
Hi,
In my "update.cf" file (used by "failsafe.cf"), I'm trying to make promise in
the good order to avoid double run requirement. Here is what I'm try
I saw something I didn't expect last night. Ted cleaned up a sketch for
managing /etc/security/limits.conf that worked like this example.
The file making the promise $(filename) gets set to different values
based on a class. I thought due to normal ordering, on the first pass
filename should ge
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,26723,26795#msg-26795
th Wrote:
---
> 1. edit_line cannot install or repair the
> whole
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: th
Link to topic: https://cfengine.com/forum/read.php?3,26723,26794#msg-26794
th Wrote:
---
> - I still don't have what I'd need, which is
> expand_temp
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: th
Link to topic: https://cfengine.com/forum/read.php?3,26723,26793#msg-26793
I'll try to sum up what I want and the limitations I encounter :
Let's say I have 2 types of hosts and I want to configure (OR
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: Beto
Link to topic: https://cfengine.com/forum/read.php?3,26723,26790#msg-26790
I guess what I miss is such a feature combined with the expand_template
behavior...
You need to state your requirement cl
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: th
Link to topic: https://cfengine.com/forum/read.php?3,26723,26789#msg-26789
th Wrote:
> Sure, but I was using expand_template because I
> needed the [%CFEngine linux:: %] kind of tags.
I guess what I m
Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: th
Link to topic: https://cfengine.com/forum/read.php?3,26723,26788#msg-26788
mark Wrote:
---
> You don't need to have *any* begin end sections in
> a te
41 matches
Mail list logo