Skip to content

Commit

Permalink
Merge pull request avocado-framework#2389 from sathnaga/hotplug_timeout
Browse files Browse the repository at this point in the history
Add timeout to retry until vcpu hotplug check fails
  • Loading branch information
Satheesh Rajendran authored Feb 18, 2020
2 parents ce5203c + f9489e7 commit 1623468
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion virttest/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,11 @@ def check_vcpu_value(vm, exp_vcpu, vcpupin=None, option="", guest_agent=False):
final_result = False

if vm.is_alive() and (not vm.is_paused()) and "live" in option:
vcpu_hotplug_timeout = 120 # maximum time to wait for a hotplug event to complete
# 1.5 Check inside the guest
if not check_if_vm_vcpu_match(exp_vcpu['guest_live'], vm):
if not utils_misc.wait_for(lambda: check_if_vm_vcpu_match(exp_vcpu['guest_live'],
vm),
vcpu_hotplug_timeout, text="wait for vcpu online"):
final_result = False
# 1.6 Check guest numa
if not guest_numa_check(vm, exp_vcpu):
Expand Down

0 comments on commit 1623468

Please sign in to comment.