From 9e4632c2fea87b09d490d326bc3c80ced5337ca4 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 15 Apr 2016 08:07:01 +0200 Subject: [PATCH] DRBDPlugin: check_drbd_res() ignore info codes Messages for return codes 1 to 99 are not considered an error. --- PVE/Storage/DRBDPlugin.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PVE/Storage/DRBDPlugin.pm b/PVE/Storage/DRBDPlugin.pm index 8c19a12..7536b42 100644 --- a/PVE/Storage/DRBDPlugin.pm +++ b/PVE/Storage/DRBDPlugin.pm @@ -72,10 +72,11 @@ sub check_drbd_res { die "got undefined drbd result\n" if !$rc; + # Messages for return codes 1 to 99 are not considered an error. foreach my $res (@$rc) { my ($code, $format, $details) = @$res; - next if $code == 0; + next if $code < 100; my $msg; if (defined($format)) { @@ -190,7 +191,7 @@ sub alloc_image { die "unable to allocate an image name for VM $vmid in storage '$storeid'\n" if !defined($name); - + my ($rc, $res) = $hdl->create_resource($name, {}); check_drbd_res($rc); @@ -205,7 +206,7 @@ sub alloc_image { 'allow-two-primaries' => 'yes', }); check_drbd_res($rc); - + my $redundancy = get_redundancy($scfg);; ($rc, $res) = $hdl->auto_deploy($name, $redundancy, 0, 0);