[38112] in Kerberos

home help back first fref pref prev next nref lref last post

Re: PID file ... not readable (yet?)

daemon@ATHENA.MIT.EDU (Robbie Harwood)
Mon Nov 6 12:41:26 2017

From: Robbie Harwood <rharwood@redhat.com>
To: Russ Allbery <eagle@eyrie.org>, Benjamin Kaduk <kaduk@mit.edu>
In-Reply-To: <87wp34du3j.fsf@hope.eyrie.org>
Date: Mon, 06 Nov 2017 12:41:05 -0500
Message-ID: <jlgd14vs3ta.fsf@redhat.com>
MIME-Version: 1.0
Cc: kerberos@mit.edu
Content-Type: multipart/mixed; boundary="===============6541641535953088034=="
Errors-To: kerberos-bounces@mit.edu

--===============6541641535953088034==
Content-Type: multipart/signed; boundary="=-=-=";
	micalg=pgp-sha512; protocol="application/pgp-signature"

--=-=-=
Content-Type: text/plain

Russ Allbery <eagle@eyrie.org> writes:

> Benjamin Kaduk <kaduk@mit.edu> writes:
>
>> I suspect that we would be a little friendlier to systemd if we
>> passed -n to krb5kdc and adjusted the unit file accordingly.  There
>> would still be a race window between when systemd thinks krb5kdc is
>> started and ready to accept connections and when that is actually the
>> case, but in both cases that window is small, and we cannot eliminate
>> it entirely without patching the code to call systemd-specific
>> functions.
>
> For what it's worth, that's a pretty light burden.  It's just the
> following Autoconf probe:
>
> PKG_CHECK_EXISTS([libsystemd],
>     [PKG_CHECK_MODULES([SYSTEMD], [libsystemd])
>      AC_DEFINE([HAVE_SD_NOTIFY], 1, [Define if sd_notify is available.])])
>
> (does require the pkg-config Autoconf stuff as well), the following at
> the start of the daemon C file:
>
> #ifdef HAVE_SD_NOTIFY
> # include <systemd/sd-daemon.h>
> #else
> # define sd_notify(u, s)  0
> #endif
>
> and then just the following call when the daemon has started up and is
> ready for connections:
>
>     sd_notify(true, "READY=1");
>
> or, to be more complete, something akin to:
>
>     status = sd_notify(true, "READY=1");
>     if (status < 0)
>         warn("cannot notify systemd of startup: %s", strerror(-status));
>
> Then you can be a native systemd daemon and systemd will know exactly
> when the KDC is ready to respond to connections, which will resolve
> various race conditions when some other system service depends on the
> KDC for startup.

Won't this produce something that requires systemd if systemd was
present during build, thereby preventing a maintainer from shipping both
a sysvinit script and a systemd unit file?  Or am I misunderstanding?

Thanks,
--Robbie

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEA5qc6hnelQjDaHWqJTL5F2qVpEIFAloAnrEACgkQJTL5F2qV
pEKgiA//e5zrWikORmHgJdnefbjYQ/Vr+ClM8zjCh29s4w5jo5G1DFxiNa/Tlzxv
NWNU9THMZ/HiZJSt6RFRnCgOVJAq+3tYf9J7BiA7Mlo72B2Ek9o+cOcTQncDZKLD
RSvR1EX1aBn7jmEckQjZ10iPy8boXYMXVmJ2EbmkkCAgZVJ1oh7wMl5TKlyPBmBk
uFnPCeIFsj9/5w4FTiUtUNHsFQWBYO565d78UpikgzbcA/+vj62peaG7lccp2C80
Wp7GoViokz0o5AzhVsKHa8gk0u/2ovWq7tjY0lXcG7vgCETx/2YBZhoCxSf7ncnQ
GQaab6HJsGq4Ky5Rtq8kGR29k+xU3ROMaTiJuRIflKJfWMHeiakVCjsm3Wq+sQ/m
op6SpxSSl+qZ6is65C986xvvs8PCBLcUfTAgkThXHS35vOkhZYidvq0w5SBYjZGT
6a5k3Xs8+qELfk5ndF2btFjtan44w5ZYAdkaCSiEwf7/eqVwLF1tapIk76SnFXjE
u3JWC7dnH3lQMR/BlHZq6TM9MmMTsPCoQaowAed0govIeEYoJSvxxQ4UpxJldcZ0
p3DtPUvt/1Y9jwlYC33IO4sgvv378Xn5liKCWyN7AtN8XaGImcQbsbFyeeCRYucH
Eya49a22KmNmsDNzxbmKBGg/wIO5PE7iLjVgMHnPoxXv0akUmok=
=cW3L
-----END PGP SIGNATURE-----
--=-=-=--

--===============6541641535953088034==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

--===============6541641535953088034==--

home help back first fref pref prev next nref lref last post