Re: How to remove clients from cfengine 3 reports?

2010-03-19 Thread Matt Richards
Write a simple little program to remove the entry from the lastseen DB. It is pretty easy, couple of BerkDB operations. > > >> But I have set lastseenexpireafter => "4320"; (3 days) in the common >> control and there are still clients showing up that have been gone for >> more than 3 days. >>

Re: process miscounting?

2010-03-18 Thread Matt Richards
Well, I added a command to do a "ps -ef " if the process count was out of range, and it did do it. But it did not show more than one process running: !! Process count for 'XX' was out of promised range (2 found) I: Comment: Verify the processes are running Q: "...usr/bin/ps -ef ": root 2

Re: Deleting local accounts

2010-03-17 Thread Matt Richards
Well, there are lots of things to think about. Unix is not just Linux, there are many more out there and not all the authentication/user situations are the same. You also have to think about Solaris and yellowpages, systems without /etc/shadow, LDAP, DCE, Krb5, etc. The list is endless in the di

Re: process miscounting?

2010-03-17 Thread Matt Richards
Good idea. I find the process overcounting more common. In my configuration, I have a range for the process count and it reports when the process count is out of range. I will add a "ps -ef" along with the report. It may not catch it as it is not run exactly as the same time as the cf process co

Re: process miscounting?

2010-03-17 Thread Matt Richards
Good to know. However, I get the miscounting when running cf-exec in the background. It is not just process undercounting, I also see process overcounting. It is very odd, I searched through the code and I can't see how this can happen. I can't figure out how to make a testcase in which this wil

cf3.0.4(up to lastest svn) GetVariable hash lookup infinite loop

