help-cfengine
[Top][All Lists]
Advanced

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

SUMMARY: cfagent.conf


From: Wolfgang Schwurack
Subject: SUMMARY: cfagent.conf
Date: Wed, 14 May 2003 08:48:04 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0

What I figure out is when I used a group named "server" the shell command name "newinstall" would not enable. Once I changed the named "server" to something else (uen) then the newinstall shell command would execute. example below of cfagent.conf

groups:
      
    uen = ( test ) # with this my newinstall shellcommands execute
    server = ( test ) # with this my newinstall shellcommands would NOT execute

    newinstall = ( FileExists(/var/cfengine/newinstall) )

control:
   access   = ( root )
   site     = ( uen )
   domain   = ( uen.org )

   actionsequence =
        (
          shellcommands
        )
      
shellcommands:

    newinstall::
       "/usr/bin/rsync -e '/usr/bin/ssh -x' -caz --delete distinc9@woody.uen.org:../../local /opt"

Wolfgang Schwurack wrote:
as you can see the file is in /var/cfengine. I ran the command with d1, below is the last part of the out put. It show "no match (newinstall)"

bash-2.05# ls
bin                   inputs                ppkeys
cfagent.test.log      install.txt           randseed
cfengine.test.runlog  lib
cfengine_lock_db      newinstall
bash-2.05# pwd
/var/cfengine

============BEGIN NEW ACTION User Shell Commands:=============

InitializeAction()

Resetting CLASS to ANY


NEW CLASS PREDICATE:: newinstall::
   (No actions pending in User Shell Commands:)
InitializeAction()
   (No actions pending in User Shell Commands:)
Simple class = (newinstall)
QSTRING "(/usr/bin/rsync -e '/usr/bin/ssh -x' -caz --delete distinc9@woody.uen.org:../../local /opt)"
HandleQuotedString (/usr/bin/rsync -e '/usr/bin/ssh -x' -caz --delete distinc9@woody.uen.org:../../local /opt)
   (No actions pending in User Shell Commands:)

   [BEGIN InstallPending User Shell Commands:
Installing item ((/usr/bin/rsync -e '/usr/bin/ssh -x' -caz --delete distinc9@woody.uen.org:../../local /opt)) in the script list
Not installing (/usr/bin/rsync -e '/usr/bin/ssh -x' -caz --delete distinc9@woody.uen.org:../../local /opt), no match (newinstall)
InitializeAction()
   END InstallPending]

Delete Parser Object::(END OF PARSING)
(BuildClassEnvironment)
Actionsequence item shellcommands



Wheeler, John wrote:

I’m sure you’ve probably checked this, but is the file actually there? Also, the d1,d2 output would be helpful. This should show what’s happening when “FileExists” runs. For a more brute force method, you could also use the exact same command as before just use ReturnsZero instead of quotes.

 

-----Original Message-----
From: Wolfgang Schwurack [mailto:wolf@uen.org]
Sent: Tuesday, May 13, 2003 11:47 AM
To: Wheeler, John
Cc: help-cfengine
Subject: Re: cfagent.conf

 

that is correct the class is never enabled. I made the change but it still never runs the command. If I run the command from the command line it works fine. example out put from 1.6.3 and 2.1.0a2

out put from 1.6.3 on Solaris 8

# ./cfengine -vf cfengine.conf

Reference time set to Tue May 13 09:00:49 2003

GNU Configuration Engine -
1.6.3
Free Software Foundation 1995-2000
Donated by Mark Burgess, Faculty of Engineering,
Oslo University College, 0254 Oslo, Norway
------------------------------------------------------------------------
Host name is: alf
Operating System Type is sunos
Operating System Release is 5.8
Architecture = sun4u
Using internal soft-class solaris for host alf
The time is now Tue May 13 09:00:49 2003
------------------------------------------------------------------------
Additional hard class defined as: 32_bit
Additional hard class defined as: sunos_5_8
Additional hard class defined as: sunos_sun4u
Additional hard class defined as: sunos_sun4u_5_8
Additional hard class defined as: sparc
Additional hard class defined as: sunos_sun4u_5_8_Generic_108528_18
GNU autoconf class from compile time: solaris2.8
  Careful with this - it might not be correct at run time if you have
  several OS versions with binary compatibilty!
Address given by nameserver: 205.124.250.80
alf: No preconfiguration file
Accepted domain name: undefined.domain
Defined Classes = ( any Tuesday Hr09 Min00 Min00_05 Day13 May Yr2003 solaris alf undefined_domain 32_bit sunos_5_8 sun4u sunos_sun4u sunos_sun4u_5_8 sparc sunos_sun4u_5_8_Generic_108528_18 solaris2_8 205_124_250 205_124_250_80 alf_uen_org server newinstall )
Negated Classes = ( )
Installable classes = ( )
Global expiry time for locks: 120 minutes
Global anti-spam elapse time: 0 minutes
Extensions which should not be directories = ( )
Suspicious filenames to be warned about = ( )
Reference time set to Tue May 13 09:00:50 2003
---------------------------------------------------------------------
Running shell commands
--------------------------------------------------------------------
cfengine:alf: Executing script /usr/bin/rsync -e '/usr/bin/ssh -x' -caz --delete distinc8@woody.uen.org:../../local /opt...(timeout=0,uid=-1,gid=-1)
(Setting umask to 77)
cfengine:alf: Finished script /usr/bin/rsync -e '/usr/bin/ssh -x' -caz --delete distinc8@woody.uen.org:../../local /opt

