[pve-devel] [PATCH 2/2] remove migration lock from config.
Cesar Peschiera
brain at click.com.py
Thu Sep 3 07:39:34 CEST 2015
Hi Wolfgang
And what will happen if i do a live migration, and halfway through, a task
scheduled of backup is started?
Same question for migration offline.
----- Original Message -----
From: "Wolfgang Link" <w.link at proxmox.com>
To: <pve-devel at pve.proxmox.com>
Sent: Wednesday, September 02, 2015 8:22 AM
Subject: [pve-devel] [PATCH 2/2] remove migration lock from config.
> It is not really necessary to use the lock at migragtion.
> And it makes problem to remove the lock, because the config is moved
> and the cluster_vm list is not updated at this moment.
> ---
> src/PVE/LXC/Migrate.pm | 23 +++++++++++++++--------
> 1 file changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
> index bf6d701..04d49bc 100644
> --- a/src/PVE/LXC/Migrate.pm
> +++ b/src/PVE/LXC/Migrate.pm
> @@ -74,8 +74,13 @@ sub phase1 {
> $self->log('info', "starting migration of CT $self->{vmid} to node
> '$self->{node}' ($self->{nodeip})");
>
> my $conf = $self->{vmconf};
> - $conf->{lock} = 'migrate';
> - PVE::LXC::write_config($vmid, $conf);
> +
> + #It is not really necessary to use the lock
> + #And it makes problem to remove the lock, because the config is moved
> + #and the cluster_vm list is not updated at this moment.
> +
> + #$conf->{lock} = 'migrate';
> + #PVE::LXC::write_config($vmid, $conf);
>
> if ($self->{running}) {
> $self->log('info', "container is running - using online migration");
> @@ -152,13 +157,15 @@ sub final_cleanup {
>
> $self->log('info', "start final cleanup");
>
> - my $conf = $self->{vmconf};
> - delete $conf->{lock};
> + #see note in phase1
>
> - eval { PVE::LXC::write_config($vmid, $conf); };
> - if (my $err = $@) {
> - $self->log('err', $err);
> - }
> + #my $conf = $self->{vmconf};
> + #delete $conf->{lock};
> +
> + #eval { PVE::LXC::write_config($vmid, $conf); };
> + #if (my $err = $@) {
> + #$self->log('err', $err);
> + #}
> }
>
> 1;
> --
> 2.1.4
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list