All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Ashijeet Acharya <ashijeetacharya@gmail.com>,
	thuth@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] migrate: Migration aborts abruptly for machine "none"
Date: Fri, 27 Jan 2017 09:46:13 +0000	[thread overview]
Message-ID: <20170127094613.GA3323@work-vm> (raw)
In-Reply-To: <20170127093742.GB26553@redhat.com>

* Daniel P. Berrange (berrange@redhat.com) wrote:
> On Thu, Jan 26, 2017 at 02:46:52PM +0530, Ashijeet Acharya wrote:
> > Migration of a "none" machine with no RAM crashes abruptly as
> > bitmap_new() fails and thus aborts. Instead, place a check for
> > last_ram_offset() being '0' at the start of ram_save_setup() and
> > error out with a meaningful error message.
> > 
> > Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com>
> > ---
> >  migration/ram.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/migration/ram.c b/migration/ram.c
> > index ef8fadf..bf05d69 100644
> > --- a/migration/ram.c
> > +++ b/migration/ram.c
> > @@ -1947,6 +1947,11 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
> >  {
> >      RAMBlock *block;
> >  
> > +    if (last_ram_offset() == 0) {
> > +        error_report("Failed to migrate: No RAM available!");
> > +        return -1;
> > +    }
> > +
> 
> If we're merely going to block migration, as opposed to making it work,
> then IMHO we should use migration blockers registered at machine setup
> for this task.
> 
> We have a new cli arg added to QEMU to tell it to abort startup if the
> machine configuration is not migratable. That only works if using
> migration blockers - this check you've added is too late to be detected
> at startup.

Hmm, yes you're right, that would be better.
Although it does lead to an interesting situation where starting with a 'none'
and constructing it component at a time would get rejected by --only-migratable
even though the final construction is fine.

Dave

> 
> Regards,
> Daniel
> -- 
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2017-01-27  9:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26  9:16 [Qemu-devel] [PATCH] migrate: Migration aborts abruptly for machine "none" Ashijeet Acharya
2017-01-26 11:25 ` Kashyap Chamarthy
2017-01-26 19:41 ` Dr. David Alan Gilbert
2017-01-27  9:37 ` Daniel P. Berrange
2017-01-27  9:46   ` Dr. David Alan Gilbert [this message]
2017-01-27  9:57     ` Daniel P. Berrange
2017-01-27  9:52   ` Ashijeet Acharya
2017-01-27  9:57     ` Daniel P. Berrange
2017-01-28 18:41 ` Greg Kurz
2017-01-28 19:36   ` Ashijeet Acharya
2017-01-29 13:03     ` Greg Kurz
2017-01-29 13:19       ` Ashijeet Acharya
2017-01-30 20:48         ` Paolo Bonzini
2017-02-01 17:53           ` Ashijeet Acharya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170127094613.GA3323@work-vm \
    --to=dgilbert@redhat.com \
    --cc=ashijeetacharya@gmail.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.