Hi,
I have a bizarre problem with cfengine copy statement that should be obvious :-(
I want to copy a file to my clients form a policy server and when the file is
removed on the policy server the file is removed on the client, simple not :-)
So I have a cfengine file cf.test.linux
control:
actionsequence = ( copy shellcommands )
AddInstallable = ( no_testCopied testCopied )
copy:
linux::
$/cfengine/domain/test/tmp/testfile dest=/tmp/testfile
server=10.10.10.10
backup=false
type=sum
define=testCopied
#elsedefine=no_testCopied
#failover=no_testCopied
purge=true
alerts:
no_testCopied::
"ALERT : no_testCopied is set"
testCopied::
"ALERT : testCopied is set"
shellcommands:
testCopied::
"/bin/echo testCopied is set"
no_testCopied::
"/bin/echo no_testCopied is set"
When the testfile is available on the policy server I get no problem, files is
copied ...
cfengine:client1: Strong authentication of server=10.10.10.10 connection
confirmed
Performance(Copy(10.10.10.10:/cfengine/domain/test > /var/cfengine/inputs)):
time=1.6723 secs, av=1.6693 +/- 0.0362
Checking copy from 10.10.10.10:/cfengine/domain/test/ to /var/cfengine/inputs
cfengine:client1: (Destination purging enabled)
Performance(Copy(10.10.10.10:/cfengine/domain/test/ > /var/cfengine/inputs)):
time=1.4926 secs, av=1.5060 +/- 0.1227
When I delete the file on the policy server...
I get
cfengine:client1: Strong authentication of server=10.10.10.10 connection
confirmed
cfengine:client1: Server returned error: Unspecified server refusal (see
verbose server output)
cfengine:client1: Can't stat /cfengine/cfroot.linux/test/tmp/testfile in copy
Saving the setuid log in /var/cfengine/cfagent.client1.log
And the file still remains there ....
ls -l /tmp/testfile
-rw-r--r-- 1 root root 6 Jan 8 11:45 /tmp/testfile
My question is : if this is normal behavior, or works as designed cause reading
through the documentation it gave me an other impression
I have also trying to sove this with the failover command, but once agian no
luck there
cfagent -V
GNU cfengine 2.2.10
Free Software Foundation 1994-
Donated by Mark Burgess, Oslo University College, Norway
This program is covered by the GNU Public License and may be
copied free of charge. No warranty is implied
Anybody, thanks in advance...
Regards,
Tom
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine