[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Class definitions - is "_" (underscore) an operator?
From: |
Martin, Jason H |
Subject: |
RE: Class definitions - is "_" (underscore) an operator? |
Date: |
Wed, 30 Nov 2005 08:28:08 -0800 |
Keep in mind that a multi-homed could have interfaces on both of those
networks, causing both classes to be true. It might be interesting to
inspect the output of cfagent -pv to see what IP addresses CFE thinks
are present.
Also, you should be careful on conditional imports -- I've found that
generally only 'hard' classes can be used to drive imports as soft
classes aren't yet defined at parse time.
-Jason Martin
> -----Original Message-----
> From:
> help-cfengine-bounces+jason.h.martin=cingular.com@gnu.org
> [mailto:help-cfengine-bounces+jason.h.martin=cingular.com@gnu.
> org] On Behalf Of Jon-Finngard Moe
> Sent: Wednesday, November 30, 2005 5:16 AM
> To: help-cfengine@gnu.org
> Subject: Re: Class definitions - is "_" (underscore) an operator?
>
>
> Ed Brown wrote:
> > The docs say about the 'IPRange(...) function:
> > True if the current host lies within the specified IP range
> >
> > So 'customer' and 'customer_location' (a valid classname)
> are true if
> > any ip addresses on the current host are in range.
> >
> > Without seeing the ipaddresses on the host in question, and
> the range
> > expressions, it would be hard to say why both classes are being
> > defined.
> >
> > -Ed
>
> Thanks. If I understand you correctly you say that the
> addresses overlap in some
> way, the both classes will be active for the current range.
>
> That is not the case. (As these are different /24-networks
> they could not
> overlap).
>
> *****************************************
>
> To fill in with bogus adress ranges:
>
> customer = (
> IPRange(172.24.200.0/24)
> )
>
> customer_location = (
> IPRange(172.24.212.0/24)
> )
>
>
>
> *******************************************
>
> From the file I do the imports:
>
> import:
>
> mnemonic:: cf.mnemonic #
> Config file for mnemonic
> customer:: cf.customer #
> Config file for customer
> customer_location:: cf.customer_location #
> Config file for customer
> at location
>
> .....
>
> *******************************************
>
>
>
> From cfagent output on host 172.24.212.117 (Running FreeBSD
> 5.4-STABLE and
> cfengine 2.1.17):
>
> Defined Classes = ( ... customer customer_location ... )
>
> **************************************************************
> *******^M
> Main Tree Sched: checktimezone pass 1 @ Wed Nov 30 14:01:16
> 2005^M
> **************************************************************
> *******^M
>
> ....
>
> Looking for an input file cf.sensors
> Looking for an input file cf.mss
> Looking for an input file cf.backup
> Looking for an input file cf.crontab
> Looking for an input file cf.nagioskeys
> Looking for an input file cf.rootshell
> Looking for an input file os/cf.freebsd
> Looking for an input file cf.customer
> Looking for an input file cf.customer_location
>
> ....
>
>
> *********************
>
>
> Again I find that very strange as this is the only place I
> define the mentioned
> classes.
>
> I could try to alter the classname "customer_location" to
> "customerlocation" to
> see if that fixes the problem.
>
>
> --
>
> Jon-Finngard Moe Email: finngard@mnemonic.no
> mnemonic AS, Wergelandsveien 25 Mob : +47 98 64 58 62
> N-0167 Oslo, Norway Tlf : +47 23 20 47 45
> Fax : +47 23 20 47
> 01 PGP key EEAADBBA available from pgp.mit.edu
>
>