Fix type error in kvm/GetMigrationStatus
authorIustin Pop <iustin@google.com>
Mon, 12 Nov 2012 11:50:52 +0000 (12:50 +0100)
committerIustin Pop <iustin@google.com>
Mon, 12 Nov 2012 13:13:58 +0000 (14:13 +0100)
commit62457f51f89675c118d57dbdc096d8c13ed0c5ff
treefa178f44615145b56d233ef807e4b68432172fe4
parenta4c0fe1e147840f24b5f866e4ebbc7e3bf71cd87
Fix type error in kvm/GetMigrationStatus

Commit 6a1434d7 (“Make migration RPC non-blocking”) changed from
raising HypervisorErrors to returning MigrationStatus
objects. However, these objects don't have an "info" attribute, so
they can't pass a reason back (which is in itself a bug); but the KVM
hypervisor code attempts to do so, and fails at runtime with:

  Failed to get migration status: 'MigrationStatus' object has no attribute 'info'

instead of the intended:

  Migration failed, aborting: too many broken 'info migrate' answers

For now (on stable-2.6), let's just remove the "info" reason, and
later we can add it back properly once we have a way to correctly
represent migration status failures in the LU.

This fixes issue 297.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
lib/hypervisor/hv_kvm.py