axkibe/lsyncd — Issue #30: rsync IO error (due to unreachable peer) erroneously treated as success/done
Author: axkibe
Created: 2011-11-16 14:59:35+00:00
State: open

Originally filed by some.h...@gmail.com on 2010-10-13T09:34:57

lsync 1.39 ignores error codes from rsync while syncing dirs, so if remote rsyncd is unreachable directory never gets synced.

Problem is very easy to reproduce
- configure lsyncd to watch some dir, check updates are propagated OK
- stop rsyncd on remote side
- make changes to local dir, watch something like this in debug log
select() timeout, doing delays.
in queue: 1 expired / 0 delayed dirs
delay expired: acting for /apps/samba/shares/deps/novgorod/out/.
calling /usr/bin/rsync -ltd --delete --bwlimit=100 --timeout=60 --password-file=/home/transf-novgorod/.rsyncpass --exclude-from /home/transf-novgorod/lsyncd.exclusions /apps/samba/shares/deps/novgorod/out/ spb@hawk-n1.n1.maxidom.ru::from-spb/
/usr/bin/rsync /apps/samba/shares/deps/novgorod/out/ --> spb@hawk-n1.n1.maxidom.ru::from-spb/ [7756]
rsync: failed to connect to hawk-n1.n1.maxidom.ru: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(98)
Forked binary process returned non-zero return code: 10
Finished waiting for all children
in queue: 0 expired / 0 delayed dirs
gone blocking
- so changes are lost

This severely limits reliablity of lsyncd as mirroring solution.