Make migration RPC non-blocking
authorAndrea Spadaccini <spadaccio@google.com>
Thu, 22 Sep 2011 18:19:07 +0000 (19:19 +0100)
committerAndrea Spadaccini <spadaccio@google.com>
Thu, 29 Sep 2011 09:41:44 +0000 (10:41 +0100)
commit6a1434d7cdb5df75a98cc0a364e78f1a4c86bba6
treee259bc748f9756e59780f56e13cf81ed52e303de
parentf8326fcaac87958241d78526e5868d23d78ac286
Make migration RPC non-blocking

To add status reporting for the KVM migration, the instance_migrate RPC
must be non-blocking. Moreover, there must be a way to represent the
migration status and a way to fetch it.

* constants.py:
  - add constants representing the migration statuses

* objects.py:
  - add the MigrationStatus object

* hypervisor/hv_base.py
  - change the FinalizeMigration method name to FinalizeMigrationDst
  - add the FinalizeMigrationSource method
  - add the GetMigrationStatus method

* hypervisor/hv_kvm.py
  - change the implementation of MigrateInstance to be non-blocking
    (i.e. do not poll the status of the migration)
  - implement the new methods defined in BaseHypervisor

* backend.py, server/noded.py, rpc.py
  - add methods to call the new hypervisor methods
  - fix documentation of the existing methods to reflect the changes

* cmdlib.py
  - adapt the logic of TLMigrateInstance._ExecMigration to reflect
    the changes

Signed-off-by: Andrea Spadaccini <spadaccio@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/backend.py
lib/cmdlib.py
lib/constants.py
lib/hypervisor/hv_base.py
lib/hypervisor/hv_kvm.py
lib/objects.py
lib/rpc.py
lib/server/noded.py