Completely exclude mpoints when running rsync
authorNikos Skalkotos <skalkoto@grnet.gr>
Fri, 18 Jan 2013 18:45:32 +0000 (20:45 +0200)
committerNikos Skalkotos <skalkoto@grnet.gr>
Fri, 18 Jan 2013 19:20:12 +0000 (21:20 +0200)
commit252b2b5d5a7c3e54a305e5d0102e6a51482cd931
tree4f60c4c0d8413b0c80bdf8685d55a19b6dac5df5
parentf6ea8d0253302a0239021462470c79afc8c1802a
Completely exclude mpoints when running rsync

We used to exclude mount point from rsync with options like this:

 --exclude mount/point/*

This will copy the directory and leave out all files under it. In
some cases, this causes problems because rsync will fail if it
cannot stat the directory and some mount point will only return
stat info to their owner and not root. Even if this wasn't the
case, we cannot determine the real directory attributes. The stat
syscall will return the attributes associated with the mount
options. It's better to completely exclude those mpoints in rsync
and create them explicitly after the command runs. We make them
inherit the mode and the ownership of their parent directory.
image_creator/bundle_volume.py