[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
force copy question
From: |
Bettilyon, Allen |
Subject: |
force copy question |
Date: |
24 Oct 2002 16:33:40 -0600 |
Hello,
I'm wondering if there is a way to force all copies for a specific run.
My problem is this:
We've got a directory tree containing conf files for the cluster. Some
files set 'hooks' for shell commands to be ran, and than there is a
general recursive copy. Essentially, the cfagent script looks like
this:
control:
actionsequence = (
copy
copy.full_copy
shellcommands
copy:
some_box::
$(hostbase)/etc/snmp/snmpd.conf dest=/etc/snmpd.conf
server=$(fileserver)
define=refresh_snmpd
$(hostbase)/etc/ssh/sshd_config
dest=/etc/ssh/sshd_config.preswap
server=$(fileserver)
define=reload_sshd
full_copy::
## The rest of the config files
$(hostbase)/etc/ dest=/etc/
server=$(fileserver)
recurse=inf
shellcommands::
reload_sshd::
"/bin/kill -HUP `cat /var/run/sshd.pid`"
refresh_snmpd::
"/usr/bin/killall -HUP snmpd"
This works quite well, but seems to have a problem when we are
installing a new box. Our automated install runs cfengine, but the
files do not get copied over because the ctime on the box is newer than
the ctime on the repository version. I do not want to perform and MD5
check on every file every time, as this seems to be too expensive.
What I would like is a way to force the copies for an initial run. We
have considered adding
full_copy.force::
## The rest of the config files
$(hostbase)/etc/ dest=/etc/
server=$(fileserver)
recurse=inf
force=yes
to the config, and than invoking cfagent -D force. This works, but we
don't want to maintain 2 copy sections for every file that needs a
shellcommand associated with it.
Anyone have any suggestion, comments about this? How expensive are the
MD5 or byte copy checks? Is anyone doing something similar?
- Allen
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- force copy question,
Bettilyon, Allen <=