]> git.tue.mpg.de Git - dss.git/commitdiff
Prevent busy loops on rsync exit code 13.
authorAndre Noll <maan@systemlinux.org>
Thu, 6 Nov 2008 09:32:01 +0000 (10:32 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 6 Nov 2008 09:32:01 +0000 (10:32 +0100)
We restart the rsync process in case it returned with exit code 13
which unfortunately happens for some unknown reasons even with a
valid configuration.

This may lead to a busy loop, so wait at least one minute before
restarting rsync.

dss.c

diff --git a/dss.c b/dss.c
index 86e83827f50991fc9460eb44c71b45211b7fc1a8..af02f1ce0bfcbf20b6858a3b22f762762140e4bf 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -502,6 +502,8 @@ static int handle_rsync_exit(int status)
                DSS_WARNING_LOG("rsync process %d returned %d -- restarting\n",
                        (int)rsync_pid, es);
                snapshot_creation_status = SCS_RSYNC_NEEDS_RESTART;
+               gettimeofday(&next_snapshot_time, NULL);
+               next_snapshot_time.tv_sec += 60;
                ret = 1;
                goto out;
        }