Skip to contentSkip to conversation

Increase waiting time before first session check in kvm_test_utils.reboot

PATCH Michael Goldish 3 participants 3 messages Nov 26, 2009 – Dec 2, 2009 1 message not in the archive KVM

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 32 lines · ----- "Chen Cao

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 +0 -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(),
Quoted 3 lines

120, 0, 1):
+ if not kvm_utils.wait_for(lambda: not session.is_responsive(),
120, 10, 2):

By default, is_responsive() waits 5 secs before deciding the session is unresponsive. You can change that line to:

if not kvm_utils.wait_for(lambda: not session.is_responsive(timeout=20),

to give the session 20 secs to respond before it's deemed unresponsive. You can also make it 30. Will that be long enough?

BTW, I'm just curious -- what load is running on the guest? Why would you want to reboot while the guest is loaded?

Quoted 10 lines

raise error.TestFail("Guest refuses to go down")
session.close()

Signature · 6 lines
1.5.5.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 42 lines · Michael Goldish
Quoted 32 lines · ----- "Chen Cao

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)
becomes
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 +0 -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(),
Quoted 3 lines

120, 0, 1):
+ if not kvm_utils.wait_for(lambda: not session.is_responsive(),
120, 10, 2):

By default, is_responsive() waits 5 secs before deciding the session is unresponsive. You can change that line to:

Quoted 5 lines

if not kvm_utils.wait_for(lambda: not session.is_responsive(timeout=20),

to give the session 20 secs to respond before it's deemed unresponsive. You can also make it 30. Will that be long enough?

I think this helps, thanks.

Quoted 1 line

BTW, I'm just curious -- what load is running on the guest?

e.g.
adding benchmarks of network/floating point/others as background workload while doing live migrations.

use autoit to launch testing tools in Windows guests.

Quoted 2 lines

Why would you want to reboot while the guest is loaded?

to check if blue-screen happens when rebooting after the tests in (Windows) guest, for example.

Quoted 10 lines
Quoted 10 lines

raise error.TestFail("Guest refuses to go down")
session.close()

Signature · 6 lines
1.5.5.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 4 lines
Cao, Chen

GnuPG Key-ID:AC54E05E
keyserver hkp://keys.gnupg.net
#3 lore raw

Ok, as discussed on this thread, following Michael's suggestion, I increased the time needed to rule a session as unresponsive from the default 5 seconds to 30 seconds.

http://autotest.kernel.org/changeset/3987

This ought to be enough, if it isn't, let me know Chen!

Quoted 86 lines · Chen
Quoted 42 lines · Michael Goldish
Quoted 32 lines · ----- "Chen Cao

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) becomes
    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 +0 -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(),
Quoted 3 lines

120, 0, 1):
+    if not kvm_utils.wait_for(lambda: not session.is_responsive(), 120, 10, 2):

By default, is_responsive() waits 5 secs before deciding the session is unresponsive.  You can change that line to:

Quoted 5 lines

if not kvm_utils.wait_for(lambda: not session.is_responsive(timeout=20),

to give the session 20 secs to respond before it's deemed unresponsive. You can also make it 30.  Will that be long enough?

I think this helps, thanks.

Quoted 1 line

BTW, I'm just curious -- what load is running on the guest?

e.g.
adding benchmarks of network/floating point/others as background workload while doing live migrations.

use autoit to launch testing tools in Windows guests.

Quoted 2 lines

Why would you want to reboot while the guest is loaded?

to check if blue-screen happens when rebooting after the tests in (Windows) guest, for example.

Quoted 10 lines
Quoted 10 lines

         raise error.TestFail("Guest refuses to go down") session.close()

--
1.5.5.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Cao, Chen

GnuPG Key-ID:AC54E05E
keyserver hkp://keys.gnupg.net
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Signature · 1 line
Lucas