[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
file copy not setting dynamic classes
From: |
benf |
Subject: |
file copy not setting dynamic classes |
Date: |
Tue, 27 Mar 2001 20:57:10 -0000 |
User-agent: |
tin/pre-1.4-980818 ("Laura") (UNIX) (FreeBSD/3.5-STABLE (i386)) |
Hi,
I'm running 1.6.3 on redhat 7.0 boxes. I'm trying to define a class set
depending on if a file is copied or not - which seems to work, but the
class seems to disappear by the time the shellcommand stuff is run.
Here is the relevant section of cfengine.conf:
shellcommands:
dogday::
"/bin/echo > /tmp/newrpms"
dogday2::
"/bin/echo > /tmp/nonewrpms"
copy:
linux::
/usr/local/src/dog
dest=/usr/local/src/dog
server=$(cf_server)
action=fix
define=dogday
elsedefine=dogday2
In the output below, the file exists so dogday2 should get defined.
It claims to do it, but the shell command does not run.
If I define the class on the command line, it runs just fine.
Finally, note that the dogday2 class is shown twice in the
ENVIRONMENT line near the end of the output.
The same behaviour happens if the file doesn't exist, just with
the dogday class!
* highlights the good info
<first part cut away>
Directory for /usr/local/src/dog exists. Okay
CheckImage (source=/usr/local/src/dog destination=/usr/local/src/dog)
cf_rstat(/usr/local/src/dog)
GetCachedStatData(/usr/local/src/dog)
Found in cache
ImageCopy(/usr/local/src/dog,/usr/local/src/dog,+0,-0)
IgnoredOrExcluded(/usr/local/src/dog)
Destination file /usr/local/src/dog exists
CheckCopiedFile(/usr/local/src/dog)
cfengine:boradmin04: Checking fs-object /usr/local/src/dog
CheckExistingFile(+644,-7133)
CheckOwner: 0
uid 0
CheckACLs(/usr/local/src/dog)
File okay, newperm = 644, stat = 644
*cfengine: image file is up to date: /usr/local/src/dog
*AddMultipleClasses(dogday2)
*AddClassToHeap(dogday2)
*Appending [dogday2]
ReleaseCurrentLock(/var/run/cfengine/lock.cfengine_conf.boradmin04.copy._usr_local_src_dog__usr_local_src_dog)
LockLog(Lock removed normally)
Closing current connection
Saving the setuid log in /var/run/cfengine/cfengine.boradmin04.log
(BuildClassEnvironment)
---
*ENVIRONMENT:
CFALLCLASSES=any:redhat:redhat_7:redhat_7_0:opt_debug:Tuesday:Hr12:Min30:Min30_35:Day27:March:Yr2001:linux:boradmin04_stage_keen_com:stage_keen_com:boradmin04:32_bit:linux_2_2_18:i686:linux_i686:linux_i686_2_2_18:linux_i686_2_2_18__16_SMP_Mon_Mar_19_12_26_56_PST_2001:linux_gnu:127_0_0:127_0_0_1:localhost_localdomain:localhost:10_6_100_2:127_0:dogday2:dogday2:
---
---------------------------------------------------------------------
*Running shell commands
---------------------------------------------------------------------
<NOTHING GET RUN!>
Finally, I was trying to determine if this problem was dependent
on the names of the files or classes, so I changed the class names
to something much shorter: VVV and VVV2. Same behaviour, but an
extra class called '_' was added for unknown reasons. This makes
me think something is messing up the class list - other tests have
shown a class called '__' being added as well.
When cfengine was run I got:
cfengine: image file is up to date: /usr/local/src/dog
*AddMultipleClasses(VVV2)
*AddClassToHeap(VVV2)
*Appending [VVV2]
*AddClassToHeap(_)
*Appending [_]
*AddClassToHeap(_)
ReleaseCurrentLock(/var/run/cfengine/lock.cfengine_conf.boradmin04.copy._usr_local_src_dog__usr_local_src_dog)
LockLog(Lock removed normally)
Closing current connection
Saving the setuid log in /var/run/cfengine/cfengine.boradmin04.log
(BuildClassEnvironment)
---
*ENVIRONMENT:
CFALLCLASSES=any:redhat:redhat_7:redhat_7_0:opt_debug:Tuesday:Hr12:Min36:Min35_40:Day27:March:Yr2001:linux:boradmin04_stage_keen_com:stage_keen_com:boradmin04:32_bit:linux_2_2_18:i686:linux_i686:linux_i686_2_2_18:linux_i686_2_2_18__16_SMP_Mon_Mar_19_12_26_56_PST_2001:linux_gnu:127_0_0:127_0_0_1:localhost_localdomain:localhost:10_6_100_2:127_0:VVV2:_:VVV2:
*^why is this here now?
---
thanks for any info,
edgar nielsen
- file copy not setting dynamic classes,
benf <=