Skip to contentSkip to conversation

Increase waiting time before first session check in kvm_test_utils.reboot

PATCH New Cao, Chen 1 participant 1 message Nov 26, 2009 KVM

lore
Share & tools
lore

Cao, Chen

author
#0 lore raw

PATCH 1/1 Increase waiting time before first session check in kvm_test_utils.reboot

Increase the sleeping time before the first check to 10 seconds, and try every 2 seconds.

But increasing these values cannot really solve the following problem:
Guest is too heavy loaded, and have no time to response the rebooting (method=shell) request, so session.is_responsive returns False, and we pass the first 'kvm_utils.wait_for';
a WHILE later the load becomes lighter, and sshd (or rss) become
responsive, whether or not is guest rebooting, here we are trying to establish a session to the guest at this point, unfortunately, we succeed and pass the second 'wait_for', before rebooting kills sshd (or rss).

---
 client/tests/kvm/kvm_test_utils.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
client/tests/kvm/kvm_test_utils.py +1 -1
index bf8aed2..e183dc6 100644
@@ -91,7 +91,7 @@ def reboot(vm, session, method="shell", sleep_before_reset=10, nic_index=0,
         logging.error("Unknown reboot method: %s" % method)
 
     # Wait for the session to become unresponsive and close it
-    if not kvm_utils.wait_for(lambda: not session.is_responsive(), 120, 0, 1):
+    if not kvm_utils.wait_for(lambda: not session.is_responsive(), 120, 10, 2):
         raise error.TestFail("Guest refuses to go down")
     session.close()
 
Signature · 1 line
1.5.5.6