DRBDPlugin: check_drbd_res() ignore info codes
Messages for return codes 1 to 99 are not considered an error.
This commit is contained in:
@ -72,10 +72,11 @@ sub check_drbd_res {
|
|||||||
|
|
||||||
die "got undefined drbd result\n" if !$rc;
|
die "got undefined drbd result\n" if !$rc;
|
||||||
|
|
||||||
|
# Messages for return codes 1 to 99 are not considered an error.
|
||||||
foreach my $res (@$rc) {
|
foreach my $res (@$rc) {
|
||||||
my ($code, $format, $details) = @$res;
|
my ($code, $format, $details) = @$res;
|
||||||
|
|
||||||
next if $code == 0;
|
next if $code < 100;
|
||||||
|
|
||||||
my $msg;
|
my $msg;
|
||||||
if (defined($format)) {
|
if (defined($format)) {
|
||||||
@ -190,7 +191,7 @@ sub alloc_image {
|
|||||||
|
|
||||||
die "unable to allocate an image name for VM $vmid in storage '$storeid'\n"
|
die "unable to allocate an image name for VM $vmid in storage '$storeid'\n"
|
||||||
if !defined($name);
|
if !defined($name);
|
||||||
|
|
||||||
my ($rc, $res) = $hdl->create_resource($name, {});
|
my ($rc, $res) = $hdl->create_resource($name, {});
|
||||||
check_drbd_res($rc);
|
check_drbd_res($rc);
|
||||||
|
|
||||||
@ -205,7 +206,7 @@ sub alloc_image {
|
|||||||
'allow-two-primaries' => 'yes',
|
'allow-two-primaries' => 'yes',
|
||||||
});
|
});
|
||||||
check_drbd_res($rc);
|
check_drbd_res($rc);
|
||||||
|
|
||||||
my $redundancy = get_redundancy($scfg);;
|
my $redundancy = get_redundancy($scfg);;
|
||||||
|
|
||||||
($rc, $res) = $hdl->auto_deploy($name, $redundancy, 0, 0);
|
($rc, $res) = $hdl->auto_deploy($name, $redundancy, 0, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user