bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

resolve bug ?


From: Zeev Fisher
Subject: resolve bug ?
Date: Sun, 15 Aug 2004 08:07:51 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

Hi,

First , for some reason resolve doesn't do it's job ( i'm sure i tested it before and it worked. something in the configuration files for some reason confuse him.. )

I've added for test some garbage on resolv.conf and all it do is putting it on the last line of the file ( it actually ignores EmptyResolvConf = ( true ) )

address@hidden /]# cat /etc/resolv.conf
domain il.marvell.com
nameserver 10.4.5.10
nameserver 10.4.5.1
lsajdklgf


cfengine debugging doesn't say anything special. ( relevant part below )

I use version 2.1.7 and it happens on both Solaris and Linux.

I can't attach my complete set of config files for security reasons but i can include the first ( and relevant ) part cf.main ( you will see somehost1,2,3 instead real name for some variables ) :

    ###
    #
    # BEGIN cf.main
    #
    ###

    control:

       access    = ( root )        # Only root should run this

       domain    = ( il.marvell.com )

       sysadm    = ( address@hidden )
       smtpserver     = ( mail.il.marvell.com )  # used by cfexecd

       ChecksumDatabase = ( /var/cfengine/cache.db )

       ChecksumUpdates = ( on )

       EmptyResolvConf  = ( true )

       repository = ( /var/spool/cfengine )

       timezone  = ( IDT IST )

       sensiblesize  = ( 1000 )
       sensiblecount = ( 2 )
       editfilesize  = ( 20000 )

       #
       # If we undefine this with cfengine -N longjob
       # then we switch off all jobs labelled with this class
       #

       addclasses = ( longjob )

       #
       # Macros & constants are inherited downwards in imports
       # but are not passed up to parent files. Good idea to
       # define them all here
       #

       masterfiles = ( /unix_srv/sysconfig/files )

actionsequence = ( checktimezone resolve directories files editfiles processes tidy disable
links mountall copy shellcommands )

       # Local MSIL variables

       PrimaryAdminHost = ( somehost1 )

       Yokneam::

               site = ( Yokneam )
               SecondaryAdminHost = ( somehost2 )

       Yokneam.Servers::

               gateway = ( 10.4.15.254 )

       Yokneam.Desktops::

               gateway = ( 10.4.23.254 )

       Lod::

               site = ( Lod )
               SecondaryAdminHost = ( somehost3 )

       Lod.Servers::

               gateway = ( 10.3.15.254 )

       Lod.Desktops::

               gateway = ( 10.3.23.254 )

       redhat_7_3::

               osver = ( 7.3 )

    ######################################################################

## there's a bug which swap the order of the resolver so on host gravity10 will be first , Z
eev 28/7 ##
       resolve:

       10.4.5.1
       10.4.5.10

    ######################################################################


Debugging info for relevant part :

(BuildClassEnvironment)
Actionsequence item resolve
GetLock(resolve,,time=1092544457), ExpireAfter=120, IfElapsed=1
GetLastLock()
CheckOldLock(lock.cfagent_conf.lnx81.resolve.)
Unable to find lock data lock.cfagent_conf.lnx81.resolve.
SetLock(lock.cfagent_conf.lnx81.resolve.)
PutLock(lock.cfagent_conf.lnx81.resolve.)
Unable to delete lock [lock.cfagent_conf.lnx81.resolve.]: DB_NOTFOUND: No matching key/data pair fou
nd
GetMacroValue(main,EmptyResolvConf)
ExpandVarstring(10.4.5.1)
ExpandVarstring(10.4.5.10)
ReleaseCurrentLock(lock.cfagent_conf.lnx81.resolve.)
PutLock(last.cfagent_conf.100.lnx81.resolve.)
LockLog(Lock removed normally )
Job start time set to Sun Aug 15 07:34:17 2004



The problem above lead to much more major problem - for some reason , if resolving doesn't work on the machine , the class which is based on IP range doesn't work and then cfengine terminate because it can't parse the variables based on such groups. The output is :

Looking for an input file /var/cfengine/inputs/cfagent.conf
Looking for an input file cf.groups
Looking for an input file cf.main
Looking for an input file cf.linux
cf:cfengine::/var/cfengine/inputs/cf.linux:123: faculty/site undefined variable cf:cfengine::/var/cfengine/inputs/cf.linux:123: faculty/site undefined variable cf:cfengine::/var/cfengine/inputs/cf.linux:127: faculty/site undefined variable cf:cfengine::/var/cfengine/inputs/cf.linux:127: faculty/site undefined variable

which means that if i do mistake in resolv.conf , i can't fix it with cfengine ...

The relevant lines from cf.linux are :

123 : $(masterfiles)/$(site)/linux/all dest=/etc m=644 o=root g=root type=checksum include=auto.*
r=1 define=modified_autofs

127: directories:

On debugging mode i indeed see that it says that the host isn't in the IP range altough it's there ( the IP of the machine is 10.4.14.81 )

LVALUE Yokneam
HandleLVALUE(Yokneam) in action Groups:
EQUALS =
LEFTBRACK
RVAL-FUNCTION IPRange(10.4.12-21.1-255)
HandleFunctionObject(IPRange(10.4.12-21.1-255))
IsBuiltinFunction(IPRange(10.4.12-21.1-255))
IsBuiltinFunction: IPRange(10.4.12-21.1-255)
ExpandVarstring(10.4.12-21.1-255)
HandleFunction: IPRange(10.4.12-21.1-255)
Check ParsingIPRange(10.4.12-21.1-255)
Unequal
ExpandVarstring(XX_CF_opposite_any_XX)
HandleGroupRVal(XX_CF_opposite_any_XX) group (Yokneam), type=0
[No match of class XX_CF_opposite_any_XX]

If i fix resolv.conf and resolving works , the problem vanish and the debug looks like this :

LVALUE Yokneam
HandleLVALUE(Yokneam) in action Groups:
EQUALS =
LEFTBRACK
RVAL-FUNCTION IPRange(10.4.12-21.1-255)
HandleFunctionObject(IPRange(10.4.12-21.1-255))
IsBuiltinFunction(IPRange(10.4.12-21.1-255))
IsBuiltinFunction: IPRange(10.4.12-21.1-255)
ExpandVarstring(10.4.12-21.1-255)
HandleFunction: IPRange(10.4.12-21.1-255)
Check ParsingIPRange(10.4.12-21.1-255)
Matched octet 10 with 10
Matched octet 4 with 4
Matched octet 12-21 with 14
Matched octet 1-255 with 81
Matched IP range
ExpandVarstring(any)
HandleGroupRVal(any) group (Yokneam), type=0
AddClassToHeap(Yokneam)
RIGHTBRACK


Anyone has an idea ?


Thanks !


--
Zeev Fisher - Unix System Administrator
Marvell Semiconductor Israel Ltd
6 Hamada Street Mordot HaCarmel Industrial Park
Yokneam 20692 , ISRAEL
Email    -  address@hidden
Tel      -  + 972 4 9091402
Cell     -  + 972 54 995402
Fax      -  + 972 4 9091501
WWW Page:     http://www.marvell.com

------------------------------------------------------------------------
This message may contain confidential, proprietary or legally privileged
information. The information is intended only for the use of the individual
or entity named above. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination, distribution
or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify us
immediately by telephone, or by e-mail and delete the message from your
computer.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]