]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Restart rsync also on exit value 12.
authorAndre Noll <maan@systemlinux.org>
Fri, 29 May 2009 11:49:13 +0000 (13:49 +0200)
committerAndre Noll <maan@systemlinux.org>
Fri, 29 May 2009 11:49:13 +0000 (13:49 +0200)
An exit value of 12 means "Error in rsync protocol data stream",
and it happens regularly for rsync-3 without apparent reason. So
restart the rsync process also in this case.

dss.c

diff --git a/dss.c b/dss.c
index 27c14b6720d47fc88721c7bd25765affc791daa9..a9cdb3b8a590f91c3d5d9488e6d99c8831bd3f11 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -641,7 +641,12 @@ static int handle_rsync_exit(int status)
                goto out;
        }
        es = WEXITSTATUS(status);
-       if (es == 13) { /* Errors with program diagnostics */
+       /*
+        * Restart rsync on non-fatal errors:
+        * 12: Error in rsync protocol data stream
+        * 13: Errors with program diagnostics
+        */
+       if (es == 12 || es == 13) {
                DSS_WARNING_LOG("rsync process %d returned %d -- restarting\n",
                        (int)create_pid, es);
                snapshot_creation_status = HS_NEEDS_RESTART;