update for timeouts longer in faults, reduce false negatives

Change-Id: I634192ddb8addb9a364edba46118b8c90bec3395
This commit is contained in:
pinikomarov 2020-07-09 02:26:10 +03:00
parent 72743ec8d2
commit 9144b5c628
3 changed files with 10 additions and 7 deletions

View File

@ -258,16 +258,18 @@ def check_iha_evacuation(failover_type=None, vm_type=None):
LOG.info(f'perform a failover on {compute_host}') LOG.info(f'perform a failover on {compute_host}')
evac_failover_compute(compute_host, failover_type=failover_type) evac_failover_compute(compute_host, failover_type=failover_type)
test_cloud_recovery.overcloud_health_checks(passive_checks_only=True) test_cloud_recovery.overcloud_health_checks(passive_checks_only=True)
vms_new_state_df = nova.get_compute_vms_df(compute_host)
if vm_type == 'evac_image_vm': if vm_type == 'evac_image_vm':
nova.check_vm_evacuations(vms_df_old=org_nova_evac_df, nova.check_vm_evacuations(vms_df_old=org_nova_evac_df,
vms_df_new=vms_new_state_df, compute_host=compute_host,
timeout=600,
check_no_evacuation=True) check_no_evacuation=True)
new_nova_evac_df = nova.vm_df(evac_vm_id, nova.get_vms_table()) new_nova_evac_df = nova.vm_df(evac_vm_id, nova.get_vms_table())
nova.check_vm_evacuations(org_nova_evac_df, new_nova_evac_df) nova.check_vm_evacuations(org_nova_evac_df, new_nova_evac_df)
else:
nova.check_vm_evacuations(vms_df_old=vms_starting_state_df,
compute_host=compute_host,
timeout=600)
LOG.info('check evac is Done') LOG.info('check evac is Done')
nova.check_vm_evacuations(vms_df_old=vms_starting_state_df,
vms_df_new=vms_new_state_df)
nova.check_df_vms_ping(vms_starting_state_df) nova.check_df_vms_ping(vms_starting_state_df)

View File

@ -14,7 +14,7 @@ from tobiko.openstack import nova
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
def check_nova_services_health(timeout=120, interval=2): def check_nova_services_health(timeout=600, interval=2):
failures = [] failures = []
start = time.time() start = time.time()
@ -154,7 +154,7 @@ def vm_location(vm_id, vms_df):
index=False) index=False)
def check_vm_evacuations(vms_df_old=None, vms_df_new=None, timeout=120, def check_vm_evacuations(vms_df_old=None, compute_host=None, timeout=600,
interval=2, check_no_evacuation=False): interval=2, check_no_evacuation=False):
"""check evacuation of vms """check evacuation of vms
input: old and new vms_state_tables dfs""" input: old and new vms_state_tables dfs"""
@ -163,6 +163,7 @@ def check_vm_evacuations(vms_df_old=None, vms_df_new=None, timeout=120,
while time.time() - start < timeout: while time.time() - start < timeout:
failures = [] failures = []
vms_df_new = get_compute_vms_df(compute_host)
for vm_id in vms_df_old.vm_id.to_list(): for vm_id in vms_df_old.vm_id.to_list():
old_bm_host = vm_location(vm_id, vms_df_old) old_bm_host = vm_location(vm_id, vms_df_old)
new_vm_host = vm_location(vm_id, vms_df_new) new_vm_host = vm_location(vm_id, vms_df_new)

View File

@ -113,7 +113,7 @@ class OvercloudProcessesStatus(object):
:return: Bool :return: Bool
""" """
for attempt_number in range(120): for attempt_number in range(600):
try: try: