xcat2 / xcat-core

Code repo for xCAT core packages
Eclipse Public License 1.0
360 stars 171 forks source link

Removing a file from a sync'ed directory in `synclist` won't remove it from the destination node #7408

Closed kcgthb closed 11 months ago

kcgthb commented 11 months ago

When the synclist file contains source directories (not only files) like this:

/etc/dir1/* -> /etc/dir1

removing a file from the source /etc/dir1/ directory and running updatenode -F or running the syncfiles postscript will not remove the file on the destination.

For instance:

src # ls /etc/dir1
foo bar
src # updatenode dst -F
src # ssh dst ls /etc/dir1
foo bar

src # rm /etc/dir1/bar
src # ls /etc/dir1
foo
src # updatenode dst -F
src # ssh dst ls /etc/dir1
foo bar

So removing a file from the source will not remove it from the destination, which could lead to issues when large directories are distributed to compute nodes.

kcgthb commented 11 months ago

Mmmh, this is actually the only way to support merging new files in existing directories. Removing the destination is obviously not the right choice here, so closing this as invalid.