Received: from mx1.tetrasec.net (mx1.tetrasec.net [66.245.176.36]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 07FA5782C20 for <~alpine/devel@lists.alpinelinux.org>; Fri, 21 Aug 2020 18:15:15 +0000 (UTC) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 32C60F5849; Fri, 21 Aug 2020 18:15:14 +0000 (UTC) Received: from ncopa-macbook.copa.dup.pw (67.63.200.37.customer.cdi.no [37.200.63.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: alpine@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id BCA58F5848; Fri, 21 Aug 2020 18:15:13 +0000 (UTC) Date: Fri, 21 Aug 2020 19:15:07 +0100 From: Natanael Copa To: =?UTF-8?B?U8O2cmVu?= Tempel Cc: ~alpine/devel@lists.alpinelinux.org Subject: Re: Use of supervise-daemon in Alpine Message-ID: <20200821191507.7857010b@ncopa-macbook.copa.dup.pw> In-Reply-To: <3LLUI2KOULSYM.359WA6HATX45B@8pit.net> References: <3LLUI2KOULSYM.359WA6HATX45B@8pit.net> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-alpine-linux-musl) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 20 Aug 2020 19:04:45 +0200 S=C3=B6ren Tempel wrote: > Hello, >=20 > OpenRC ships a program called supervise-daemon(8) which is capable of > starting daemons and restarting them if they crash. Contrary to > start-stop-daemon, it does not rely on PID files instead the started > daemon is a child process of supervise-daemon. >=20 > Some Alpine OpenRC services already use supervise-daemon(8) (e.g. > unbound, xdm, wpa_supplicant, =E2=80=A6). I was recently wondering if we = want to > migrate busybox-initscripts to using supervise-daemon too and was > pointed to some comments in the GitLab issue tracker which critique use > of supervise-daemon for busybox-initscripts because of concern over > memory usage [0]. Upon further discussion in the IRC some people also > expressed discomfort in regards to the automatic restarting of crashed > services (=E2=80=9Cyou don't want to mask crashes=E2=80=9D). I think it would be nice if we could have the autorestart be configurable, and let it be off by default. > However, the primary benefit I personally see with widespread use of > supervise-daemon is that it would allow us to get rid of racy PID files. > I would therefore propose that we enable supervise-daemon whenever > possible in existing OpenRC services (including busybox-initscripts). > In any case it would be nice to clarify when using supervisor-daemon is > encouraged (see existing examples above) and when it isn't. Are there any history of problems with racy pids with busybox initscripts? The idea with Alpine has been that the requirements for a minimal install should be *minimal*, but users can opt-in to use more convenient tools and services that consumes more resources. So when there is a request for a change that affects the minimal install, I think we should have really good cost vs benefit reasons for enabling them. So for busybox-initscripts i'd still prefer avoid the supervise-daemon, unless it is a common problem that busybox syslog, cron and friends often crashes or have problems with racy pids. For other, bigger, add-on services, I don't mind the extra KBs. > Thoughts? I'm thinking if it ain't broken, don't fix it. At leasts for the busybox-initscripts. > Greetings, > S=C3=B6ren >=20 > [0]: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/1363#n= ote_56289