qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PULL 09/12] tests/vm: Set UseDNS=no in the sshd configuration
Date: Tue,  6 Feb 2024 11:43:44 +0100	[thread overview]
Message-ID: <20240206104347.238825-10-thuth@redhat.com> (raw)
In-Reply-To: <20240206104347.238825-1-thuth@redhat.com>

From: Ilya Leoshkevich <iii@linux.ibm.com>

make vm-build-freebsd sometimes fails with "Connection timed out during
banner exchange". The client strace shows:

    13:59:30 write(3, "SSH-2.0-OpenSSH_9.3\r\n", 21) = 21
    13:59:30 getpid()                       = 252655
    13:59:30 poll([{fd=3, events=POLLIN}], 1, 5000) = 1 ([{fd=3, revents=POLLIN}])
    13:59:32 read(3, "S", 1)                = 1
    13:59:32 poll([{fd=3, events=POLLIN}], 1, 3625) = 1 ([{fd=3, revents=POLLIN}])
    13:59:32 read(3, "S", 1)                = 1
    13:59:32 poll([{fd=3, events=POLLIN}], 1, 3625) = 1 ([{fd=3, revents=POLLIN}])
    13:59:32 read(3, "H", 1)                = 1

There is a 2s delay during connection, and ConnectTimeout is set to 1.
Raising it makes the issue go away, but we can do better. The server
truss shows:

    888: 27.811414714 socket(PF_INET,SOCK_DGRAM|SOCK_CLOEXEC,0) = 5 (0x5)
    888: 27.811765030 connect(5,{ AF_INET 10.0.2.3:53 },16) = 0 (0x0)
    888: 27.812166941 sendto(5,"\^Z/\^A\0\0\^A\0\0\0\0\0\0\^A2"...,39,0,NULL,0) = 39 (0x27)
    888: 29.363970743 poll({ 5/POLLRDNORM },1,5000) = 1 (0x1)

So the delay is due to a DNS query. Disable DNS queries in the server
config.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20240206002344.12372-2-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/vm/basevm.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 61725b8325..c0d62c0803 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -423,6 +423,8 @@ def console_ssh_init(self, prompt, user, pw):
     def console_sshd_config(self, prompt):
         self.console_wait(prompt)
         self.console_send("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config\n")
+        self.console_wait(prompt)
+        self.console_send("echo 'UseDNS no' >> /etc/ssh/sshd_config\n")
         for var in self.envvars:
             self.console_wait(prompt)
             self.console_send("echo 'AcceptEnv %s' >> /etc/ssh/sshd_config\n" % var)
-- 
2.43.0



  parent reply	other threads:[~2024-02-06 10:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06 10:43 [PULL 00/12] s390x, tests and misc. patches Thomas Huth
2024-02-06 10:43 ` [PULL 01/12] hw/scsi/lsi53c895a: add missing decrement of reentrancy counter Thomas Huth
2024-02-06 10:43 ` [PULL 02/12] target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming rules Thomas Huth
2024-02-06 10:43 ` [PULL 03/12] docs/about: Deprecate the old "power5+" and "power7+" CPU names Thomas Huth
2024-02-06 10:43 ` [PULL 04/12] target/s390x: Emulate CVDG Thomas Huth
2024-02-06 10:43 ` [PULL 05/12] target/s390x: Emulate CVB, CVBY and CVBG Thomas Huth
2024-02-06 10:43 ` [PULL 06/12] tests/tcg/s390x: Test CONVERT TO DECIMAL Thomas Huth
2024-02-06 10:43 ` [PULL 07/12] tests/tcg/s390x: Test CONVERT TO BINARY Thomas Huth
2024-02-06 10:43 ` [PULL 08/12] target/s390x: Prefer fast cpu_env() over slower CPU QOM cast macro Thomas Huth
2024-02-06 10:43 ` Thomas Huth [this message]
2024-02-06 10:43 ` [PULL 10/12] tests/vm/freebsd: Reload the sshd configuration Thomas Huth
2024-02-06 10:43 ` [PULL 11/12] test-util-filemonitor: Adapt to the FreeBSD inotify rename semantics Thomas Huth
2024-02-06 10:43 ` [PULL 12/12] meson: Link with libinotify on FreeBSD Thomas Huth
2024-02-08 16:07 ` [PULL 00/12] s390x, tests and misc. patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240206104347.238825-10-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=iii@linux.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).