public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Florian Bezdeka <florian.bezdeka@siemens.com>
To: isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com, henning.schild@siemens.com,
	Florian Bezdeka <florian.bezdeka@siemens.com>
Subject: [PATCH v2 1/2] sshd-regen-keys: Start key generation after entropy seed
Date: Fri, 15 Oct 2021 10:06:37 +0200	[thread overview]
Message-ID: <20211015080638.12765-2-florian.bezdeka@siemens.com> (raw)
In-Reply-To: <20211015080638.12765-1-florian.bezdeka@siemens.com>

Especially on low-end systems (including arm on qemu) it could happen
that the key generation took extremly long. As side effect some other
services (like the ones for serial consoles) run into the configured
timeouts.

[ TIME ] Timed out waiting for device /dev/hvc0.
[DEPEND] Dependency failed for Serial Getty on hvc0.
[ TIME ] Timed out waiting for device /dev/ttyAMA0.
[DEPEND] Dependency failed for Serial Getty on ttyAMA0.

Delaying the key generation to the point in time where
systemd-random-seed finished solves this problem. My current
understanding is that the regeneration is waiting for enough entropy
which is being seeded in parallel.

Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
---
 .../sshd-regen-keys/files/sshd-regen-keys.service                | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
index af98d5e..1beb664 100644
--- a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
+++ b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
@@ -3,6 +3,7 @@ Description=Regenerate sshd host keys
 DefaultDependencies=no
 Conflicts=shutdown.target
 After=systemd-remount-fs.service
+After=systemd-random-seed.service
 Before=shutdown.target ssh.service
 ConditionPathIsReadWrite=/etc
 
-- 
2.31.1


  reply	other threads:[~2021-10-15  8:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15  8:06 [PATCH v2 0/2] sshd-regen-keys: Fix boot hang on low end hardware Florian Bezdeka
2021-10-15  8:06 ` Florian Bezdeka [this message]
2021-10-15  8:06 ` [PATCH v2 2/2] sshd-regen-keys: Fix some systemd obsolete warnings about using syslog Florian Bezdeka
2021-10-22 14:59 ` [PATCH v2 0/2] sshd-regen-keys: Fix boot hang on low end hardware Anton Mikanovich

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=20211015080638.12765-2-florian.bezdeka@siemens.com \
    --to=florian.bezdeka@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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