From: cedric_hombourger@mentor.com
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] sshd-regen-keys: fix race condition
Date: Thu, 12 Mar 2020 10:07:58 -0700 (PDT) [thread overview]
Message-ID: <f3d31fa0-1e2f-4ad0-8a7d-4a61325acc47@googlegroups.com> (raw)
In-Reply-To: <20200312164837.20377-1-Quirin.Gylstorff@siemens.com>
[-- Attachment #1.1: Type: text/plain, Size: 1512 bytes --]
On Thursday, March 12, 2020 at 5:48:39 PM UTC+1, Q. Gylstorff wrote:
>
> From: Quirin Gylstorff <quirin....@siemens.com <javascript:>>
>
> Systemd waits with starting service until a oneshot is finished this leads
> to a race condition if you try to restart a service in a oneshot.
>
>
very good catch!
> "Behavior of oneshot is similar to simple; however, the service manager
> will consider
> the unit started after the main process exits. It will then start
> follow-up units.
> RemainAfterExit= is particularly useful for this type of service.
> Type=oneshot is the
> implied default if neither Type= nor ExecStart= are specified."[1]
>
> [1]: man systemd.service
>
> Signed-off-by: Quirin Gylstorff <quirin....@siemens.com <javascript:>>
> ---
> .../sshd-regen-keys/files/sshd-regen-keys.service | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 a05e1a9..4c4dc0e 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
> @@ -7,7 +7,7 @@ Before=shutdown.target sshd.service
> ConditionPathIsReadWrite=/etc
>
> [Service]
> -Type=oneshot
> +Type=simple
> RemainAfterExit=yes
> Environment=DEBIAN_FRONTEND=noninteractive
> ExecStart=/usr/sbin/sshd-regen-keys.sh
> --
> 2.20.1
>
>
[-- Attachment #1.2: Type: text/html, Size: 2375 bytes --]
next prev parent reply other threads:[~2020-03-12 17:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 16:48 Q. Gylstorff
2020-03-12 17:07 ` cedric_hombourger [this message]
2020-04-13 16:22 ` Baurzhan Ismagulov
2020-04-28 6:22 ` Jan Kiszka
2020-04-29 8:11 ` Gylstorff Quirin
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=f3d31fa0-1e2f-4ad0-8a7d-4a61325acc47@googlegroups.com \
--to=cedric_hombourger@mentor.com \
--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