RE: cfrun runs without errors... but doesn't "do" anything

2010-03-26 Thread NWatson
See if this helps. http://watson-wilson.ca/blog/cfcookbook.html#SECTION00018 You might also check that your classes cfe_clients and cfe_servers are actually matching. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, i

Re: killing runaway procs

2010-03-26 Thread NWatson
A typo was my problem. Sorry for wasting bandwith. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended reci

killing runaway procs

2010-03-26 Thread NWatson
Greetings, I'm trying to make a promise that will kill procs that use too much memory. Using version Community 3.0.2. Upgrading soon but need to work with this temporarily. My target for this test: [nwat...@unxxhd01 inputs]$ ps -eo rss,args|grep cf-monitord 105152 /var/cfengine/bin/cf-monitor

RE: cfrun runs without errors... but doesn't "do" anything

2010-03-26 Thread NWatson
Client server authentication is probably the hardest task in Cfengine. The first thing to remember about using cfrun is that the authentication is the opposite of what you've done before. Previously you configured CF for the clients to authenticate with a single server. Cfrun talks to servers,

Re: Problem compiling 3.0.4 ... on HPUX 11.23 PA-Risc

2010-03-24 Thread NWatson
Is the C compiler gcc or other? If other do you have gcc and have you tried it? Not suggesting that only gcc should work just hoping to gather some useful evidence. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclu

Re: Cfengine Help: Re: Cfengine Help: methods and undeclared bundles

2010-03-24 Thread NWatson
Can the bundle be found by searching promises.cf or the imported files? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are n

Re: Cfengine Help: methods and undeclared bundles

2010-03-24 Thread NWatson
methods: myclass:: "any" usebundle => mybundle("${myvar}"); Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential informatio

Re: Duplicate selection of value for variable "start_cmd" in scope start_service

2010-03-24 Thread NWatson
What you are doing should work. We'd need to see you methods to understand the error. AFAIK the left side of the usebundle line currently has no purpose so it can be anything. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is f

volume promises and setting a class

2010-03-23 Thread NWatson
Is it possible to set a class if storage volume is our of spec? body common control { bundlesequence => { "nfs" }; inputs => { "cfengine_stdlib.cf" }; } bundle agent nfs { storage: "/" volume => min_free_space("400m"); # how to set a class here in order to initiat

Re: cfengine 3 omnibus

2010-03-23 Thread NWatson
Welcome back to the fold. A lot of questions. For reading a pid file look at the function 'readfile'. I've been experimenting with tcpread and open ports. This is untested but please try it out and let me know if it works. If you have to modify it please repost your work. ##

Re: Non verifiable packages promises with APT

2010-03-23 Thread NWatson
There is an apt package method in the standard library. Did you try using that one? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information.

Re: Cfengine Help (Mailing list): matching glassfish processes

2010-03-23 Thread NWatson
Ah Java, thou art so succinct :). Does this service provide a PID file that you could use instead of a regex? For the regex sometimes the greediness can confuse things. Try using .*? for the first wild card. Another guess is that the Java line is simply two long. Cf probably truncates it a

Re: Cfengine Help (Mailing list): Re: How to remove clients from cfengine 3 reports?

2010-03-19 Thread NWatson
Justin, Does the Nova server really attempt to contact the remote client or is it another case of an agent on the server contacting a cf-serverd process on the client? If so perhaps reducing the agent timeout would help you. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING Thi

forum subject headers

2010-03-19 Thread NWatson
The idea of integrating the mailing list with the new forum is very inovative. However, having the forum software append all subject lines (e.g Cfengine Help (Mailing list):) makes the mailing list more difficult to read. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This c

Re: class visibility

2010-03-19 Thread NWatson
What about calling the second bundle via a method if the class is defined? Is this something remote classes might be able to do? Another option would be to touch file in bundle a and have bundle b read the file and define a class if appropriate. Sincerely, -- Neil Watson 416-673-3465 CONFID

Re: synchronize a folder

2010-03-19 Thread NWatson
Define sync. Does the server hold the master copy? If so then this is a simply recursive copy promise. Plenty of examples on this list and cfengine.org. Give one a try and post back here if you have problems. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communicati

Re: How to deploy new conf(update.conf)

2010-03-19 Thread NWatson
Assuming the policy files are fully tested I stop cf-serverd and then copy the new files into postion. This usually takes but a few moments. If your window between client check-ins is large enough you can forgo stopping cf-serverd. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARN

