Commit 02ab4a86 authored by Kirk Webb's avatar Kirk Webb

Keep calm and carry on deleting resources

Keep trying to remove resources even when some of them fail to be reaped
properly.  Log problems/errors, but tell mkvnode.pl that all is well in
most cases.

DO signal failure during vnode destruction if the key volume removal step
fails.  This way we don't lose track of the state needed for a future
cleanup attempt.
parent 8cdbeb37
......@@ -1165,8 +1165,6 @@ sub setupIPAlias($;$) {
sub removeVlanInterface($$) {
my ($vnode_id, $vnconfig) = @_;
my $retcode = 0;
# Fetch the interface record for this pseudo-VM
my $ifc = getIfConfig($vnconfig);
if (!defined($ifc)) {
......@@ -1214,18 +1212,15 @@ sub removeVlanInterface($$) {
if ($@) {
warn("*** ERROR: blockstore_removeVlanInterface: ".
"failure while removing vlan interface: $@");
$retcode = -1;
}
}
return $retcode;
return 0;
}
sub unexportSlice($$$$) {
my ($vnode_id, $sconf, $vnconfig, $priv) = @_;
my $retcode = 0;
# All of the sanity checking was done when we first created and
# exported this blockstore. Assume nothing has changed...
my $volname = $sconf->{'VOLNAME'};
......@@ -1239,7 +1234,6 @@ sub unexportSlice($$$$) {
if ($@) {
warn("*** WARNING: blockstore_unexportSlice: ".
"Failed to remove iSCSI target: $@");
$retcode = -1;
}
# Remove iSCSI auth group
......@@ -1251,7 +1245,6 @@ sub unexportSlice($$$$) {
if ($@) {
warn("*** WARNING: blockstore_unexportSlice: ".
"Failed to remove iSCSI auth group: $@");
$retcode = -1;
}
}
......@@ -1261,11 +1254,10 @@ sub unexportSlice($$$$) {
if ($@) {
warn("*** WARNING: blockstore_unexportSlice: ".
"Failed to remove iSCSI extent: $@");
$retcode = -1;
}
# All torn down and unexported!
return $retcode;
return 0;
}
sub deallocSlice($$$$) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment