From 5f8aed55572061a1b5614252578cb47d075113ca Mon Sep 17 00:00:00 2001 From: Dmitry Belyaninov Date: Thu, 17 Nov 2016 12:46:14 +0000 Subject: [PATCH] Check compute state before migration Novaclient returns list of hypervisors. We should check state to discard deleted or disabled (unavailable) compute nodes for instance migration. Change-Id: I319076e637162d99d33d0f69911ac426d1e08258 Closes-Bug: 1604749 --- fuel_health/nmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuel_health/nmanager.py b/fuel_health/nmanager.py index 20a39bd1..74e5a039 100644 --- a/fuel_health/nmanager.py +++ b/fuel_health/nmanager.py @@ -925,7 +925,7 @@ class NovaNetworkScenarioTest(OfficialClientTest): for host in available_hosts: hostname = host.service.get('host') if host.hypervisor_type != 'VMware vCenter Server' and \ - hostname != current_host: + host.state == 'up' and hostname != current_host: return hostname def migrate_instance(self, instance, host_to):