[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bugs in HostRange() function?
From: |
Christian Korschan |
Subject: |
Re: bugs in HostRange() function? |
Date: |
Tue, 17 Jan 2006 14:14:36 +0100 |
User-agent: |
tin/1.6.2-20030910 ("Pabbay") (UNIX) (Linux/2.6.9-22.0.1.ELsmp (x86_64)) |
address@hidden wrote:
>
> > Hi,
> >
> > I'm testing IPRange and HostRange functions, but seems the first one
> > works great even for dual-homed machines, but the latter still seems
> > failed. My cfengine version is 2.1.17.
> >
> > Cfagent reports syntax error for HostRange() function, but from the
> > reference manual I can't see any mismatch in my config.=20
> >
> > My configure is:
> >
> > ...
> > HelloIPHosts =3D ( IPRange( 10.100.7.210-220 ) )
> > HelloAliasIPHosts =3D ( IPRange( 192.168.240.210-220 ) )
> > HelloHostMachines =3D ( HostRange(hello,1-10) )
> > ...
> >
> > The output is:
> >
> > ...
> > Looking for environment from cfenvd...
> > Loading environment...
> > Environment data loaded
> >
> > Looking for an input file
> > /var/lib/cfengine2/inputs/cfagent.conf
> > Looking for an input file cf.groups
> > cf:cfengine::/var/lib/cfengine2/inputs/cf.groups:43:
> > Function or format of input file requires 1 argument items=20
> > cf:cfengine::/var/lib/cfengine2/inputs/cf.groups:43:
> > HostRange() syntax error: not enough args (expecting two)=20
> > Looking for an input file cf.main
> > ...
> >
> > Any suggestions? Thanks.
>
> put this in a script called cftestHostRange...
>
> #!/usr/sbin/cfagent -d2 --no-splay --inform --no-lock --file
> control:
> actionsequence = ( shellcommands )
> groups: hello_node = ( HostRange(hello,1-10) )
> shellcommands: hello_node:: "/bin/echo hello_node IS defined"
> shellcommands: !hello_node:: "/bin/echo hello_node is NOT defined"
>
> and then do...
>
> ./cftestHostRange | grep SRDEBUG
>
> if it fails, then send me the output.
>
> if it succeeds, run cfagent with "-d2" and grep on SRDEBUG...
> something like...
>
> cfagent -Iq -d2 | grep SRDEBUG
>
> and compare the results. maybe that'll point you in the right
> direction.
>
> steve
> - - -
> systems & network manager
> high energy physics
> university of wisconsin
>
Hi,
I have a similar problem in Cfengine-2.1.18:
in cfagent.conf I have:
groups:
adminhosts = ( HostRange(sa,01-09) HostRange(isw-0,01-99)
HostRange(ilw-0,01-99) )
and cfagent -d -v -q -n bails out with:
##########################################################################
# BEGIN PARSING /opt/openpkg/var/cfengine/inputs/cfagent.conf
##########################################################################
HandleFunctionObject(HostRange(sa,01-09))
IsBuiltinFunction(HostRange(sa,01-09))
IsBuiltinFunction: HostRange(sa,01-09)
HandleFunction: HostRange(sa,01-09)
FunctionStringToCode(HostRange)
ListArg[0]=(sa,01-09)
ListArg[1]=(a,01-09)
Appending [sa]
ListArg[0]=(01-09)
ListArg[1]=(1-09)
ListArg[2]=(-09)
ListArg[3]=(09)
ListArg[4]=(9)
Appending [01-09]
cf:cfengine::/opt/openpkg/var/cfengine/inputs/cfagent.conf:99: Function or
format of input file requires 1 argument items
SRDEBUG in HandleHostRange()
SRDEBUG args= value=a <----
SRDEBUG in FuzzyHostParse(): <----
SplitStringAsItemList(,,)
Segmentation fault
--
Christian Korschan