Ensure instance can migrate when launched concurrently
When we fixed the problem in If7da79356174be57481ef246618221e3b2ff8200
we forgot to modify a specific check in select_destinations().
Since _schedule() is returning the correct number of needed hosts but
we were still using the wrong number of instances to verify, the
conditional in select_destinations() was always incorrect.
Note that we needed to modify test.py and fake driver because:
- _do_check_can_live_migrate_destination was using CONF.host
- check_can_live_migrate_destination in the fake driver was
incorrectly trying to set a None value to the object while
libvirt fixed that earlier (block_migration=None when the
user specifies block_migration='auto' in the API)
- pre_live_migration in the fake driver was not returning migrate_data, which is passed through live_migration and _post_live_migration to set the migration object status
Change-Id: Iff839f3478ebe77bf3e2c4becbe9b9b62fff5035
Closes-Bug: #1718455
(cherry picked from commit 87ca0d8af0d6440a7effd4da9e47321b3a335442)
Reviewed: https:/ /review. openstack. org/508591 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=b97c433f7c2 4615a81a1342e75 fd42fe3c15e3d4
Committed: https:/
Submitter: Jenkins
Branch: stable/pike
commit b97c433f7c24615 a81a1342e75fd42 fe3c15e3d4
Author: Sylvain Bauza <email address hidden>
Date: Thu Sep 21 10:52:46 2017 +0200
Ensure instance can migrate when launched concurrently
When we fixed the problem in If7da79356174be 57481ef24661822 1e3b2ff8200 destinations( ).
we forgot to modify a specific check in select_
Since _schedule() is returning the correct number of needed hosts but destinations( ) was always incorrect.
we were still using the wrong number of instances to verify, the
conditional in select_
Note that we needed to modify test.py and fake driver because:
- _do_check_ can_live_ migrate_ destination was using CONF.host live_migrate_ destination in the fake driver was migration= None when the ='auto' in the API)
migrate_ data, which is passed through live_migration and
_post_live_ migration to set the migration object status
- check_can_
incorrectly trying to set a None value to the object while
libvirt fixed that earlier (block_
user specifies block_migration
- pre_live_migration in the fake driver was not returning
Change-Id: Iff839f3478ebe7 7bf3e2c4becbe9b 9b62fff5035 a7effd4da9e4732 1b3a335442)
Closes-Bug: #1718455
(cherry picked from commit 87ca0d8af0d6440