Re: [PATCH] virt.kvm_monitor: Future proof migration handling on QMP monitor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 22 Aug 2012 11:43:38 -0300
Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx> wrote:

> With d46ad35c74, the exception handling for migrations
> happening when using a single QMP monitor relies on
> an exception class that's going to disappear in future
> versions of QEMU, being replaced by the GenericError
> class. So let's also handle this exception class.
> 
> CC: Luiz Capitulino <lcapitulino@xxxxxxxxxx>
> Signed-off-by: Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx>
> ---
>  client/virt/kvm_monitor.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/client/virt/kvm_monitor.py b/client/virt/kvm_monitor.py
> index 9d8ed87..932725b 100644
> --- a/client/virt/kvm_monitor.py
> +++ b/client/virt/kvm_monitor.py
> @@ -1155,7 +1155,7 @@ class QMPMonitor(Monitor):
>          try:
>              return self.cmd("migrate", args)
>          except QMPCmdError, e:
> -            if e.data['class'] == 'SockConnectInprogress':
> +            if e.data['class'] in ['SockConnectInprogress', 'GenericError']:
>                  logging.debug("Migrate socket connection still initializing...")
>              else:
>                  raise e

Patch looks correct now. There's only one small detail that I forgot
telling you in the previous email (sorry!).

The SockConnectInprogress shouldn't be returned by qemu. Actually, migration
works most of the time this error is returned. That error was being used to
communicate a special condition in qemu that was handled internally, however,
due to a bug, the error ended up being propagated up and returned as a qmp
response.

This was fixed in qemu.git for 1.2. But this patch made me check this issue
for 1.1 and it seems to exist there too, which means my fix has to be
backported to -stable.

There's no problem keeping this patch as is though.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux