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

Re: [libvirt] [PATCH V6] support offline migration



On Tue, Sep 11, 2012 at 09:33:32AM -0600, Eric Blake wrote:
> On 09/11/2012 08:35 AM, Daniel P. Berrange wrote:
> >>
> >> Do we really need a new user-visible flag, or can we make this work
> >> automatically without having to involve the user?
> >> On the other hand, what happens if we do keep this as a user-visible
> >> flag?  Should 'virsh migrate --offline' silently ignore the flag if the
> >> guest is online, or should it error out stating that the guest is
> >> running and not offline?
> >>
> >> Also, I think we NEED to error out if the guest is offline but the
> >> --persistent flag is not set; that is, an offline migration only makes
> >> sense if the persistent flag has been requested, but I think that 'virsh
> >> migrate --persistent' should automatically be smart enough to do an
> >> offline migration.
> > 
> > No we must not do that. If a guest has shutoff we cannot assume that
> > the user / app wants to copy it across to the other host. eg consider
> > this scenario
> > 
> >   admin a: check if guestfoo is running
> >   admin b: check if guestfoo is running
> >   admin a: migrate guestfoo barhost
> >   admin b: migrate guestfoo wizzhost
> > 
> > IMHO step 4 should fail unless the admin explicitly requested
> > that they want to copy across the offline config
> 
> Good point - the new flag is necessary, and must be user-visible.  At
> which point, do we argue that use of the MIGRATE_OFFLINE flag
> automatically implies MIGRATE_PERSISTENT, or should it be an error
> unless the user explicitly requests both flags?

It sort of depends what you consider the semantics of MIGRATE_OFFLINE to
be. You can consider it to be a flag indicating that the guest must be
in the shutoff state curently, or you can consider it to be a
permission flag to indicate that migration is allowed if the guest
is offline. The difference here is subtle - basically comes down
to whether you raise an error if OFFLINE is set, and the guest is
currently running.

In the case where you consider it a permission flag (which is what is
currently implemented), then we must mandate use of the PERSISTENT
flag, otherwise you get wierd semantics. eg The persistent config would
not be copied if running, but would be copied if shutoff.

If you consider it a state flag, then I don't think it matters so much,
though I would still prefer to see the MIGRATE_PERSISTENT flag specified
explicitly. It would let you deal with a case where you have a shutoff
guest, and you migrate the storage (using the appropriate flag) but do
not migrate the config.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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