libvirt: Delete duplicate check when live-migrating
A year ago a useless check was added: I7989128d
The above patch was aimed to enable live-migration when
instance is booted from volume and has not local disk
by adding a new check.
However, the same check has been already checked in
_is_shared_block_storage method.
The last part of the _is_shared_block_storage method does
the same that above patch does:
- check whether the instance is booted from volume
- check whether the instance has not a local disk
Also this check calls _is_booted_from_volume incorrectly.
Parameter disk_mapping of _is_booted_from_volume must be a dict, but
this check specifies a string instead.
And finally introduced _has_local_disk method is wrong, because
it does not take into accont disk.ephN names.
This change reverts I7989128d, improves and simplifies related tests.
Reviewed: https:/ /review. openstack. org/337056 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=033d4d26896 0b18af806fdbe1b b2c1122d09782f
Committed: https:/
Submitter: Jenkins
Branch: master
commit 033d4d268960b18 af806fdbe1bb2c1 122d09782f
Author: Hiroyuki Eguchi <email address hidden>
Date: Mon Jul 4 08:14:25 2016 +0000
libvirt: Delete duplicate check when live-migrating
A year ago a useless check was added: I7989128d
The above patch was aimed to enable live-migration when
instance is booted from volume and has not local disk
by adding a new check.
However, the same check has been already checked in shared_ block_storage method.
_is_
The last part of the _is_shared_ block_storage method does
the same that above patch does:
- check whether the instance is booted from volume
- check whether the instance has not a local disk
Also this check calls _is_booted_ from_volume incorrectly. from_volume must be a dict, but
Parameter disk_mapping of _is_booted_
this check specifies a string instead.
And finally introduced _has_local_disk method is wrong, because
it does not take into accont disk.ephN names.
This change reverts I7989128d, improves and simplifies related tests.
Closes-Bug: 1598661 d94b65ab9f7c37c 33c3a08b0e0
Related-Bug: 1469006
Co-Authored-By: Feodor Tersin <email address hidden>
Change-Id: Id59012547c3318