out put from 2.1.0a2 on Solaris 9

# ./cfagent -vf input/cfagent.conf
Reference time set to Tue May 13 10:26:14 2003
Job start time set to Tue May 13 10:26:14 2003
GNU Configuration Engine -
2.1.0a2
Free Software Foundation 1994-
Donated by Mark Burgess, Faculty of Engineering,
Oslo University College, 0254 Oslo, Norway
------------------------------------------------------------------------
Host name is: test
Operating System Type is sunos
Operating System Release is 5.9
Architecture = sun4u
Using internal soft-class solaris for host solaris
The time is now Tue May 13 10:26:14 2003
------------------------------------------------------------------------
Additional hard class defined as: 32_bit
Additional hard class defined as: sunos_5_9
Additional hard class defined as: sunos_sun4u
Additional hard class defined as: sunos_sun4u_5_9
Additional hard class defined as: sparc
Additional hard class defined as: sunos_sun4u_5_9_Generic_112233_04
GNU autoconf class from compile time: compiled_on_solaris2.9
Address given by nameserver: 205.124.250.160
Interface 1: lo0
Interface 2: eri0
Sorry - there is no current standard way to find out my IPv6 address (!!)
Unable to detect environment from cfenvd
cfengine:: No preconfiguration file
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
 * (Changing context state to: main) *
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Unable to detect environment from cfenvd
Accepted domain name: undefined.domain
Defined Classes = ( any cfengine_2_1_0a2 Tuesday Hr10 Min26 Min25_30 Q2 Hr10_Q2
Day13 May Yr2003 solaris test 32_bit sunos_5_9 sun4u sunos_sun4u sunos_sun4u_5_9
 sparc sunos_sun4u_5_9_Generic_112233_04 compiled_on_solaris2_9 test_uen_org net
_iface_lo0 net_iface_eri0 205_124_250_160 205_124_250 ipv4_205_124_250_160 ipv4_
205_124_250 ipv4_205_124 ipv4_205 server )
Negated Classes = ( )
Installable classes = ( )
Global expiry time for locks: 120 minutes
Global anti-spam elapse time: 1 minutes
Extensions which should not be directories = ( )
Suspicious filenames to be warned about = ( )
LogDirectory = /var/cfengine
Loaded /var/cfengine/ppkeys/localhost.priv
Loaded /var/cfengine/ppkeys/localhost.pub
Checksum database is /var/cfengine/checksum.db
Reference time set to Tue May 13 10:26:14 2003
Job start time set to Tue May 13 10:26:14 2003
*********************************************************************
 Main Tree Sched: shellcommands pass 1 @ Tue May 13 10:26:14 2003
*********************************************************************
Job start time set to Tue May 13 10:26:14 2003
++++++++++++++++++++++++++++++++++++++++
Summary of objects involved
++++++++++++++++++++++++++++++++++++++++
    global
    main


As you can see the script does not executes on cfengine 2.1.0a2 but does execute on cfengine 1.6.3

Wheeler, John wrote:

I'm guessing by "does not work" you mean that the class is never
enabled. I thought the syntax you are using was still valid, but maybe
not. Try
 
http://www.cfengine.org/docs/cfengine-Reference.html#Evaluated%20classes
 
newinstall = ( FileExists(/var/cfengine/newinstall) )
 
 
 
  
-----Original Message-----
From: Wolfgang Schwurack [mailto:wolf@uen.org]
Sent: Tuesday, May 13, 2003 9:38 AM
To: help-cfengine
Subject: cfagent.conf
 
Can you tell me why this does not work. I only what to run the command
if the file newinstall is on the server. If the file is not there then
do not run the command. This worked on my old servers running cfengine
1.6.3. Now  I am running cfengine 2.1.0a2 on Solaris 9
 
#!/var/cfengine/bin/cfagent -f
 
groups:
 
   server = ( test )
 
   newinstall = ( "/usr/bin/test -f /var/cfengine/newinstall" )
 
 
control:
 
   actionsequence =
        (
          shellcommands
        )
 
 
   shellcommands:
 
     newinstall::
       "/usr/bin/rsync -e '/usr/bin/ssh -x' -caz --delete
distinc9@woody.uen.org
:../../local /opt"
 
 
--
--
Wolfgang Schwurack
Unix System Administrator
University of Utah/Utah Education Network
Tel: (801) 587-9444
 
 
 
 
_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://mail.gnu.org/mailman/listinfo/help-cfengin
e
  



-- 
--
Wolfgang Schwurack
Unix System Administrator
University of Utah/Utah Education Network
Tel: (801) 587-9444

 


-- 
--
Wolfgang Schwurack
Unix System Administrator
University of Utah/Utah Education Network
Tel: (801) 587-9444
  


_______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://mail.gnu.org/mailman/listinfo/help-cfengine

-- 
--
Wolfgang Schwurack
Unix System Administrator
University of Utah/Utah Education Network
Tel: (801) 587-9444


reply via email to

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