2010-03-17 Thread Matt Richards
Greetings, I think I hit upon the perfect circumstance to bust the hash table in GetVariable (vars.c). I believe that the hash table is not going far enough before reseting the increment as I end up in an infinite loop. See the comments "//" below: Debug("GetVariable(%s,%s): using scope '%s' f

Re: Redefinition of a constant variable

2010-03-12 Thread Matt Richards
Does using policy=>"overridable" help? I had a similar issue with duplicate value with upgrading to cf4: > Vars: > 8 > 9 redhat:: >10 # List this variable first as the default. >11 "services" slist => { >12 "anacron", >13

Re: variable name for a usebundle statement: bad?

2010-03-12 Thread Matt Richards
It is passed as a parameter. bundle agent run_bundle(bundle_name) { On Mar 12, 2010, at 8:57 AM, nwat...@symcor.com wrote: > help-cfengine-boun...@cfengine.org wrote on 2010-03-12 08:54:28 >> >> % cf-agent -K >> Undeclared promise bundle "$(bundle_name)()" was referenced in a promise > > Is bu

variable name for a usebundle statement: bad?

2010-03-12 Thread Matt Richards
Greetings: This is invalid? I suppose it should be, it is a little nutty: bundle agent run_bundle(bundle_name) { methods: "any" usebundle => "$(bundle_name)", comment => "run bundle $(bundle_name)"; } % cf-agent -K Undeclared promise bundle "$(bundle_name)()"

Re: process miscounting?

2010-03-11 Thread Matt Richards
Primarily on AIX, I have not noticed the issue on other OS'es (I do not have Solaris in the mix, but that will be soon). 2010/3/11 : > Matt what types of systems do you see this on?   I've only seen it on a > Sparc Solaris 10 host. ___ Help-cfengine ma

Re: process miscounting?

2010-03-11 Thread Matt Richards
once and awhile it does happen. 2010/3/11 : > Matt Richards wrote on 2010-03-10 15:05:32: > >> I have seen this behavior as well. Not very common, but it happens >> every now and then. > > Matt, > > Do you call cf-execd from a cron job?  If so can you please provi

Re: process miscounting?

2010-03-10 Thread Matt Richards
I have seen this behavior as well. Not very common, but it happens every now and then. On Mar 10, 2010, at 2:55 PM, nwat...@symcor.com wrote: > Has anyone noticed extra processes being started in spite of promises? > Currently my process list is > ps -ef|grep cf- >root 23518 1 0 13:46

cf3.0.4 released?

2010-03-05 Thread Matt Richards
Greetings, I see that cf-3.0.4 is out there, but access if forbidden to download it. I may have jumped the gun, but I am very excited. I haven't been to the cfengine web page lately, but, Wow! Lots of work and new stuff. Very impressive. Did ya happen to see Jarle Bjorgeengen's cfengine vs pup

Re: Version control best practices?

2010-03-04 Thread Matt Richards
Mine is similar to how Neil does it. I use plain old CVS. Specifying tags on the cf configuration to indicate which level (alpha, beta, prod, etc...) the edit should be in: cvs tag -F alpha failsafe.cf I then can key off the tag to release different levels and release using cvs. Something lik

Re: editing old school cron tables

2010-03-04 Thread Matt Richards
This sound like the best safe method. A little more work to deal with the file, but no race conditions or quirky platform specific items. On Mar 4, 2010, at 11:00 AM, Christopher Browne wrote: > > I cope with cron edits via... > > - Pulling it out into a file (crontab -l) > > - Editing the fil

Re: editing old school cron tables

2010-03-04 Thread Matt Richards
True, only if you have the full crontab available as a file. With cfengine, I just edit the cron entry directly without pulling the whole file. But, that is another way to do it. I suppose you could do a crontab /var/spool/cron/crontabs/ Interesting, I never thought to do it that way. It might

Re: editing old school cron tables

2010-03-04 Thread Matt Richards
I SIGKILL cron for AIX, it is set to respawn in /etc/inittab. Others I did a different action (like Linux listed below): bundle agent update_cron { files: "$(global.crontabs)/root" comment => "Add cf-agent to root's crontab", edit_line => add_cf_cron, classes =>

Re: challenge: last Saturday of the month

2010-03-03 Thread Matt Richards
; execresult("/usr/bin/cal $(month) $(year) | awk '{print $7}' | grep -E "^[0-9]" | tail -1","useshell"); classes: "Last_Saturday" expression => classify("Day$(last_day)"); On Wed, Mar 3, 2010 at 8:26 AM, Matt Richards wrote: >

Re: challenge: last Saturday of the month

2010-03-03 Thread Matt Richards
Interesting. I had something similar with how to schedule for the last day of the month (ya, the shell commands are cheating a bit): vars: "year" string => execresult("/usr/bin/date +%Y","noshell"); "month"string => execresult("/usr/bin/date +%m","noshell"); "last_day" string

cf3 community - mySQL?

2010-03-01 Thread Matt Richards
Greetings, I was wondering if there was any reason to compile mySQL into the community edition of cfengine. It seems like only the enterprise edition uses it. ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo

Re: cf3.03 - cf-serverd (AIX) core dumps after a month

2010-02-12 Thread Matt Richards
:36 AM, Mark Burgess wrote: >> >> Matt, are you saying there is a memory leak, or that there is some weird >> memory >> resource allocation on AIX? Could you work around by restarting the server >> once a week? >> >> Matt Richards wrote: >>>

Re: cf3.03 - cf-serverd (AIX) core dumps after a month

2010-02-12 Thread Matt Richards
going fine. On Feb 12, 2010, at 9:36 AM, Mark Burgess wrote: > > Matt, are you saying there is a memory leak, or that there is some weird > memory > resource allocation on AIX? Could you work around by restarting the server > once a week? > > Matt Richards wrote: >> G

cf3.03 - cf-serverd (AIX) core dumps after a month

2010-02-12 Thread Matt Richards
Greetings, cf-serverd core dumped on all my AIX servers after about a month of running. After looking at the core dump, it seems it is a rather common issue. cf-serverd over time seems to accumulate too much data to be held in a single memory segment. Recompiling with the compiler flag "-bmaxd

Re: cf-3.0.3 core dump

2010-02-01 Thread Matt Richards
Yikes, I don't have gdb.I compile cfengine using the native compiler. I'll put it in the bug tracking system. Thanks. On Mon, Feb 1, 2010 at 10:46 AM, Mark Burgess wrote: > > Matt, can you use the bug tracking system and gdb please > > thanks ___ H

cf-3.0.3 core dump

2010-02-01 Thread Matt Richards
Greetings, I am getting a core dump on a specific machine. It has been behaving well on 3.0.3 for a month now: Segmentation fault in PurgeLocalFiles at line 526 in file "" could not read "files_interfaces.c" (dbx) where PurgeLocalFiles(filelist = (nil), localdir = (nil), attr = (...), pp = (nil))

Re: Apple script in cfengine files

2010-01-26 Thread Matt Richards
ooo, my interest is piqued! On Jan 26, 2010, at 3:11 PM, Janet Bass wrote: > Has anyone used Applescripts scripts in cfengine? > > I am not finding a lot of documentation about Cfengine and Mac OS X > > Thanks > -- > Janet Bass > Unix System Administration > Manufacturing Engineering Laborator

cf3: getfields with a null field

2009-12-15 Thread Matt Richards
I am looking at getfields and it seems that if you have a null field, the value in the named array is not populated for that entry. For example: bundle agent test { vars: "passwd_match" int => getfields("^root:.*","/tmp/testfile",":","userdata"); reports: cfengine_3:: "

Re: examples of working cfengine3 config? sharing my experience in trying to get started with cfengine 3

2009-12-15 Thread Matt Richards
I agree, you can't learn other programming languages (like C) overnight. On Dec 15, 2009, at 8:59 AM, Mark Burgess wrote: > > The syntax is not tough. It is incredibly simple. One pattern to follow for > everything. ___ Help-cfengine mailing list He

Re: cf3 cf-serverd core dump (illegal cipher length)

2009-12-12 Thread Matt Richards
off track? On Dec 11, 2009, at 8:03 AM, Matt Richards wrote: > Well, it is still doing it. I think it is the cf-server actually causing the > illegal cipher length in the client. I am using openSSL 0.9.8l. I don't have > the client side dialog, as it is very random on which host

Re: cf3 cf-serverd core dump (illegal cipher length)

2009-12-11 Thread Matt Richards
ere has discovered some problems with openSSL beta 1, and had > to revert to > 0.9.8 something. What version of SSL are you using? > > M > > > Matt Richards wrote: >> Well some good news and some bad news. cf-serverd did core dump last >> night on th

cf3 cf-serverd core dump (illegal cipher length)

2009-12-10 Thread Matt Richards
Well some good news and some bad news. cf-serverd did core dump last night on the policy host. I did get output from two clients at the same time. one was from a regular cf-agent regular run (06:22:02 am): Protocol transaction sent illegal cipher length !! Authentication dialogue with x.xx.xx.

Re: cf3 svn666 cf-serverd core dump

2009-12-09 Thread Matt Richards
} On Dec 9, 2009, at 2:30 PM, Mark Burgess wrote: > > Matt, could you try svn and see if this helps please. > > Matt Richards wrote: >> I am a little closer now. I added some debugging information in >> client_protocol.c (~line 338): >> >>

cf3 svn666 cf-serverd core dump

2009-12-09 Thread Matt Richards
ark Burgess wrote: > > Perhaps you have access to some fancy tools, like purify, insight etc > that might help debug this. It sounds like some kind of heap corruption. > > M > > Matt Richards wrote: >> Well, I hate to say this, but I am still having this problem (svn 657

Re: An Omen...

2009-12-07 Thread Matt Richards
Oh, I dare. I dare. On Mon, Dec 7, 2009 at 7:47 AM, Mark Burgess wrote: > > Cfengine patch level 666 -- download if you dare > > M > > -- > Mark Burgess > > - > Professor of Network and System Administration > Oslo University College, Norway > > Per

Re: cf3 svn501 cf-serverd core dump

2009-12-07 Thread Matt Richards
> > Matt, > > I am glad to hear that this no longer troubling you, but I am unable to trace > the source > of a problem. If you see anything else, let me know. > > Matt Richards wrote: >> Okay, after working on this one for a long time, I did noticed that >> the

Re: building cf3 on AIX

2009-12-03 Thread Matt Richards
I did have those issues, until I upgraded flex and bison. flex-2.5.35 and bison-2.4 work for me. On Dec 3, 2009, at 3:15 PM, nwat...@symcor.com wrote: > Does anyone have a working method for building cf3 on aix that they can > share? For me configure seems for work but make step returns an err

Re: cf3 suggestion

2009-12-03 Thread Matt Richards
Yep, that is how I have been doing them. I am just lazy. On Dec 3, 2009, at 11:45 AM, Mark Burgess wrote: > > You can choose timestamp so that you can keep dated versions alive, and then > tidy them > after a certain time... That is less convenient maybe, but doable ___

cf3 suggestion

2009-12-03 Thread Matt Richards
Greetings, By no means is this a priority in any way. Just a suggestion on an addition. Add rotate to copy_backup so I could keep the last X versions of a copied file. ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailma

Re: cf-monitord - required?

2009-12-02 Thread Matt Richards
I should have looked at my traceback more carefully: > ssleay_rand_bytes(buf = " \271`", num = 22), line 485 in "md_rand.c" > RAND_bytes(buf = " \271`", num = 32), line 227 in "rand_lib.c" num=32 and num=22? That shouldn't happen. Looking at the code it should be the same as it is not modifie

Re: cf-monitord - required?

2009-12-02 Thread Matt Richards
I have tried 0.9.8j/k/l and 1.0 beta 4. All seem to do it, but only on the policy host, not the clients. There is a mixture of 64bit and 32bit machines, but from the SSL code, it doesn't appear like that would make a difference, especially since I bind it to a 32bit only compile. On Dec 2, 200

Re: cf-monitord - required?

2009-12-02 Thread Matt Richards
I didn't think cf-monitord was required, I am just taking stabs in the dark on this one. cf-serverd has been crashing a few times a day now and it is driving me crazy trying to figure it out. It has nothing to do with cfengine (as far as I can tell), but with the low level SSL functions. Maybe

cf-monitord - required?

2009-12-02 Thread Matt Richards
Greetings, I am trying to track down what I think is an SSL bug and I am wondering if cf-monitord is required to be running. I am not currently running it. ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/h

cf3 svn(646-648) Berkeley DB_NOTFOUND

2009-12-01 Thread Matt Richards
Greetings, Something odd happened around in svn around 646-648. I seem to be having a DB issue now: !! Error scanning hashbase cursor: DB_NOTFOUND: No matching key/data pair found !! Error scanning hashbase cursor: DB_NOTFOUND: No matching key/data pair found ^CReceived signal 2 (SIGINT) whil