[pve-devel] [PATCH qemu-server 1/2] Fix #1441: Do not unplug controllers when the mirroring is finished
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Aug 24 07:05:35 CEST 2017
On 08/23/2017 07:15 PM, Alexandre DERUMIER wrote:
> for me, this patch is ok.
>
> if the job is complete, we don't need to unplug. (and that mean that vm need to support unplug too, we can't be sure that guest support this).
>
> Is it possible that the problem was the previous bug with unix socket, were the target vm was not paused after migration ?
>
Could be possible.
Looking at the qemu-server and qemu source Emmanuel's patch seems, in fact, valid.
All mirror block jobs are finished at this point, we do a "nbd-server-stop" on,
the target which disconnects all NBD clients, as everything from the source side
using NBD is mirrored, flushed and happy this should not run into a problem there.
Same for qemu's do_vm_stop, which drains and flushes all remaining blockjobs (which
there shouldn't be any a this point, else we would have mirrored/migrated an unclean
state?!)
I'd still wait for Wolfgang B.'s opinion on this, he knows far more on the topic.
>
> ----- Mail original -----
> De: "e kasper" <e.kasper at proxmox.com>
> À: "pve-devel" <pve-devel at pve.proxmox.com>
> Envoyé: Mercredi 23 Août 2017 12:41:52
> Objet: Re: [pve-devel] [PATCH qemu-server 1/2] Fix #1441: Do not unplug controllers when the mirroring is finished
>
> Any feedback on this ?
> The current status of local migration with ide disks if quite ugly at
> the moment, as the source VM hangs suspended and locked when reaching
> the unplug step, since IDE disks do not hotplug.
>
> If we prefer to have the disk unplugging around, then we should exclude
> VMs with ide disks from local storage migration.
>
> On 07/27/2017 02:32 PM, Emmanuel Kasper wrote:
>> This should not be needed since we call 'block-job-complete' before
>> in qemu_drive_mirror_monitor(), and after benchmarking it does not
>> appear to be needed nor provide a measurable improvement when shutting
>> down the source.
>> ---
>> PVE/QemuMigrate.pm | 5 -----
>> 1 file changed, 5 deletions(-)
>>
>> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
>> index f995584..ac2884b 100644
>> --- a/PVE/QemuMigrate.pm
>> +++ b/PVE/QemuMigrate.pm
>> @@ -892,11 +892,6 @@ sub phase3_cleanup {
>>
>> if ($self->{livemigration}) {
>> if ($self->{storage_migration}) {
>> - # remove drives referencing the nbd server from source
>> - # otherwise vm_stop might hang later on
>> - foreach my $drive (keys %{$self->{target_drive}}){
>> - PVE::QemuServer::vm_mon_cmd_nocheck($vmid, "device_del", id => $drive);
>> - }
>> # stop nbd server on remote vm - requirement for resume since 2.9
>> my $cmd = [@{$self->{rem_ssh}}, 'qm', 'nbdstop', $vmid];
>>
>>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
More information about the pve-devel
mailing list