Bcfg2/bcfg2 — pull request #85 by fennm (2013-05-24 16:27:57+00:00)
Title: Cfg handle created events for existing files

Cfg: Handle bogus created events as changed …

It is possible for the FAM (gamin in particular) to send a created
event for a file that already exists if the file is updated in a
particular way. I suppose that the event is technically correct
since a new inode really was created, but the file is only changed
from bcfg2's point of view.

For instance, the "atomic" copy-to-temp-then-move-over-top method
that rsync uses will expose this behavior. Example:

rsync -a --temp-dir=/var/tmp --delete-after \
--exclude Packages/cache --exclude Packages/keys \
--exclude Reporting/DirectStore --exclude probed.xml \
/var/lib/bcfg2/ $OTHERSERVER:/var/lib/bcfg2