From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57222 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGzFD-0003Iy-S5 for qemu-devel@nongnu.org; Tue, 25 May 2010 14:52:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGzFC-0005sW-5y for qemu-devel@nongnu.org; Tue, 25 May 2010 14:52:51 -0400 Received: from mail-qy0-f198.google.com ([209.85.221.198]:54349) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGzFC-0005sS-3o for qemu-devel@nongnu.org; Tue, 25 May 2010 14:52:50 -0400 Received: by qyk36 with SMTP id 36so7359359qyk.19 for ; Tue, 25 May 2010 11:52:49 -0700 (PDT) Message-ID: <4BFC1C7E.90803@codemonkey.ws> Date: Tue, 25 May 2010 13:52:46 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 1/5] Exit if incoming migration fails References: <889abbffe3359f5160234e580cb663ec6189174e.1274796992.git.quintela@redhat.com> <20100525150157.6c8d1599@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org, Luiz Capitulino On 05/25/2010 01:37 PM, Juan Quintela wrote: > Luiz Capitulino wrote: > >> On Tue, 25 May 2010 16:21:01 +0200 >> Juan Quintela wrote: >> >> >>> Signed-off-by: Juan Quintela >>> --- >>> migration.c | 16 ++++++++++------ >>> migration.h | 2 +- >>> vl.c | 7 ++++++- >>> 3 files changed, 17 insertions(+), 8 deletions(-) >>> >>> > >> While I agree on the change, I have two comments: >> >> 1. By taking a look at the code I have the impression that most of the >> fun failures will happen on the handler passed to qemu_set_fd_handler2(), >> do you agree? Any plan to address that? >> > That is outgoing migration, not incoming migration. > Incoming migration in synchronous.. > > > >> 1. Is exit()ing the best thing to be done? I understand it's the easiest >> and maybe better than nothing, but wouldn't it be better to enter in >> paused-forever state so that clients can query and decide what to do? >> > For incoming migration, if it fails in the middle, every bet is off. > You are in a really inconsistent state, not sure which one, and if > migration was live, with the other host possibly retaking the disks to > continue. > I agree that exiting is the only sane behavior for the destination. Regards, Anthony Liguori > In some cases, you can't do anything: > - you got passed an fd, and fd got closed/image corrupted/... > - you got passed an exec command like "exec: gzip -d< foo.gz" > If gzip failed once, it will fail forever. > > If you are running it by hand, cursor up + enter, and you are back > If you are using a management application, it is going to be easier to > restart the process that trying to cleanup everything. > > Experience shows that people really tries to do weird things when > machine is in this state. > > Later, Juan. > >