[pve-devel] [PATCH guest-common 1/2] replication: keep retrying every 30 minutes in error state

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Jun 27 10:53:12 CEST 2017


Otherwise we never get out of it.
---
 PVE/ReplicationState.pm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/PVE/ReplicationState.pm b/PVE/ReplicationState.pm
index eeab4e8..2ef31b5 100644
--- a/PVE/ReplicationState.pm
+++ b/PVE/ReplicationState.pm
@@ -252,9 +252,7 @@ sub job_status {
 	    # todo: consider fail_count? How many retries?
 	} else  {
 	    if (my $fail_count = $state->{fail_count}) {
-		if ($fail_count < 3) {
-		    $next_sync = $state->{last_try} + 5*60*$fail_count;
-		}
+		$next_sync = $state->{last_try} + 60*($fail_count < 3 ? 5*$fail_count : 30);
 	    } else {
 		my $schedule =  $jobcfg->{schedule} || '*/15';
 		my $calspec = PVE::CalendarEvent::parse_calendar_event($schedule);
-- 
2.11.0





More information about the pve-devel mailing list