All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 00/22]: QMP: Convert savevm/loadvm/delvm
@ 2010-04-20 21:09 Luiz Capitulino
  2010-04-20 21:09 ` [Qemu-devel] [PATCH 01/22] QMP: Introduce RESUME event Luiz Capitulino
                   ` (22 more replies)
  0 siblings, 23 replies; 53+ messages in thread
From: Luiz Capitulino @ 2010-04-20 21:09 UTC (permalink / raw)
  To: qemu-devel, armbru, quintela, kwolf

 Hi there,

 Libvirt has a new snapshot API which uses savevm, loadvm and delvm, so we
need to convert them to QMP.

 I thought this wouldn't be difficult, but while doing and testing this work
I hit a number of problems and had to made not so easy decisions.

 Most of the time, the problem is that the handler implementation is not
as consistent as it should be. Usually, this doesn't affect users very much
but the headache begins when you have to make this available under QMP.

 Here goes a list of macro issues/decisions. Details (and other small problems)
in the patches.

   1. Multiple failures: do_delvm() and do_savevm() report errors in a
      QTAILQ_FOREACH() loop and they don't return when an error happens.

      Although QMP will end up reporting only the first error, this is
      considered a bug because handlers are not expected to continue
      executing when an error happens.

      There are two solutions:

            1) Return right away in the first error
            2) Identify fatal errors and only report those

      I don't know the implications of doing 1) and don't know how to
      to do 2) (although do_loadvm() works this way).

      Can someone from the block layer help here?

   2. ID vs. TAG: all the three commands accept only one parameter, called
      'name'. This is automagically interpreted as either a TAG name or an
      ID number.

      QMP is machine-like, so it's boring and cold, meaning that this kind
      of automatic stuff is not good. If we want something to be an ID, we
      have to be able to say 'this must be an ID', if it can't, it should
      just fail.

      So, I considered adding new optional parameters 'tag' and 'id', but
      soon I realized that this is not as easy as it seems, as it's also
      needed to change the qcow2 driver plus refactorings..

      Markus, I'm willing to live with 'name', are you ok with that?

   3. Exposing errno macro names: several error functions print errno codes,
      while it's debatable if this is good or not, we just can't create a
      QError for every single possible error.

      So, my solution for this is to expose names instead of codes.

      For example, this error:

        "Error -5 while writing VM"

      Becomes:

        "Failed to save VM state (EIO)"

      Of course this is also available under QMP.

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2010-05-11 22:40 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-20 21:09 [Qemu-devel] [RFC 00/22]: QMP: Convert savevm/loadvm/delvm Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 01/22] QMP: Introduce RESUME event Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 02/22] savevm: Don't check the return of qemu_fopen_bdrv() Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 03/22] savevm: Introduce delete_snapshot() and use it Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 04/22] savevm: do_loadvm(): Always resume the VM Luiz Capitulino
2010-04-20 21:28   ` [Qemu-devel] " Juan Quintela
2010-04-20 21:59     ` Luiz Capitulino
2010-04-21  8:36       ` Juan Quintela
2010-04-21 14:54         ` Luiz Capitulino
2010-04-21 15:39           ` Juan Quintela
2010-04-21 15:42             ` Kevin Wolf
2010-04-22 13:33               ` Luiz Capitulino
2010-04-21 13:28   ` Kevin Wolf
2010-04-21 15:08     ` Luiz Capitulino
2010-04-21 15:27       ` Kevin Wolf
2010-04-21 15:47         ` Juan Quintela
2010-04-21 15:45       ` Juan Quintela
2010-04-21 17:50         ` Jamie Lokier
2010-04-20 21:09 ` [Qemu-devel] [PATCH 05/22] savevm: load_vmstate(): Return 'ret' on error Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 06/22] savevm: load_vmstate(): Improve error check Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string() Luiz Capitulino
2010-04-21  8:28   ` Daniel P. Berrange
2010-04-21 13:38     ` Kevin Wolf
2010-04-21 14:42       ` malc
2010-04-21 15:12         ` Luiz Capitulino
2010-04-21 15:15           ` Daniel P. Berrange
2010-04-21 15:29             ` Luiz Capitulino
2010-04-21 17:13             ` Markus Armbruster
2010-04-22 13:44               ` Luiz Capitulino
2010-05-03 18:00     ` Anthony Liguori
2010-05-10 17:50       ` Markus Armbruster
2010-05-11 22:36       ` Jamie Lokier
2010-04-20 21:09 ` [Qemu-devel] [PATCH 08/22] QError: New QERR_SNAPSHOT_NO_DEVICE Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 09/22] QError: New QERR_SNAPSHOT_DELETE_FAILED Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 10/22] QError: New QERR_SNAPSHOT_CREATE_FAILED Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 11/22] QError: New QERR_SNAPSHOT_ACTIVATE_FAILED Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 12/22] QError: New QERR_STATEVM_SAVE_FAILED Luiz Capitulino
2010-04-20 21:31   ` [Qemu-devel] " Juan Quintela
2010-04-20 22:02     ` Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 13/22] QError: New QERR_STATEVM_LOAD_FAILED Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 14/22] QError: New QERR_DEVICE_NO_SNAPSHOT Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 15/22] QError: New QERR_SNAPSHOT_NOT_FOUND Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 16/22] savevm: Convert delete_snapshot() to QError Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 17/22] savevm: delete_snapshot(): Remove unused parameter Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 18/22] savevm: Convert do_delvm() to QObject, QError Luiz Capitulino
2010-04-21 14:18   ` [Qemu-devel] " Kevin Wolf
2010-04-22 13:48     ` Luiz Capitulino
2010-04-22 14:31       ` Kevin Wolf
2010-04-20 21:09 ` [Qemu-devel] [PATCH 19/22] savevm: Convert do_savevm() to QError Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 20/22] savevm: Convert do_savevm() to QObject Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 21/22] savevm: Convert do_loadvm() to QError Luiz Capitulino
2010-04-20 21:09 ` [Qemu-devel] [PATCH 22/22] savevm: Convert do_loadvm() to QObject Luiz Capitulino
2010-04-20 21:41 ` [Qemu-devel] Re: [RFC 00/22]: QMP: Convert savevm/loadvm/delvm Juan Quintela

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.