Do not force live migration outside of Availability zone
If live migration tests are ran on environment with multiple AZ and destination host for live migration is chosen from different AZ then nova scheduler would stop such migration and live migration tests would fail so in the case of CONF.compute.compute_volume_common_az being set in config file, choose destination host from the same availability zone (the same happens with cinder AZ). Change-Id: I6bfad96ae3aa6cd8efd7ae2a0ce01c53140f617a
This commit is contained in:
parent
0e52b485e9
commit
6e3f99e9d4
|
@ -631,8 +631,14 @@ class BaseV2ComputeAdminTest(BaseV2ComputeTest):
|
|||
|
||||
svcs = self.os_admin.services_client.list_services(
|
||||
binary='nova-compute')['services']
|
||||
hosts = [svc['host'] for svc in svcs
|
||||
if svc['state'] == 'up' and svc['status'] == 'enabled']
|
||||
hosts = []
|
||||
for svc in svcs:
|
||||
if svc['state'] == 'up' and svc['status'] == 'enabled':
|
||||
if CONF.compute.compute_volume_common_az:
|
||||
if svc['zone'] == CONF.compute.compute_volume_common_az:
|
||||
hosts.append(svc['host'])
|
||||
else:
|
||||
hosts.append(svc['host'])
|
||||
|
||||
for target_host in hosts:
|
||||
if source_host != target_host:
|
||||
|
|
Loading…
Reference in New Issue