[PATCH v3 00/10] migration: Better error handling in rp thread, allow failures in recover

Peter Xu posted 10 patches 7 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231004220240.167175-1-peterx@redhat.com
Maintainers: Juan Quintela <quintela@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Leonardo Bras <leobras@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
There is a newer version of this series
qapi/migration.json          |   5 +-
migration/migration.h        |  21 +++-
migration/qemu-file.h        |   1 +
migration/ram.h              |   5 +-
migration/migration.c        | 206 ++++++++++++++++++++++-------------
migration/qemu-file.c        |  17 ++-
migration/ram.c              |  76 +++++++------
migration/savevm.c           |   3 +-
tests/qtest/migration-test.c |  94 ++++++++++++++++
migration/trace-events       |   4 +-
10 files changed, 312 insertions(+), 120 deletions(-)
[PATCH v3 00/10] migration: Better error handling in rp thread, allow failures in recover
Posted by Peter Xu 7 months, 1 week ago
v3:
- Rebase to master after majority of Fabiano's series merged
- Dropped patch 2: "migration: Let migrate_set_error() take ownership"
  (When looking again, I'm not happy with neither that of my patch nor
   current code.  But in that case I prefer change nothing rather than
   changing from one ugly to another)
- Dropped a few Fabiano's R-b due to either rebase (return path thread now
  is recycled when pausing postcopy) or additional error_free() after I
  dropped patch 2

v1: https://lore.kernel.org/r/20230829214235.69309-1-peterx@redhat.com
v2: https://lore.kernel.org/r/20230912222145.731099-1-peterx@redhat.com

This series allow better error handling in the postcopy return path thread,
so that we'll start to store the errors in MigrationState and can be seen
from query-migrate later, comparing to before where we do error_report()
and never remember the error.

Meanwhile, it allows double-failures to happen during postcopy recovery,
IOW, one can fail again right during RECOVER phase on both sides, even if
RECOVER phase should be an extremely small window.

Please have a look, thanks.

Fabiano Rosas (1):
  tests/migration-test: Add a test for postcopy hangs during RECOVER

Peter Xu (9):
  migration: Display error in query-migrate irrelevant of status
  migration: Introduce migrate_has_error()
  migration: Refactor error handling in source return path
  migration: Deliver return path file error to migrate state too
  qemufile: Always return a verbose error
  migration: Remember num of ramblocks to sync during recovery
  migration: Add migration_rp_wait|kick()
  migration: Allow network to fail even during recovery
  migration: Allow RECOVER->PAUSED convertion for dest qemu

 qapi/migration.json          |   5 +-
 migration/migration.h        |  21 +++-
 migration/qemu-file.h        |   1 +
 migration/ram.h              |   5 +-
 migration/migration.c        | 206 ++++++++++++++++++++++-------------
 migration/qemu-file.c        |  17 ++-
 migration/ram.c              |  76 +++++++------
 migration/savevm.c           |   3 +-
 tests/qtest/migration-test.c |  94 ++++++++++++++++
 migration/trace-events       |   4 +-
 10 files changed, 312 insertions(+), 120 deletions(-)

-- 
2.41.0