]> git.tuebingen.mpg.de Git - dss.git/commit - dss.c
Rework restart logic, introduce --max-errors.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 12 Dec 2014 14:05:21 +0000 (15:05 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 27 Jan 2015 09:47:54 +0000 (10:47 +0100)
commit61e824a2563c8b78401278faf6d4e9fad29c1c12
treecefc0dff6543bc331c024feeeaa580f43f516134
parent9a0ddec6508e04cf2e9d5e9bd02e9b7de02428a3
Rework restart logic, introduce --max-errors.

It has happened several times in the past that dss made no progress
because the underlying rsync command terminates with exit code 13
(Errors with program diagnostics). Currently dss special cases this
exit code as a non-fatal error, i.e. it does not terminate but restarts
the rsync command after 60 seconds. If the problem is permanent,
no new snapshots will be created, but the exit hook is not called
either, which is unfortunate.

This commit tries to improve on this. With this patch applied, the
only non-fatal exit code from rsync is 24 (Partial transfer due
to vanished source files), which is actually considered success.
All other non-zero exit codes cause dss to restart the rsync command,
but only at most N times, where N is the argument given to the new
--max-rsync-errors option.
dss.c
dss.ggo
err.h