[pve-devel] [PATCH 16/19] phase3_cleanup : don't free disk of source vm
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Mar 9 17:13:05 CET 2017
Same intendas:
[PATCH 12/19] phase3 : don't destroy local copy
AFAIS, so it could be done in one patch, reducing the total patch count
a bit.
On 02/22/2017 02:33 PM, Alexandre Derumier wrote:
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
> PVE/QemuMigrate.pm | 22 +++++++++++++---------
> 1 file changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
> index 6c238b7..64f3565 100644
> --- a/PVE/QemuMigrate.pm
> +++ b/PVE/QemuMigrate.pm
> @@ -1020,15 +1020,19 @@ sub phase3_cleanup {
> }
>
> if($self->{storage_migration}) {
> - # destroy local copies
> - my $volids = $self->{online_local_volumes};
> -
> - foreach my $volid (@$volids) {
> - eval { PVE::Storage::vdisk_free($self->{storecfg}, $volid); };
> - if (my $err = $@) {
> - $self->log('err', "removing local copy of '$volid' failed - $err");
> - $self->{errors} = 1;
> - last if $err =~ /^interrupted by signal$/;
> +
> + if (!$self->{opts}->{externalcluster}) {
> +
> + # destroy local copies
> + my $volids = $self->{online_local_volumes};
> +
> + foreach my $volid (@$volids) {
> + eval { PVE::Storage::vdisk_free($self->{storecfg}, $volid); };
> + if (my $err = $@) {
> + $self->log('err', "removing local copy of '$volid' failed - $err");
> + $self->{errors} = 1;
> + last if $err =~ /^interrupted by signal$/;
> + }
> }
> }
>
More information about the pve-devel
mailing list