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
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
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
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,
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
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
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
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
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
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.
##
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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",
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 ?
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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,
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
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
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
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
"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
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
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:
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,
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
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"
>
> 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
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:
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
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
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
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
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
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
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
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
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
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
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
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,
--
.*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
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
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
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
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
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
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
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
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
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 - 100 of 238 matches
Mail list logo