migrate: cleanup: $free is always defined
This commit is contained in:
@ -647,10 +647,8 @@ sub storage_migrate {
|
|||||||
warn "send/receive failed, cleaning up snapshot(s)..\n" if $err;
|
warn "send/receive failed, cleaning up snapshot(s)..\n" if $err;
|
||||||
eval { volume_snapshot_delete($cfg, $volid, '__migration__', 0) };
|
eval { volume_snapshot_delete($cfg, $volid, '__migration__', 0) };
|
||||||
warn "could not remove source snapshot: $@\n" if $@;
|
warn "could not remove source snapshot: $@\n" if $@;
|
||||||
if (defined($free)) {
|
eval { run_command($free) };
|
||||||
eval { run_command($free) };
|
warn "could not remove target snapshot: $@\n" if $@;
|
||||||
warn "could not remove target snapshot: $@\n" if $@;
|
|
||||||
}
|
|
||||||
die $err if $err;
|
die $err if $err;
|
||||||
} else {
|
} else {
|
||||||
die "$errstr - target type $tcfg->{type} is not valid\n";
|
die "$errstr - target type $tcfg->{type} is not valid\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user