Hi all,

I'm having a big problem with making the define classes to work.

I'm using many import files to narrow down mistakes impact on machines.
I'm importing the shellcommands and the processes from the parent file,
but when a machine needs to use a shell command or a process, there're
many processes/shellcommands that aren't working.

Below are the configuration files: 

An example for the behavior:

A machine with the name of lnx5008 is a member of groups: Hwdesign,
64bit and Nonclearcase when I'm adding some new mounts under fstab
(cf.linux.ptk.64bit.hwdesign.nonclearcase) the defined class
(define=modified_fstab) that suppose to run "mount -a" isn't working.
The same goes to adding something under xinetd and the define class
(define=modified_xinetd) isn't running anything. On the other hand,
changing something to "/etc/crontab" will active the class
(define=modified_cron) and will run reload for the process. The same
goes to autofs shellcommand which gets activated when changing
/etc/auto.master.

 

I've tried take the shellcommands and the processes and put them
directly under  cf.linux/cf.linux.ptk/cf.linux.ptk.hwdesign  files
(without import) and the same result.

I've also tried changing the actionsequence order without luck.

 

Please advice.

 

kfir

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

Cfagent.conf

     import:

 

        #

        # Split things up to keep things tidy

        #

 

        any::            cf.groups

                           cf.main

        linux::          cf.linux

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

 Cf.groups

     .

     .

Hwdesign =              ( HostRange(lnx,400-410) HostRange(lnx,500-510)
HostRange(lnx,600-610) HostRange(lnx,5001-5200) )

Hwdesign_Clearcase =  ( lnx5100 )

Hwdesign_Nonclearcase =  ( Hwdesign -Hwdesign_Clearcase )

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

 Cf.main

     .

     .

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

    .

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

 Cf.linux

    .

    .

    .

    import:

 

PetachTikva::   cf.linux.ptk

Yokneam::       cf.linux.yok

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

 Cf.linux.ptk

     .

     .

     .

     import:

32_bit::        cf.linux.ptk.32bit

64_bit::        cf.linux.ptk.64bit

Hwdesign::      cf.linux.ptk.hwdesign

Vnc::           cf.linux.ptk.vnc

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

 Cf.linux.ptk.hwdesign

     .

     copy::

     .

$(masterfiles)/$(site)/hwdesign.auto.master dest=/etc/auto.master m=644
o=root g=root type=checksum define=modified_autofs

$(masterfiles)/$(site)/hwdesign.crontab dest=/etc/crontab m=644 o=root
g=root type=checksum define=modified_cron

$(masterfiles)/$(site)/hwdesign.csdd dest=/etc/xinetd.d/csdd m=644
o=root g=root type=checksum define=modified_xinetd

     .

     import:

Hwdesign::      cf.linux.ptk.hwdesign.processes

Hwdesign::      cf.linux.ptk.hwdesign.shellcommands

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

 Cf.linux.ptk.hwdesign.processes

     .

     .

     .

        modified_xinetd::

 

            "xinetd" signal=term

           restart "/etc/init.d/xinetd start"

 

        modified_cron::

 

            "crond" signal=term

            restart "/etc/init.d/crond start"

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

 Cf.linux.ptk.hwdesign.shellcommands

     .

     .

        modified_autofs::

 

        "/etc/init.d/autofs reload"

            useshell=false

 

        modified_fstab::

 

        "/bin/mount -a"

            useshell=false

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

 

Cf.linux.ptk.64bit

     .

     .

     .

     import:

import:

Hwdesign::      cf.linux.ptk.64bit.hwdesign

Vnc::           cf.linux.ptk.64bit.vnc

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

 Cf.linux.ptk.64bit.hwdesign

     .

     .

     .

    import:

    import:

Hwdesign_Clearcase::    cf.linux.ptk.64bit.hwdesign.clearcase

Hwdesign_Nonclearcase:: cf.linux.ptk.64bit.hwdesign.nonclearcase

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

Cf.linux.ptk.64bit.hwdesign.nonclearcase

     .

     .

     .

     editfiles::

{ /etc/fstab

        DeleteLinesNotMatching
".*ext3.*|.*devpts.*|.*proc.*|.*tmpfs.*|.*swap.*|.*iso9660.*|.*sysfs.*|.
*pamconsole.*"

        GotoLastLine

        InsertLine "filerrmx:/vol/v_f106_vol4/usr/RHEL4_64bit
/usr/local         nfs
ro,wsize=32768,rsize=32768,hard,intr,actimeo=600,nocto,defaults"

        InsertLine "filerrmx:/vol/v_f109_sgeptk/tools
/opt/tools         nfs
rw,wsize=32768,rsize=32768,hard,intr,defaults"

        DefineClasses "modified_fstab"

        }

 

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

_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to