RE: Retrieving certain files from a directory

2010-03-18 Thread NWatson
help-cfengine-boun...@cfengine.org wrote on 2010-03-18 14:09:04: > I'm actually confused about depth_search. Here's what the documentation > says: > > "When searching recursively from a directory, the parent directory is > not part of the search. It is only the anchor point. To alter the > parent

Re: Deleting local accounts

2010-03-17 Thread NWatson
I agree with Matt. It is worthy goal but probably much bigger than you realize. > be a great candidate for the COPBL or at least a Cfengine cookbook like > Neil's. Hmm, I sense an O'reilly book here... :) I can neither confirm nor deny this ;) Sincerely, -- Neil Watson 416-673-3465 CONFIDENT

Re: process miscounting?

2010-03-17 Thread NWatson
It would be ideal if we could have a policy that would count processes that match and report that number rather than reporting whether or not the count is within a range. We could compare that number with a command policy that would script something like ps -ef|grep cf-execd$ |grep -v grep|wc

Re: process miscounting?

2010-03-17 Thread NWatson
It's an enigmatic bug to be sure. What about a policy that reports process counts? One commands action to report counts by calling ps and the other using a native process counting promise. After gathering some data we'll at least get an idea of the frequency of the problem. Sincerely, -- Nei

Re: canonify promise_repaired

2010-03-16 Thread NWatson
I'm half into a test case. If you like I'll complete tomorrow and post here. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you

RE: canonify promise_repaired

2010-03-16 Thread NWatson
I wonder if the following is related. I'm seeing this message: R: WARNING: ^\s*dictionlist\s*=\s*/usr/share/dict/words\s* not found in /etc/security/ user !! Class identifier contains illegal characters Promise (version not specified) belongs to bundle 'grepfile' in file '/var/cfengine/in puts

RE: auto define command promises to be executable but isn't

2010-03-16 Thread NWatson
I see the same results. [r...@unxxhd01 inputs]# cf-agent -If ./foo.cf -> Executing '/bin/ls -l /home/nwatson/bin/foo.sh' ...(timeout=-678,owner=-1,group=-1) Q: ".../bin/ls -l /hom": -rwxr--r-- 1 nwatson essi 34 Mar 16 15:29 /home/nwatson/bin/foo.sh I: Last 1 QUOTEed

RE: auto define command promises to be executable but isn't

2010-03-16 Thread NWatson
What happens if you keep the mode at 544 and change the owner from bin to root? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If y

Re: auto define command promises to be executable but isn't

2010-03-16 Thread NWatson
inetd is set to mode 544 owner bin:bin. Is the agent running as a user that has enough rights? Have you tested with other seemingly executable files? I run a few commands on my lab host and I haven't see this error. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This commun

Re: using showstate

2010-03-16 Thread NWatson
cf-monitord has been running off and on for months. It was definitely running when I demonstrated that test. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or

using showstate

2010-03-16 Thread NWatson
In community 3.0.4 should the following showstate variables be available? body common control { bundlesequence => { "monitor" }; } ## bundle agent monitor { reports: unxxhd01:: "Show state:", showstate => { "diskfree",

Re: Unable to lookup hostname message

2010-03-16 Thread NWatson
Mark Burgess wrote on 2010-03-15 17:07:58: > Unlikely to be anything to do with Cfengine. It's a name service failure. I'm not so sure that this point. It just started when I began using 3.0.4 and I've not seen any other DNS failures. No further evidence at this point so I ask that others

Re: Cfengine Nova 1.1 released

2010-03-16 Thread NWatson
By 'native' support do you mean Windows compatible binaries or does Nova still run through Cygwin? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidentia

Re: Hostname lookups failing

2010-03-16 Thread NWatson
help-cfengine-boun...@cfengine.org wrote on 2010-03-16 05:26:44: > cf3 Unable to lookup hostname (${phost}) or cfengine service: > Temporary failure in name resolution The variable is not being evalutated so I would start there. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING

Re: canonify promise_repaired

2010-03-15 Thread NWatson
Does -I or -v show anything interesting? What version are you running? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are n

Unable to lookup hostname message

2010-03-15 Thread NWatson
Has anyone seen this message from cf-agent? I'm seeing it randomly on Community 3.0.4 hosts. Unable to lookup hostname (true) or cfengine service: Name or service not known Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for th

Re: process miscounting?

2010-03-15 Thread NWatson
Probably not related but it is worth noting that when cf-exec -F is run it overwrites cf-exec.pid so that the pid file no longer matched the cf-execd running the background. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for th

