summaryrefslogtreecommitdiffstats
path: root/doctor_tests/scenario/fault_management.py
diff options
context:
space:
mode:
Diffstat (limited to 'doctor_tests/scenario/fault_management.py')
-rw-r--r--doctor_tests/scenario/fault_management.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/doctor_tests/scenario/fault_management.py b/doctor_tests/scenario/fault_management.py
index a110b88a..0271dffe 100644
--- a/doctor_tests/scenario/fault_management.py
+++ b/doctor_tests/scenario/fault_management.py
@@ -111,7 +111,10 @@ class FaultManagement(object):
server = servers.get(vm_name)
if not server:
raise Exception('Can not find instance: vm_name(%s)' % vm_name)
- host_name = server.__dict__.get('OS-EXT-SRV-ATTR:hypervisor_hostname')
+ # use hostname without domain name which is mapped to the cell
+ hostname = \
+ server.__dict__.get('OS-EXT-SRV-ATTR:hypervisor_hostname')
+ host_name = hostname.split('.')[0]
host_ip = self.installer.get_host_ip_from_hostname(host_name)
self.log.info('Get host info(name:%s, ip:%s) which vm(%s) launched at'
@@ -209,6 +212,10 @@ class FaultManagement(object):
detected = self.monitor.detected_time
notified = self.consumer.notified_time
+ if None in [vmdown, hostdown, detected, notified]:
+ self.log.info('one of the time for profiler is None, return')
+ return
+
# TODO(yujunz) check the actual delay to verify time sync status
# expected ~1s delay from $trigger to $linkdown
relative_start = linkdown