From f05ae914bb3563ee657e4261ad0a7a8e80e8e9e7 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 29 May 2009 13:49:13 +0200 Subject: [PATCH] Restart rsync also on exit value 12. 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dss.c b/dss.c index 27c14b6..a9cdb3b 100644 --- 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; -- 2.39.2