]> git.proxmox.com Git - pve-guest-common.git/commitdiff
replication: keep retrying every 30 minutes in error state
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 27 Jun 2017 08:53:12 +0000 (10:53 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 27 Jun 2017 10:13:24 +0000 (12:13 +0200)
Otherwise we never get out of it.

PVE/ReplicationState.pm

index 5401db60f9dbb9f2df9189069a0c0cc2cfc84bcd..f82bb5c1a613f3e832a6f74105c7d8f901daa023 100644 (file)
@@ -257,9 +257,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);