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>
Showing
- lib/backend.py 43 additions, 3 deletionslib/backend.py
- lib/cmdlib.py 55 additions, 10 deletionslib/cmdlib.py
- lib/constants.py 21 additions, 0 deletionslib/constants.py
- lib/hypervisor/hv_base.py 28 additions, 2 deletionslib/hypervisor/hv_base.py
- lib/hypervisor/hv_kvm.py 43 additions, 28 deletionslib/hypervisor/hv_kvm.py
- lib/objects.py 11 additions, 0 deletionslib/objects.py
- lib/rpc.py 39 additions, 2 deletionslib/rpc.py
- lib/server/noded.py 20 additions, 3 deletionslib/server/noded.py
Loading
Please register or sign in to comment