qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/3] UUID validation during migration
@ 2019-09-03 16:22 Yury Kotov
  2019-09-03 16:22 ` [Qemu-devel] [PATCH v2 1/3] migration: Add validate-uuid capability Yury Kotov
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Yury Kotov @ 2019-09-03 16:22 UTC (permalink / raw)
  To: Dr. David Alan Gilbert, Eric Blake, Juan Quintela,
	Laurent Vivier, Markus Armbruster, Paolo Bonzini, Thomas Huth,
	Daniel P. Berrangé
  Cc: qemu-devel, yc-core

Hi,

V2:
* Remove x- prefix from capability name
* Fix expected status checking
* Fix description of capability

This series adds an UUID validation at the start of the migration
on the target side. The idea is to identify the source of migration.

Possible case of problem:
1. There are 3 servers: A, B and C
2. Server A has a VM 1, server B has a VM 2
3. VM 1 and VM 2 want to migrate to the server C
4. Target of VM 1 starts on the server C and dies too quickly for some reason
5. Target of VM 2 starts just after that and listen the same tcp port X, which
   the target of VM 1 wanted to use
6. Source of VM 1 connects to the tcp port X, and migrates to VM 2 source
7. It's possible that migration might be successful (e.g., devices are the same)
8. So, the target of VM 2 is in undefined state

The series adds a capability to prevent successful (by mistake) migration.

The new capability validate-uuid only affects the source so that it sends
its UUID to the target. The target will validate the received UUID and stop
the migration if UUIDs are not equal.

Regards,
Yury

Yury Kotov (3):
  migration: Add validate-uuid capability
  tests/libqtest: Allow setting expected exit status
  tests/migration: Add a test for validate-uuid capability

 migration/migration.c  |   9 +++
 migration/migration.h  |   1 +
 migration/savevm.c     |  45 +++++++++++++
 qapi/migration.json    |   5 +-
 tests/libqtest.c       |  36 ++++++-----
 tests/libqtest.h       |   9 +++
 tests/migration-test.c | 140 ++++++++++++++++++++++++++++++++---------
 7 files changed, 199 insertions(+), 46 deletions(-)

-- 
2.17.1



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

end of thread, other threads:[~2019-09-12 10:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03 16:22 [Qemu-devel] [PATCH v2 0/3] UUID validation during migration Yury Kotov
2019-09-03 16:22 ` [Qemu-devel] [PATCH v2 1/3] migration: Add validate-uuid capability Yury Kotov
2019-09-11  9:15   ` Dr. David Alan Gilbert
2019-09-03 16:22 ` [Qemu-devel] [PATCH v2 2/3] tests/libqtest: Allow setting expected exit status Yury Kotov
2019-09-04  4:19   ` Thomas Huth
2019-09-11  9:46   ` Dr. David Alan Gilbert
2019-09-03 16:22 ` [Qemu-devel] [PATCH v2 3/3] tests/migration: Add a test for validate-uuid capability Yury Kotov
2019-09-11 10:02   ` Dr. David Alan Gilbert
2019-09-12 10:20 ` [Qemu-devel] [PATCH v2 0/3] UUID validation during migration Dr. David Alan Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).