From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: Re: [PATCH] meta-test: Disable sshd socket activation for CI purpose
Date: Tue, 11 Jul 2023 09:40:40 +0300 [thread overview]
Message-ID: <954f03ee9a76c2dd27b3e2e64f433de6384c748b.camel@ilbers.de> (raw)
In-Reply-To: <20230705044827.20725-1-ubely@ilbers.de>
On Wed, 2023-07-05 at 06:48 +0200, Uladzimir Bely wrote:
> Openssh-server package in Debian comes with socket activation
> enabled.
> This means that every command executed over ssh by CI scripts starts
> new sshd instance on target.
>
> Sometimes, this makes CI fail: another SSH "ping" or command may fail
> even if all the previous "pings" were OK.
>
> SSH "ping" with debug, when qemu machine is starting:
>
> ```
> while true; do
> ssh -o ConnectTimeout=5 -p 47457 <options> ci@localhost /bin/true;
> echo $?;
> sleep 1;
> done
> ```
>
> Output:
>
> ```
> Connection timed out during banner exchange
> Connection to 127.0.0.1 port 47457 timed out
> 255
> Connection timed out during banner exchange
> Connection to 127.0.0.1 port 47457 timed out
> 255
> 0
> 0
> 0
> kex_exchange_identification: Connection closed by remote host
> Connection closed by 127.0.0.1 port 47457
> 255
> 0
> 0
> 0
> ```
>
> Disabling socket activation by setting corresponding system-preset
> fixes the issue.
>
> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
> ---
> .../isar-ci-ssh-setup/files/99-disable-ssh-socket.preset | 4
> ++++
> .../recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb | 4
> ++++
> 2 files changed, 8 insertions(+)
> create mode 100644 meta-test/recipes-ci/isar-ci-ssh-setup/files/99-
> disable-ssh-socket.preset
>
> diff --git a/meta-test/recipes-ci/isar-ci-ssh-setup/files/99-disable-
> ssh-socket.preset b/meta-test/recipes-ci/isar-ci-ssh-setup/files/99-
> disable-ssh-socket.preset
> new file mode 100644
> index 00000000..aced69e1
> --- /dev/null
> +++ b/meta-test/recipes-ci/isar-ci-ssh-setup/files/99-disable-ssh-
> socket.preset
> @@ -0,0 +1,4 @@
> +# This software is a part of ISAR.
> +# Copyright (C) 2023 ilbers GmbH
> +
> +disable ssh.socket
> diff --git a/meta-test/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-
> setup_0.1.bb b/meta-test/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-
> setup_0.1.bb
> index 74fecf92..4693f647 100644
> --- a/meta-test/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb
> +++ b/meta-test/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb
> @@ -5,6 +5,7 @@ MAINTAINER = "Uladzimir Bely
> <uladzimir.bely@ilbers.de>"
>
> SRC_URI = " \
> file://postinst \
> + file://99-disable-ssh-socket.preset \
> "
>
> DEPENDS += "sshd-regen-keys"
> @@ -19,4 +20,7 @@ do_install() {
>
> # Manage all interfaces (including ethernet) by NetworkManager
> install -D -m 644 /dev/null ${D}/etc/NetworkManager/conf.d/10-
> globally-managed-devices.conf
> +
> + # Disable socket activation for ssh server
> + install -D -m 644 ${WORKDIR}/99-disable-ssh-socket.preset
> ${D}/lib/systemd/system-preset/99-disable-ssh-socket.preset
> }
> --
> 2.20.1
>
Applied to next.
prev parent reply other threads:[~2023-07-11 6:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 4:48 Uladzimir Bely
2023-07-05 9:13 ` Bezdeka, Florian
2023-07-06 4:13 ` Uladzimir Bely
2023-07-11 6:40 ` Uladzimir Bely [this message]
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=954f03ee9a76c2dd27b3e2e64f433de6384c748b.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.com \
/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