From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7252191915297210368 X-Received: by 2002:a62:7b07:0:b0:668:82fe:16f1 with SMTP id w7-20020a627b07000000b0066882fe16f1mr16511958pfc.1.1688532511704; Tue, 04 Jul 2023 21:48:31 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a62:cd45:0:b0:668:709d:9f0 with SMTP id o66-20020a62cd45000000b00668709d09f0ls1562772pfg.1.-pod-prod-02-us; Tue, 04 Jul 2023 21:48:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlECDSt8Sl9o/9TJDNWw7Bp8xWv4vxx9Aj5sLpCbKsv5U0kEDYPqDVoTU1T4FuVnGAkAtkB2 X-Received: by 2002:a05:6a20:394c:b0:12f:bb22:ad30 with SMTP id r12-20020a056a20394c00b0012fbb22ad30mr144162pzg.41.1688532510706; Tue, 04 Jul 2023 21:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688532510; cv=none; d=google.com; s=arc-20160816; b=YySej2pysSCWW5arjplU4q7F/SXHpyZ792mQdOA2RsmrXdyS6btPuUdU7yRCr6wvqu +BFKZwCb6I1o2aayqTANWRrRiZxeyq1FmK6fWjidTXGYGLehef6YqUcem57bTIvIpWd/ v8ehvjjEU/bwkW3XKmVYdpJG3l7LlHFiyB16IatHKIC7/hGJRK67VGO0TezNEkm7YtpL dCcKy75JAPi2peRe1q6k6pQL7X1JDiyzDfsY1oJasEvtYaG2coFwKslSr0yuYbum0Hxs DMaKRpbdqgSgfFS5GDo5vZ38g2In/10kT66RhW8WN3L02KwNVGDqGT4UzJEv0eo7lXpw L0qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from; bh=j+eC7vQByPerUqNgG1MIpU2FjsRfxJZxuT2vNbMbP4k=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=CbshRQ/mDYXhR9vGU7nAODAyBjAgDpBuTqLUfNv+D8Fgj1Wi5WFAryhVhLaXOsXJtC +pymd/Mdll52gEryqgqYoktbk/tLZqJDXt5C/DJIx9PEGwO7QLVdziRdBPHzuQ2R8P9j cfatRnVAt6Sd5Z8pAbXinPTTsYRm8AcDzAuo8mMk88bLSBvOnxiZ8tx8sgQ6x+zq+54J yEN4wdsn+73j7KXZ64+DqYVAjCZl7qDcK8CFZmjsl1NtQ2oISeaAcdStgKcVUGqIzKE3 1F2aTIu9oH4WnVe7hhShZ7OVIyXhaDuQrmYXPuzmUax0l3ePEMcjqDxOYxs03LM/podJ jyhw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id v12-20020a170902f0cc00b001b816e24eabsi1313518pla.4.2023.07.04.21.48.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jul 2023 21:48:30 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 3654mReG027082 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 5 Jul 2023 06:48:27 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH] meta-test: Disable sshd socket activation for CI purpose Date: Wed, 5 Jul 2023 06:48:27 +0200 Message-Id: <20230705044827.20725-1-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: 391Unz0jEUL8 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 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 --- .../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 " 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