All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: [Qemu-devel] Re: [PATCH v3 0/5] Add QMP migration events
Date: Mon, 14 Jun 2010 09:03:40 -0500	[thread overview]
Message-ID: <4C1636BC.704@linux.vnet.ibm.com> (raw)
In-Reply-To: <m34oh8cxyn.fsf@trasno.mitica>

On 06/12/2010 06:05 AM, Juan Quintela wrote:
> Luiz Capitulino<lcapitulino@redhat.com>  wrote:
>    
>> On Thu, 10 Jun 2010 12:44:55 +0200
>> Juan Quintela<quintela@redhat.com>  wrote:
>>
>>      
>>> Luiz Capitulino<lcapitulino@redhat.com>  wrote:
>>>        
>>>> On Wed,  9 Jun 2010 14:10:53 +0200
>>>> Juan Quintela<quintela@redhat.com>  wrote:
>>>>
>>>>          
>>>>> This is a resent with what we agreed on yesterday call.
>>>>> Migration events would be there for 0.13 until we get proper
>>>>> async command support.
>>>>>            
>>>>   Something which is not clear to me is the set of events we'd have if migrate
>>>> was an async command.
>>>>
>>>>   Ie, do we really need MIGRATION_FAILED in this case? Don't we expect to get
>>>> this information from the async response?
>>>>
>>>>          
>>> I am not able to define simpler semantics for this events:
>>>        
>>   Ok, I must be missing something here.
>>
>>   First, let's talk about how async commands work today, better yet, how they
>> should work in 0.14.
>>
>>   I see two possible interfaces (off the top of my head):
>>
>>   1. QMP only returns the response when the command is finished, eg:
>>
>>      C: { "execute": "migrate", "id": "foo" ... }
>>      /* nothing is returned, other commands are issued, after several hours... */
>>      S: { "return": ... "id": "foo" }
>>
>>   2. QMP returns a response right away just to signal that the command
>>      has been accepted:
>>
>>      C: { "execute": "migrate", "id": "foo" ... }
>>      S: { "return": {}, "id": "foo" ... }
>>
>>      However, the actual response is emitted as an event:
>>
>>      S: { "event": "ASYNC_RESPONSE", "return": ..., "id": "foo" }
>>
>>
>>   That's what I have in mind, that's why I'm confused about what we're
>> trying to accomplish here.
>>      
> You continue forgeting the case that you have more than one monitor
> conected.  The other monitor will not receive _ethire_ of that
> responses.  Will not know what is happening.
>
>
>    
>>> - MIGRATION_STARTED:  somebody started a migration, it is emited on
>>>    source and target, all monitors receive this event.
>>>        
>>   The client has started the migration, it knows it. Why is the event needed?
>>      
> The monitor that did it knows it, nobody else knows it.  At destination
> time, I guess you agree this is important, i.e. the management app knows
> that migration has started.
>    

Dual monitors is a slippery slope argument because even if you had these 
events, it doesn't give you nearly enough information to implement 
anything safely.

If you truly want to support dual uncooperative monitors, you basically 
need to mirror every monitor session so that each monitor can see what 
the other monitors are doing.  You also need a transaction mechanism to 
allow a client to do operations in a non-racy way.

Since we're not likely to ever implement these things, dual monitor 
support is really not a viable argument for such a change.

> I have been needinng this for audit, knowing when guest
> start/stop/migrates.  And just now the only way to get that information
> is to "hack" qemu source code.  With migration_events it will be
> "trivial" to know when that happens.
>    

QMP is the wrong mechanism for this.  Merging the tracing code and then 
adding trace points to migration is the right solution for this problem.

>>> - MIGRATION_ENDED: migration ended with sucess, all needed data is in
>>>    target machine.  Also emitted in all monitors on source and target.
>>>
>>> - MIGRATION_CANCELED: in one of the source monitors somebody typed:
>>>    migrate_cancel.  It is only emmited on the source monitors, target
>>>    monitors will receive a MIGRATION_FAILED event.
>>>
>>> - MIGRATION_FAILED (with this error).  At this point we don't have
>>>    neither the QMP infraestructure for sending (with this error) nor
>>>    migration infrastructure to put there anything different than -1.
>>>        
>>   Aren't all the three events above duplicating the async response?
>>      
> Again, no.  Think that you have more than one monitor.
> And indeed in the case of a single monitor.  We are delaying the
> information to the target management app.
>
> MIGRATION_ENDED on target machine: We can do whatever is needed when
> migration has ended.  Async (or sync) answer to the source management
> app, it needs to receive that information + send that information to
> destination machine + receive information in destination machine + do
> whatever is needed on destination vm.
>
> Just because we refuse to give Information that we have, ready.
> I am not asking for something that is difficult to do in qemu, it is
> information that qemu knows (when migration has started/ended).  And we
> are telling management apps that they need to guess when things happens
> and use polling to know it.
>    

