From patchwork Wed Aug 22 14:43:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 1361551 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9EAC0DF280 for ; Wed, 22 Aug 2012 14:43:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932623Ab2HVOns (ORCPT ); Wed, 22 Aug 2012 10:43:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35579 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756491Ab2HVOnq (ORCPT ); Wed, 22 Aug 2012 10:43:46 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7MEhkLD002695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 22 Aug 2012 10:43:46 -0400 Received: from freedom.redhat.com (vpn1-6-85.gru2.redhat.com [10.97.6.85]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7MEhdWS006752; Wed, 22 Aug 2012 10:43:40 -0400 From: Lucas Meneghel Rodrigues To: autotest-kernel@redhat.com Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues , Luiz Capitulino Subject: [PATCH] virt.kvm_monitor: Future proof migration handling on QMP monitor Date: Wed, 22 Aug 2012 11:43:38 -0300 Message-Id: <1345646618-7522-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 Signed-off-by: Lucas Meneghel Rodrigues --- 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