upgrading cf binaries

2010-03-15 Thread NWatson
I seem to have a race problem I can't work my head around. Suppose I have multiple files promises to keep cf client files up to date: "/var/cfengine/bin/" copy_from classes => ucdefine( "cf_upgraded", "cffiles_failed" ); "/var/cfengin

Re: registryvalue

2010-03-15 Thread NWatson
help-cfengine-boun...@cfengine.org wrote on 2010-03-15 10:32:46: > No, Windows features are Nova (or above) only. OK. To me it is a bit unclear as to what features are Nova only. CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and

registryvalue

2010-03-15 Thread NWatson
Greetings, Does the registryvalue function work in Community? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the in

Re: Redefinition of a constant variable

2010-03-12 Thread NWatson
Overridable helps provided that this is set for all instances of the variable. Example: 5 bundle agent report_services{ 6 7 vars: 8 9 redhat:: 10 # List this variable first as the default. 11 "services" slist => { 12

Redefinition of a constant variable

2010-03-12 Thread NWatson
This is a new error message in 3.0.4 cf-promises -f ./promises.cf !! Redefinition of a constant variable "services" Promise (version not specified) belongs to bundle 'report_services' in file './services.cf' near line 38 !! Redefinition of a constant variable "services" Promise (version not sp

Re: variable name for a usebundle statement: bad?

2010-03-12 Thread NWatson
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 bundle_name defined? From the example it looks like an empty variable. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNIN

Re: process miscounting?

2010-03-11 Thread NWatson
Given Matt's input I'm inclined to think that the issue in how cf-agent gets the process list or how is matches them. I spent the morning try to reproduce this in a controlled manner but failed. I'm out of ideas at the moment and lack the C skill to do any serious code diving. Matt what types

Re: process miscounting?

2010-03-11 Thread NWatson
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 provide your cron entry. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING

process miscounting?

2010-03-10 Thread NWatson
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:07 ? 0:00 /var/cfengine/bin/cf-serverd root 27244 23420 0 14:49:08 pts/2 0:00 grep cf- root 26631 1 0 14:45:35 ?

RE: Evaluating a promise occasionally

2010-03-10 Thread NWatson
Splayclass? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended recipient, any use, copying, disclosure, dis

RE: Evaluating a promise occasionally

2010-03-10 Thread NWatson
Isn't splaytime going to prevent any chance of network clogs? If each agent is started with the executor it will delay using splaytime. Thus the db host will not get all connections at once. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any at

Re: Possible Causes of " Validation: Error reading assumed integer value" type Errors

2010-03-10 Thread NWatson
This error is usually related to variable problem. For example a variable is referenced but has been given no value. Usually this is because the variable is a typo. I had to find these errors by removing all bundles and adding them one by one until the error returned. Sincerely, -- Neil Wats

Re: Evaluating a promise occasionally

2010-03-10 Thread NWatson
I found that difficult to understand. Perhaps you can simplify it? Assuming I've understood some of it then a module might be good way to go. Have the module script run at interval, 12 hours, and return a class based on results. Another option is to use Cfengine's file server ability to have

Re: How to run Cfengine 3 with Cfengine 2 policies? I get syntax errors.

2010-03-08 Thread NWatson
I think I see where Aleksey is going. Does cf-execd execute cf-agent and does cf-agent interpret cf2 syntax? Is this native or does it require an installed version of cf2 that cf-agent will use to parse and execute promises? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING T

Re: cfengine 3.0.4 first compile testing

2010-03-08 Thread NWatson
setting LD_LIBRARY_PATH worked. Thanks for the help. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended re

Re: cfengine 3.0.4 first compile testing

2010-03-08 Thread NWatson
Yeah, it's a copy and paste typo. configure:17173: checking for BerkeleyDB location in /home/nwatson/cfengine configure:17343: result: /home/nwatson/cfengine configure:17401: checking Berkeley DB API configure:17442: gcc -o conftest -pthread -g -O2 -I/home/nwatson/cfengine/include -pthread

Re: cfengine 3.0.4 first compile testing

2010-03-08 Thread NWatson
New information. When checking config.log I see: configure:17173: checking for BerkeleyDB location in /home/nwatson/cfengine configure:17343: result: /home/nwatson/cfengine configure:17401: checking Berkeley DB API configure:17442: gcc -o conftest -pthread -g -O2 -I/home/nwatson/cfengine

Re: cfengine 3.0.4 first compile testing

2010-03-08 Thread NWatson
No change. The error persists :( Any other suggestions? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intende

Re: Thoughts about copy_from

2010-03-05 Thread NWatson
Jesse, Perhaps you should take a fresh approach. Restate your original goal that started all your template efforts. Perhaps someone else has another way to do it. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclus

cfengine 3.0.4 first compile testing

2010-03-05 Thread NWatson
I can compile fine with no options but as soon as I get clever I break something: ./configure --prefix=/home/nwatson/cfengine --with-pcre=/home/nwatson/cfengine --with-berkeleydb=/home/nwatson/cfengine --without-sql --sbindir=/home/nwatson/cfengine/bin Configure looked good: checking for

Re: Thoughts about copy_from

2010-03-05 Thread NWatson
help-cfengine-boun...@cfengine.org wrote on 2010-03-05 14:37:57: > I'd like to add one more suggestion as well: > > * Include the ability to call expand_scalars in the same promise as > copying a file from a remote host. Currently, this has to be done via > two separate promises: one to

RE: Version control best practices?

2010-03-05 Thread NWatson
I prefer to have the whole lot in version control. This makes it your go to place for disaster recovery or migration. Sometime you may want to use multiple repositories. /var/cfmasterfiles/config (general cfengine files) /var/cfmasterfiles/dns (hostmaster Bind files) /var/cfmasterfiles/app (a

Re: Basic string replacement

2010-03-05 Thread NWatson
CF does what it does and does it well whether it is programming language or not. It is definitely not like a scripting language and because of this I often find I have to alter my approach to promises. My mind tries to rely on its experience with shell and perl scripts but those methods don't

Re: Version control best practices?

2010-03-04 Thread NWatson
I use Subversion and try to use the traditional approach of branches. /trunk - production /branches/dev - development /branches/preprod - staging for production roll out /branches/neil - a custom branch for experimentation. The best thing to do is to treat your policy development formally just as

editing old school cron tables

2010-03-04 Thread NWatson
Having been spoiled by Vixie Cron I was not aware until yesterday that older cron daemons, found in Solaris and AIX, do not automatically reread cron tables at regular intervals. Thus if you edit crontables using CF's edit files method older cron daemons will not pick-up the changes. What to

Re: challenge: last Saturday of the month

2010-03-03 Thread NWatson
Excellent work, both of you. This type of calendar work combined with remote classes can really drive home the idea of using Cf3 as an enterprise scheduler. We can further expand this idea to do things such as define business holidays when jobs, such as ETL or other financial batches, should n

Re: How to ensure cf-agent run as expected

2010-03-03 Thread NWatson
Use edit files to add a cf-execd cron entry. There are examples on this list and in online documentation. The runagent control section and the server access_rules control how the runagent will work. Performance depends one what the agent is doing. Some promises are cheap others are expensive.

challenge: last Saturday of the month

2010-03-03 Thread NWatson
Over at Ars there was a discussion about scheduling a cron job for the last Saturday of each month. Alas, cron cannot do this on its own. What followed as a lot of short scripts to help but very few were portable. One of the newer goals of Cfengine is to be an enterprise scheduler. For fun a

Re: Who deletes all files in /var/cfengine/inputs?

2010-03-03 Thread NWatson
I use purge and I've not see any unexpected deletes at this time. I've had 3.0.2 running for several months on multiple servers. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain

Re: Multiple cf-execd processes

2010-03-02 Thread NWatson
How are you spawning multiple cf-execd's? In the thread you quoted I wanted to make sure that cf-execd was running but that cf-execd -F was not counted when considering that promise. Thus the negative look ahead regex. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This com

Re: Basic string replacement

2010-03-02 Thread NWatson
canonify will change /path/to/file to path_to_file. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended reci

Re: Basic string replacement

2010-03-02 Thread NWatson
I don't think there is a function at present for string search a replace actions out side of file editing. Perhaps look at it from a higher level. Why is string manipulation needed? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments,

Re: is Cfengine working for heterogeneous cluster

2010-03-02 Thread NWatson
I think that Cfengine can probably help you. Take a look at the tutorial to get an idea how it works. Try some examples and post your questions here. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of ad

RE: Editing known_hosts files

2010-03-01 Thread NWatson
Some ssh_config settings might be less stressful: StrictHostKeyChecking, VerifyHostKeyDNS. Also see "VERIFYING HOST KEYS" in man ssh. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may c

RE: Editing known_hosts files

2010-03-01 Thread NWatson
I'm still not sure why you might want to do this. Ssh already gives out public keys upon request. Why distribute them using CF? Are you looking to control incidents when the public key changes? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any

Re: AW: AW: Remote Access

2010-03-01 Thread NWatson
I don't see cfruncommand. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended recipient, any use, copying, d

Re: AW: Remote Access

2010-03-01 Thread NWatson
"cf3 User root is not allowed on this server" Does the server have 'allowusers' defined? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential informat

Re: Remote Access

2010-03-01 Thread NWatson
Is there a cf-serverd process running on 172.24.1.58? Does that process grant access to the remote host where cf-runagent is initiated? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may

showstate and missing information

2010-02-24 Thread NWatson
How does the agent go about find state information? How can one help it find such information? This example using cf 3.0.2 [r...@unxxhd01 inputs]# cf-agent -KIf ./state.cf R: Show state: R: State parameter diskfree is not known or recorded R: State parameter loadavg is not known or recorded R:

Re: Directory is controlled by another user - trusting its content ispotentially risky (possible race)

2010-02-24 Thread NWatson
help-cfengine-boun...@cfengine.org wrote on 2010-02-24 11:00:34: > > It means you are doing a recursive search that changes something, as root. > If you pass through a directory controlled by a non-root user, that user > could potentially redirect your changes to another location by > linking,

RE: Directory is controlled by another user - trusting its content ispotentially risky (possible race)

2010-02-24 Thread NWatson
what does ls -al /var/opt show? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended recipient, any use, copy

lastseen confusion

2010-02-24 Thread NWatson
I've configured the reported to include last_seen. body reporter control { reports => { "audit", "performance", "all_locks", "active_locks", "hashes", "classes", "last_seen", "monitor_now", "monitor_history", "monitor_summary"

Re: Defining Classes

2010-02-24 Thread NWatson
> > bundle common g > { classes: # missing > "Live" or => { "server1", "server2"} ; > "Acceptance" or => { "server3", "server4"} ; > "TestAndDev" or => { "ugos563" } ; > "AllServers" or => Live.Acceptance.TestAndDev; # last is not or but expressi

Re: case sensitivity in cf3 regexes

2010-02-23 Thread NWatson
For posterity there is a way to do this. I was referred to the pcrepattern man page in a separate thread.Here is a working example. [nwat...@unxxhd01 inputs]$ cat bar.cf ## body common control { bundlesequence => { "test" }; } bundle agent test { classes:

more wish list observations

2010-02-23 Thread NWatson
These are more observations I've made over the past little while. Not criticism just things I would think of doing were I king for the day. Classes and case. I'm very lazy. I'd prefer if Hr13 and hr13 were the same. The really annoying hard classes are the likes of SuSE, which I can never rem

Re: Multiple edit lines in the same Promise

2010-02-23 Thread NWatson
I view one edit line as one promise. Having multiple edit lines muddies the promise water. You could try placing your lines in a list and have a single promise process the list. Complex example: http://www.cfengine.org/manuals/cf3-solutions.html#Postfix-mail-configuration Sincerely, -- Neil Wa

Re: Fwd: [lopsa-discuss] Configuration Management

2010-02-23 Thread NWatson
Alas, I only have access to SVN from home, in the evenings. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the inten

Re: Fwd: [lopsa-discuss] Configuration Management

2010-02-23 Thread NWatson
What version did cf-runagent begin to take the --hail option? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the int

Re: building cf 3.0.3 on rhel 5 32 bit

2010-02-23 Thread NWatson
Will this fix make to 3.0.4 due out soon? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended recipient, any

building cf 3.0.3 on rhel 5 32 bit

2010-02-23 Thread NWatson
Greetings, Yesterday I had troubles building cf3.0.2 on rhel 5 32 bit. Cf-promises -x segfaulted. Today I tried again on another host, same architecture. The result was the same. Now I've tried the same thing but with version 3.0.3. Still the problem persists. I used a straight configure w

privilege separation

2010-02-22 Thread NWatson
Speaking of roles someone asked the other day about having lesser privileged users running Cfengine along side normal administrators. For example a typical set of promises might involve services like SSH or NFS. Suppose that an application team exists and would like to use Cfengine along side

Re: Fwd: [lopsa-discuss] Configuration Management

2010-02-22 Thread NWatson
Hi Aleksey, If I understand correctly the question is how can the agent run in dry-run only mode unless specifically told otherwise. I think you could do this using classes in the control bodies. For example. body executor control { splaytime => "3"; # CHANGEME for development sched

bundlesequence classes and precidence

2010-02-22 Thread NWatson
Greetings, Consider this bundle and its output. ## body common control { any:: bundlesequence => { "one" }; Hr10|Hr11:: bundlesequence => { "two" }; } bundle agent one { reports: linux:: "Bundle from 'any'"; } bundle agent tw

segfault in cf 3.0.2

2010-02-22 Thread NWatson
I realize this version is a bit dated but I'm stuck with it until an upgrade window is ready. Having built this I'm getting a segfault running cf-promises -x. GDB below. What might the cause be? Starting program: /tmp/cfengine-3.0.2/src/cf-promises -x warning: .dynamic section for "/lib/libpc

Re: Good organizational practices

2010-02-18 Thread NWatson
globals.cf promises.cf (contains agent configs) classes.cf (setting global classes). cf-serverd.cf (also contains runagent) cf-execd.cf update.cf failsafe.cf library.cf (custom resusable bundles and bodies) Then I break things down based on what the policy does for example. hardening.cf for misc h

Re: regcmp help

2010-02-17 Thread NWatson
Mark Burgess wrote on 2010-02-17 15:37:36: > > .* only matches up to the newline, so you'll have to say > > .*REGEX.*\n.* That works. It's a bit painful compared with m// so I still wish for that :) Still thanks for the clarification and your patience with my stubbornness. Sincerely, --

Re: regcmp help

2010-02-17 Thread NWatson
.*OpenSSH.* still does not match "SSH-OpenSSH-4.3 newline"; I don't control the newline but I have to account for it somehow in my 'match'. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addres

Re: regcmp help

2010-02-17 Thread NWatson
Mark Burgess wrote on 2010-02-17 15:25:23: > You misunderstand what is being matched against. That's documented. > It doesn't say that is > *searches* the string. It says it matches the string. You confused > // notation which is a > search not a comparison. Ack you are right. I assumed and

Re: regcmp help

2010-02-17 Thread NWatson
Mark Burgess wrote on 2010-02-17 15:09:29: > There wouldn't be a line break in your line. This is standard regex > stuff. Regexs don't go > through line breaks. The desired atom is before the line break. This I expect to match as it does with pcregrep, sed, grep and perl. [nwat...@unxxhd01

Re: regcmp help

2010-02-17 Thread NWatson
Mark Burgess wrote on 2010-02-17 15:01:05: > > If there is a line break, use \n in the expression Assuming I know that there is a line break. Typically one wants to match a known string, described as regular expression, in an unknown or unpredictable string. In this example the desire is to

RE: regcmp help

2010-02-17 Thread NWatson
This "reg" string => "OpenSSH"; "str" string => "SSH-OpenSSH-4.3 newline"; # Continued from previous line classes: "port" expression => regcmp(".*${reg}.*","${str}"); Should match. In my previous post the example die not match. I suspect this is because of the new

RE: regcmp help

2010-02-17 Thread NWatson
You are right the regex expects to look at the whole line. That is not as I would expect from a regular expression. I think this leads to a problem. Consider this new example where the string continues to another line. ## body common control { bundlesequence => { "tes

regcmp help

2010-02-17 Thread NWatson
A regcmp I would expect to match does not. What have I done wrong? [nwat...@unxxhd01 inputs]$ cat regcmp.cf ## body common control { bundlesequence => { "test" }; } bundle common agent { classes: "all" expression => "any"; } bundle agent test { classe

RE: referencing a slist within a slist array?

2010-02-17 Thread NWatson
There is probably another way to do it if you step back and take a look. Another option would be to try the lastest SVN to see if it's fixed and will be ready for 3.0.4 due at the end of the month. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including an

Re: referencing a slist within a slist array?

2010-02-17 Thread NWatson
Seems to work the same on Community 3.0.2 and 3.0.3. [r...@unxxhd01 inputs]# /home/nwatson/src/cfengine-3.0.3/src/cf-agent -f ./test.cf R: Server = g1 Client_list = p1 R: Server = g1 Client_list = p2 R: Server = g1 Client_list = p3 List parameter not found while constructing "do_gather&q

RE: referencing a slist within a slist array?

2010-02-17 Thread NWatson
Perhaps fully qualify info_gathers also. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended recipient, any

  1   2   3   >