[pve-devel] [PATCH guest-common V2] Remove noerr form replication.
Wolfgang Link
w.link at proxmox.com
Tue Oct 17 08:32:40 CEST 2017
We will handle this errors in the API and decide what to do.
---
PVE/Replication.pm | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/PVE/Replication.pm b/PVE/Replication.pm
index e53928e..2b3df36 100644
--- a/PVE/Replication.pm
+++ b/PVE/Replication.pm
@@ -304,7 +304,7 @@ sub replicate {
}
my $run_replication_nolock = sub {
- my ($guest_class, $jobcfg, $iteration, $start_time, $logfunc, $noerr, $verbose) = @_;
+ my ($guest_class, $jobcfg, $iteration, $start_time, $logfunc, $verbose) = @_;
my $jobid = $jobcfg->{id};
@@ -358,21 +358,15 @@ my $run_replication_nolock = sub {
close($logfd);
- die $err if $err && !$noerr;
+ die $err if $err;
};
- if (my $err = $@) {
- if ($noerr) {
- warn "$jobid: got unexpected replication job error - $err";
- } else {
- die $err;
- }
- }
+ die $@ if $@;
return $volumes;
};
sub run_replication {
- my ($guest_class, $jobcfg, $iteration, $start_time, $logfunc, $noerr, $verbose) = @_;
+ my ($guest_class, $jobcfg, $iteration, $start_time, $logfunc, $verbose) = @_;
my $volumes;
@@ -380,10 +374,9 @@ sub run_replication {
my $timeout = 2; # do not wait too long - we repeat periodically anyways
$volumes = PVE::GuestHelpers::guest_migration_lock(
$jobcfg->{guest}, $timeout, $run_replication_nolock,
- $guest_class, $jobcfg, $iteration, $start_time, $logfunc, $noerr, $verbose);
+ $guest_class, $jobcfg, $iteration, $start_time, $logfunc, $verbose);
};
if (my $err = $@) {
- return undef if $noerr;
die $err;
}
return $volumes;
--
2.11.0
More information about the pve-devel
mailing list