storage migrate: only output about cleaning-up snapshots if there are any
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -915,8 +915,8 @@ sub storage_migrate {
|
|||||||
if !defined($new_volid) && $target_apiver >= 5;
|
if !defined($new_volid) && $target_apiver >= 5;
|
||||||
};
|
};
|
||||||
my $err = $@;
|
my $err = $@;
|
||||||
warn "send/receive failed, cleaning up snapshot(s)..\n" if $err;
|
|
||||||
if ($opts->{migration_snapshot}) {
|
if ($opts->{migration_snapshot}) {
|
||||||
|
warn "send/receive failed, cleaning up snapshot(s)..\n" if $err;
|
||||||
eval { volume_snapshot_delete($cfg, $volid, $opts->{snapshot}, 0) };
|
eval { volume_snapshot_delete($cfg, $volid, $opts->{snapshot}, 0) };
|
||||||
warn "could not remove source snapshot: $@\n" if $@;
|
warn "could not remove source snapshot: $@\n" if $@;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user