[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
update.conf interfering with cfagent.conf
From: |
Marion Hakanson |
Subject: |
update.conf interfering with cfagent.conf |
Date: |
Thu, 21 Nov 2002 15:04:34 -0800 |
Folks,
In the archives, I noticed a message with the above subject dated 15-Oct-2002,
and I saw no response there. I've noticed behavior here which seems to be
related to this earlier report. The previous note said:
> If you have an update.conf something like this:
>
> control:
> action_sequence = ( copy tidy )
>
> copy:
> ...
>
> tidy:
> ...
>
> files:
> ...
>
> ...and then a cfagent.conf like this:
>
> control:
> action_sequence = ( ... files ... )
>
> ...then the actions listed in update.conf will be executed, even though
> the update.conf did NOT include these actions to be done.
The behavior I've noticed (with 2.0.5pre, SPARC, Solaris-8 & -9) is
that the actions in update.conf get performed during the "Main" sched,
not during the "Update" sched. Thus my config files get updated OK,
but not until _after_ the cfagent.conf file has been parsed. My
understanding was that the update.conf actions would get performed
(e.g. new config files would be copied into the work directory),
and _then_ the cfagent.conf file would be parsed.
Here are some trimmed-down config files (cf.globaldefs just defines macros
shared by update.conf, cfagent.conf, & cfservd.conf, so I've not included
that here):
###################################################
#
# BEGIN update.conf
#
control:
actionsequence = ( copy tidy )
import:
# Get global definitions.
cf.globaldefs
# This file does the real configuration work, because it can
# inherit all the variables & classes we just imported.
cf.update
# END update.conf
###################################################
###################################################
#
# BEGIN cf.update
#
copy:
$(master_cfinput) dest=$(cf_workdir)/inputs
r=inf
owner=root
group=root
mode=640
type=binary
exclude=*.lst
exclude=*~
exclude=#*
server=$(policyhost)
tidy:
$(cf_workdir)/outputs pattern=* age=21
# END cf.update
###################################################
###################################################
#
# BEGIN cfagent.conf
#
control:
access = ( root )
site = ( cse )
sysadm = ( address@hidden )
actionsequence = (
directories
files
disable
tidy
copy
links
editfiles
shellcommands
)
import:
cf.globaldefs
cf.site
# END cfagent.conf
###################################################
###################################################
#
# BEGIN cf.site
#
directories:
/var/ mode=755 owner=0 group=0
$(cfst_var_basedir) mode=755 owner=0 group=0
$(cf_workdir) mode=755 owner=0 group=0
/root mode=700 owner=0 group=0
/disk mode=755 owner=0 group=0
files:
/disk/$(host)/ mode=755 owner=0 group=0 action=create
tidy:
/root pat=.tcshrc recurse=0 age=0
copy:
$(master_configs)/init/$(class)/scripts/funcs.sh server=$(policyhost)
dest=$(cfst_init_base)funcs.sh type=sum m=444 o=root g=root
# END cf.site
###################################################
###################################################
Here is some output from "cfagent -n -v" illustrating the behavior:
franklin: No preconfiguration file
* (Changing context state to: update) *
Looking for a bootstrap file /var/cfengine/inputs/update.conf
Finished with update.conf
cfagent -n: Running in ``All talk and no action'' mode
LogDirectory = /var/cfengine
Loaded /var/cfengine/ppkeys/localhost.priv
Loaded /var/cfengine/ppkeys/localhost.pub
Checksum database is /var/cfengine/checksum.db
Job start time set to Thu Nov 21 13:50:21 2002
*********************************************************************
Update Sched: copy pass 1 @ Thu Nov 21 13:50:21 2002
*********************************************************************
Job start time set to Thu Nov 21 13:50:21 2002
*********************************************************************
Update Sched: tidy pass 1 @ Thu Nov 21 13:50:21 2002
*********************************************************************
---------------------------------------------------------------------
Tidying Spool Directories
---------------------------------------------------------------------
---------------------------------------------------------------------
Tidying by directory
---------------------------------------------------------------------
No home patterns to search
Purging private classes from context update
* (Changing context state to: main) *
Import file cf.globaldefs
Import file cf.update
Import file cf.globaldefs
Import file cf.site
. . .
*********************************************************************
Main Tree Sched: directories pass 1 @ Thu Nov 21 13:50:21 2002
*********************************************************************
. . .
*********************************************************************
Main Tree Sched: files pass 1 @ Thu Nov 21 13:50:21 2002
*********************************************************************
. . .
*********************************************************************
Main Tree Sched: disable pass 1 @ Thu Nov 21 13:50:21 2002
*********************************************************************
. . .
*********************************************************************
Main Tree Sched: tidy pass 1 @ Thu Nov 21 13:50:21 2002
*********************************************************************
---------------------------------------------------------------------
Tidying Spool Directories
---------------------------------------------------------------------
---------------------------------------------------------------------
Tidying by directory
---------------------------------------------------------------------
Directory /var/cfengine/outputs
. . .
*********************************************************************
Main Tree Sched: copy pass 1 @ Thu Nov 21 13:50:21 2002
*********************************************************************
Connect to policyhost.my.domain = 192.168.4.1 on port cfengine
Loaded /var/cfengine/ppkeys/root-192.168.4.1.pub
cfengine:franklin: Strong authentication of server=policyhost.my.domain
Checking copy from policyhost.my.domain:/var/master_configs/cfengine to
/var/cfengine/inputs
. . .
###################################################
So, what am I (and the previous poster) missing?
Thanks and regards,
--
Marion Hakanson <address@hidden>
CSE Computing Facilities
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- update.conf interfering with cfagent.conf,
Marion Hakanson <=