CFEngine Help: Re: Problem accessing list variables in hash

2012-06-21 Thread no-reply
Forum: CFEngine Help Subject: Re: Problem accessing list variables in hash Author: nickanderson Link to topic: https://cfengine.com/forum/read.php?3,26268,26272#msg-26272 Hi Mike, I think I would do it in a different way. You seem to have a user creation bundle already. Perhaps you could consid

Re: which cfengine_stdlib.cf

2012-06-21 Thread Ted Zlatanov
On Thu, 21 Jun 2012 11:40:32 -0500 Diego Zamboni wrote: DZ> Indeed, the version in github.com/cfengine/copbl/ is the master DZ> copy, from which the others are (sometimes inconsistently) DZ> updated. We are working on cleaning up some of this to reduce DZ> confusion. DZ> Namespace support will

CFEngine Help: Re: Problem accessing list variables in hash

2012-06-21 Thread no-reply
Forum: CFEngine Help Subject: Re: Problem accessing list variables in hash Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,26268,26270#msg-26270 Hi Mike, Due to the way variable convergence works in CFEngine, looping over multi-dimensional arrays doesn't work as one would e

Re: CFEngine Help: Re: 180+ instances of cf-execd and cf-agent

2012-06-21 Thread Ron Parker
The machine in question was running 3.3.3. On Thu, Jun 21, 2012 at 11:11 AM, wrote: > Forum: CFEngine Help > Subject: Re: 180+ instances of cf-execd and cf-agent > Author: davidlee > Link to topic: https://cfengine.com/forum/read.php?3,26261,26266#msg-26266 > > Sorry, my previous message may hav

Problem accessing list variables in hash