The problem is, all of the arguments you're using to justify this for 
the migrate command is applicable for every other command we have.  Why 
do this for migrate and not for commit or savevm?

Do we really want to introduce 4 events for every command that we support?

Regards,

Anthony Liguori

  reply	other threads:[~2010-06-14 14:03 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 12:10 [Qemu-devel] [PATCH v3 0/5] Add QMP migration events Juan Quintela
2010-06-09 12:10 ` [Qemu-devel] [PATCH v3 1/5] Exit if incoming migration fails Juan Quintela
2010-06-23  1:47   ` Anthony Liguori
2010-06-24 20:41     ` [Qemu-devel] [PATCH] win32: Add define for missing EPROTONOSUPPORT Stefan Weil
2010-06-27 20:25       ` Blue Swirl
2010-06-09 12:10 ` [Qemu-devel] [PATCH v3 2/5] Factorize common migration incoming code Juan Quintela
2010-06-09 12:10 ` [Qemu-devel] [PATCH v3 3/5] QMP: Introduce MIGRATION events Juan Quintela
2010-06-09 20:54   ` Luiz Capitulino
2010-06-10 10:33     ` [Qemu-devel] " Juan Quintela
2010-06-11 13:12       ` Luiz Capitulino
2010-06-09 12:10 ` [Qemu-devel] [PATCH v3 4/5] QMP: Emit migration events on incoming migration Juan Quintela
2010-06-09 12:10 ` [Qemu-devel] [PATCH v3 5/5] QMP: Emit migration events on outgoing migration Juan Quintela
2010-06-09 14:47 ` [Qemu-devel] [PATCH v3 0/5] Add QMP migration events Yoshiaki Tamura
2010-06-09 15:59   ` [Qemu-devel] " Juan Quintela
2010-06-09 22:07     ` Yoshiaki Tamura
2010-06-09 20:52 ` [Qemu-devel] " Luiz Capitulino
2010-06-09 21:19   ` Yoshiaki Tamura
2010-06-10 10:44   ` [Qemu-devel] " Juan Quintela
2010-06-11 14:30     ` Luiz Capitulino
2010-06-11 14:38       ` Anthony Liguori
2010-06-11 16:42         ` Luiz Capitulino
2010-06-12 11:20           ` Juan Quintela
2010-06-14 14:36             ` Luiz Capitulino
2010-06-14 15:45               ` Juan Quintela
2010-06-12 11:14         ` Juan Quintela
2010-06-14 13:58           ` Anthony Liguori
2010-06-14 14:24             ` Luiz Capitulino
2010-06-14 14:35               ` Anthony Liguori
2010-06-14 14:42                 ` Luiz Capitulino
2010-06-12 11:05       ` Juan Quintela
2010-06-14 14:03         ` Anthony Liguori [this message]
2010-06-14 16:02           ` Juan Quintela
2010-06-14 16:10             ` Anthony Liguori
2010-06-14 18:35               ` Juan Quintela
2010-06-14 19:07                 ` Anthony Liguori
2010-06-14 19:54                   ` Juan Quintela
2010-06-14 20:01                     ` Anthony Liguori
2010-06-15 10:30                       ` Juan Quintela
2010-06-15 13:40                         ` Luiz Capitulino
2010-06-15 15:24                           ` Juan Quintela
2010-06-16 18:01                             ` Luiz Capitulino
2010-06-16 19:10                               ` Juan Quintela
2010-06-17 14:23                                 ` Luiz Capitulino
2010-06-17 16:34                                   ` Juan Quintela
2010-06-17 16:45                                     ` Luiz Capitulino
2010-06-17 17:53                                       ` Anthony Liguori

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=4C1636BC.704@linux.vnet.ibm.com \
    --to=aliguori@linux.vnet.ibm.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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.