2012-06-21 Thread Mike Brodbelt
I want to have a bundle that creates system user accounts, and adds a list of authorised ssh keys to those accounts. So, what I have is:- bundle agent do_config { vars: "users[www-user][gecos]" string => "Web server user"; "users[www-user][home]"string => "/var/lib/www"; "u

Re: which cfengine_stdlib.cf

2012-06-21 Thread Diego Zamboni
Hi Bas, Indeed, the version in github.com/cfengine/copbl/ is the master copy, from which the others are (sometimes inconsistently) updated. We are working on cleaning up some of this to reduce confusion. Namespace support will help reduce a lot of potential name collisions among Design Center

CFEngine Help: Re: 180+ instances of cf-execd and cf-agent

2012-06-21 Thread no-reply
Forum: CFEngine Help Subject: Re: 180+ instances of cf-execd and cf-agent Author: davidlee Link to topic: https://cfengine.com/forum/read.php?3,26261,26266#msg-26266 Sorry, my previous message may have confused two distinct things about managing this: Assuming 3.1.4 (or thereabouts) with Berkele

CFEngine Help: Re: 180+ instances of cf-execd and cf-agent

2012-06-21 Thread no-reply
Forum: CFEngine Help Subject: Re: 180+ instances of cf-execd and cf-agent Author: davidlee Link to topic: https://cfengine.com/forum/read.php?3,26261,26265#msg-26265 What version of cfengine? This might matter... see below. Over the last 15 months or so, our cfengine3 installation has grown from

Re: 180+ instances of cf-execd and cf-agent

2012-06-21 Thread Mark Burgess
As Mike pointed out NFS is a usual culprit. -- Sent from my Android phone with probably ridiculous and involuntary spelling corrections. Brian Bennett wrote: Ron, It looks to me like you have a promise that's getting hung on something. Run `cf-agent -KIv` (cap k, cap i, little v) and watch t

Re: 180+ instances of cf-execd and cf-agent

2012-06-21 Thread Brian Bennett
Ron, It looks to me like you have a promise that's getting hung on something. Run `cf-agent -KIv` (cap k, cap i, little v) and watch the output. You should be able to see where it's hanging. -- Brian On Jun 21, 2012, at 8:01 AM, Ron Parker wrote: > In testing that the promises for a given m

Re: 180+ instances of cf-execd and cf-agent

2012-06-21 Thread Mike Svoboda
Hey Ron I have the following in a promise. You may want to adjust the values of "ago" there. I execute cf-agent once an hour. If I see a cf-agent process older than 2 hours old, I have the current execution kill that process and I raise a class that I report on. You could use this same thing

180+ instances of cf-execd and cf-agent

2012-06-21 Thread Ron Parker
In testing that the promises for a given machine were sufficient to reconfigure it from scratch, I did a fresh OS install to a VM, bootstrapped CFE and manually started cf-agent. After about 30 minutes and the fourth email from the system, it had converged. I noted a few things that were missing,

Re: which cfengine_stdlib.cf

2012-06-21 Thread Bas van der Vlies
On 06/21/2012 02:50 PM, Ted Zlatanov wrote: > On Thu, 21 Jun 2012 13:46:15 +0200 Bas van der Vlies wrote: > > BvdV> Question which cfengine_stdlib.cf to use? Is copbl repository the > leading one > > BvdV> There is one in the copbl and one in the design-center repository and > they differ: >

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Nick Anderson
On 06/21/2012 08:21 AM, Ted Zlatanov wrote: > I don't know if the timestamp is necessary, sorry. Try it with the > timestamp and without it:) > > I would have used UTC in an ISO string with the timezone, or simply an > epoch timestamp. But that's all academic if the file contents don't > matter.

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Nick Anderson
On 06/21/2012 08:07 AM, Riccardo Murri wrote: > Hi Ted, > "cf_promises_validated" seems to contain the date of the last > successful validation, so maybe this one instead? I was under the impression that it worked like this. When policy has changed and then been successfully validated /var/cfeng

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Ted Zlatanov
On Thu, 21 Jun 2012 15:07:58 +0200 Riccardo Murri wrote: RM> On Thu, Jun 21, 2012 at 3:02 PM, Ted Zlatanov wrote: >> On Thu, 21 Jun 2012 14:17:53 +0200 Riccardo Murri >> wrote: >> RM> Would it be sensible to add a command-line switch to `cf-promises` to RM> force update of `masterfiles/cf_p

Re: CFEngine Help: Reading lines into an array only if class matches

2012-06-21 Thread Ted Zlatanov
On Fri, 15 Jun 2012 21:39:46 +0200 (CEST) sauer wrote: n> So, I have a couple of situations where I want to populate an exclude n> list from an external file. For example, I want to remove the n> suid/sgid bits from executable files which are group or n> world-writeable, unless the file is in an

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Nick Anderson
Ted Zlatanov wrote: >On Thu, 21 Jun 2012 14:17:53 +0200 Riccardo Murri > wrote: > >RM> Would it be sensible to add a command-line switch to `cf-promises` >to >RM> force update of `masterfiles/cf_promises_validated` ? > >Would it work to just say "cf-promises ... && touch >masterfiles/cf_promises

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Riccardo Murri
Hi Ted, On Thu, Jun 21, 2012 at 3:02 PM, Ted Zlatanov wrote: > On Thu, 21 Jun 2012 14:17:53 +0200 Riccardo Murri > wrote: > > RM> Would it be sensible to add a command-line switch to `cf-promises` to > RM> force update of `masterfiles/cf_promises_validated` ? > > Would it work to just say "cf-p

Re: To xdev or not to xdev

2012-06-21 Thread Ted Zlatanov
On Tue, 19 Jun 2012 15:59:36 -0500 Ron Parker wrote: RP> It's not clear to me from the reference manual. If I want to set RP> permissions on a directory and all of it's descendents that are not RP> (NFS) mounts, do I want xdev to be true or false? I think it's similar to the rsync -x flag: if

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Ted Zlatanov
On Thu, 21 Jun 2012 14:17:53 +0200 Riccardo Murri wrote: RM> Would it be sensible to add a command-line switch to `cf-promises` to RM> force update of `masterfiles/cf_promises_validated` ? Would it work to just say "cf-promises ... && touch masterfiles/cf_promises_validated"? Ted ___

Re: which cfengine_stdlib.cf

2012-06-21 Thread Ted Zlatanov
On Thu, 21 Jun 2012 13:46:15 +0200 Bas van der Vlies wrote: BvdV> Question which cfengine_stdlib.cf to use? Is copbl repository the leading one BvdV> There is one in the copbl and one in the design-center repository and they differ: I have not updated CFEngine::stdlib in Design Center from t

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Riccardo Murri
Hello, On Thu, Jun 21, 2012 at 1:23 PM, Neil Watson wrote: > On Thu, Jun 21, 2012 at 01:08:10PM +0200, Mark Burgess wrote: >> >>  Cf-promises updates this when it executes successfully. > > I think that this only happens when called via cf-execd. > > ettin:/var/cfengine/masterfiles# rm cf_promise

which cfengine_stdlib.cf

2012-06-21 Thread Bas van der Vlies
Hello, Question which cfengine_stdlib.cf to use? Is copbl repository the leading one There is one in the copbl and one in the design-center repository and they differ: {{{ 13:37 install2.lisa.sara.nl:/var/tmp/bas/cfengine root# -rw-r--r-- 1 root root 46675 Jun 20 09:26 copbl_github/cfengine_std

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Neil Watson
On Thu, Jun 21, 2012 at 01:08:10PM +0200, Mark Burgess wrote: > > Cf-promises updates this when it executes successfully. I think that this only happens when called via cf-execd. ettin:/var/cfengine/masterfiles# rm cf_promises_validated ettin:/var/cfengine/masterfiles# cf-promises ettin:/var/

Re: when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Mark Burgess
Cf-promises updates this when it executes successfully. -- Sent from my Android phone with probably ridiculous and involuntary spelling corrections. Riccardo Murri wrote: Hello, I see that the stock `failsafe.cf` bundled with CFEngine Community updates the input files on the client only when

when/how is masterfiles/cf_promises_validated updated?

2012-06-21 Thread Riccardo Murri
Hello, I see that the stock `failsafe.cf` bundled with CFEngine Community updates the input files on the client only when `masterfiles/cf_promises_validated` on the server is updated. I also see that `masterfiles/cf_promises_validated` is periodically updated on the server by some CFEngine compon

[ANNOUNCE] CFEngine Community 3.3.4 is released

2012-06-21 Thread Mikhail Gusarov
Good day. CFEngine Community 3.3.4 is now available for download. Evaluation of policies: - Fix wrong classes set after installation of several packages using packages promises (Mantis #829). - Fix segfault using edit_template on existing file (Mantis #1155). Misc: - Fix memory leak during