From nobody Sun Dec 3 14:43:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SjqKq3lvBz52xnb for ; Sun, 3 Dec 2023 14:43:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SjqKp5dH0z4Y24 for ; Sun, 3 Dec 2023 14:43:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-54c74b3cd4cso2856211a12.1 for ; Sun, 03 Dec 2023 06:43:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1701614604; x=1702219404; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=A/ZpGPNz5YzbqLeEqtc6hdBOYoRsMD2MZG9hoIW67X4=; b=XCG8TFI9yHbWsK7XG4NP1f27quj/zlEI20+ni9C/5Q3euaLW1JWRPcpixVwwVCNhTf ckn44OF1UYUcYkcbIZhFF+bLmbDEtnV+lSLojfuVc2s+Tg3qh204OH9UHsQcd1r9sIE9 NIEkOYT4CoIe8twQCZPCYHch7l1V4cW8SO0bSP+CEJBmwzFi4wJJ/w9lLt4EHPqbP7/E rSFZG06RDdAlBsdXI6h9iMSPHlOph6Qp172L9dzm8q0mCwynfeqqcN5VD45sdx9/YLTx kdNJ/DugfUz1VXzMwzsp5d7iRdVs+X6OUFcHJBr7+yTJjxdfwHun01mAOudEwHpYaTXz gEBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701614604; x=1702219404; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=A/ZpGPNz5YzbqLeEqtc6hdBOYoRsMD2MZG9hoIW67X4=; b=sP3Hl+t722K2PMivym9ZYjd9Lc//h3bKRkmWhOAPsUJw5tnjVJKIyzyO2twvwJ3bPw GhS3YHBQsP5Q4tvm5SaK2MkBoBryyGr5O0sHkSJr7Q6b6HlVcuZTftmtAouYXvh0zUnF bJr0uf8hK9kWkW4S9pQoKxPX5gbWOBCc0FAFQkG75+kGnADQXmOkRet0D9PoWs6gzEds XGMCDU8AJVpAcuTazkFd93fB/O943hCYo3V9V62amuCK0g0UraVBCRnPH/NmO7R+whTm QUGTDG3tjx7kH7zpARPZMczhxXseLm0mwZeHRAAJlyNDLE+nnekygK6FFtDkthkoFgQi 6ZrA== X-Gm-Message-State: AOJu0YxwkIAnN6FvBMJ5iKlXfjBFgAwXepY2tvkbEY06wuHE/XqodwJL igMk1r9WSEDqfz0f9OPRx+qJcac/zyR4/2scbv81wQ== X-Google-Smtp-Source: AGHT+IGrXAzI8DJM+d7PVsvavdMdJrvVC7WktFu8Wjn0HGbOpBVnWbhV/U3cv9MFg8wSq7fPA5qtdNai5QfJKsBzBkk= X-Received: by 2002:a50:9313:0:b0:54c:553e:67f5 with SMTP id m19-20020a509313000000b0054c553e67f5mr4609684eda.8.1701614603744; Sun, 03 Dec 2023 06:43:23 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202312030701.3B371MA6049553@gitrepo.freebsd.org> <56101076-F237-4B1E-B6E0-A08921370B75@karels.net> In-Reply-To: <56101076-F237-4B1E-B6E0-A08921370B75@karels.net> From: Warner Losh Date: Sun, 3 Dec 2023 07:43:12 -0700 Message-ID: Subject: Re: git: 3b3195f6767b - main - periodic/daily/480.leapfile-ntpd: only attempt to refresh leap-seconds.list when ntpd is enabled. To: Mike Karels Cc: Xin LI , src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000000047eb060b9c068e" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4SjqKp5dH0z4Y24 --0000000000000047eb060b9c068e Content-Type: text/plain; charset="UTF-8" On Sun, Dec 3, 2023, 6:44 AM Mike Karels wrote: > On 3 Dec 2023, at 1:01, Xin LI wrote: > > > The branch main has been updated by delphij: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3b3195f6767b39eb33b3523134ef988931c9c86d > > > > commit 3b3195f6767b39eb33b3523134ef988931c9c86d > > Author: Xin LI > > AuthorDate: 2023-12-03 07:00:32 +0000 > > Commit: Xin LI > > CommitDate: 2023-12-03 07:00:32 +0000 > > > > periodic/daily/480.leapfile-ntpd: only attempt to refresh > leap-seconds.list > > when ntpd is enabled. > > > > The leap-seconds.list is used exclusively by ntpd, therefore, do not > bother > > to perform the fetch when ntpd is not enabled. > > Wouldn't we want an up-to-date leapsecond file for ntpdate as well? The > daily > script can't know if ntpdate is being used. Also, it seems wrong to ignore > daily_ntpd_leapfile_enable if ntpd is not enabled. > No. It doesn't need it to do the time exchange. Nor will it be steering a local clock, so it can't insert one Iin real time. Nor is it serving time to others that need to know. And even it today were a leap second day, the remote server would tell it a second is pending. The file is only used as a backup for ntpd turning on its leap indicator on the day of the leap second. Warner Mike > > > PR: conf/275419 > > Reviewed by: cy, michaelo, imp > > MFC after: 3 days > > Differential Revision: https://reviews.freebsd.org/D42875 > > --- > > usr.sbin/periodic/etc/daily/480.leapfile-ntpd | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/usr.sbin/periodic/etc/daily/480.leapfile-ntpd > b/usr.sbin/periodic/etc/daily/480.leapfile-ntpd > > index 17db53e625f8..c7de845ea87d 100755 > > --- a/usr.sbin/periodic/etc/daily/480.leapfile-ntpd > > +++ b/usr.sbin/periodic/etc/daily/480.leapfile-ntpd > > @@ -12,9 +12,9 @@ fi > > > > case "$daily_ntpd_leapfile_enable" in > > [Yy][Ee][Ss]) > > - if service ntpd oneneedfetch; then > > + if service ntpd enabled && service ntpd needfetch; then > > anticongestion > > - service ntpd onefetch > > + service ntpd fetch > > fi > > ;; > > esac > --0000000000000047eb060b9c068e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Dec 3, 2023, 6:44 AM Mike Karels <mike@karels.net> wrote:
On 3 Dec 2023, at 1:01, Xin LI wrote:

> The branch main has been updated by delphij:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D3b3195f6767b39eb33b3523134ef98= 8931c9c86d
>
> commit 3b3195f6767b39eb33b3523134ef988931c9c86d
> Author:=C2=A0 =C2=A0 =C2=A0Xin LI <delphij@FreeBSD.org>
> AuthorDate: 2023-12-03 07:00:32 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Xin LI <delphij@FreeBSD.org>
> CommitDate: 2023-12-03 07:00:32 +0000
>
>=C2=A0 =C2=A0 =C2=A0periodic/daily/480.leapfile-ntpd: only attempt to r= efresh leap-seconds.list
>=C2=A0 =C2=A0 =C2=A0when ntpd is enabled.
>
>=C2=A0 =C2=A0 =C2=A0The leap-seconds.list is used exclusively by ntpd, = therefore, do not bother
>=C2=A0 =C2=A0 =C2=A0to perform the fetch when ntpd is not enabled.

Wouldn't we want an up-to-date leapsecond file for ntpdate as well?=C2= =A0 The daily
script can't know if ntpdate is being used.=C2=A0 Also, it seems wrong = to ignore
daily_ntpd_leapfile_enable if ntpd is not enabled.

=C2=A0No. It doesn't = need it to do the time exchange. Nor will it be steering a local clock, so = it can't insert one Iin real time. Nor is it serving time to others tha= t need to know. And even it today were a leap second day, the remote server= would tell it a second is pending.

The file is only used as a backup for ntpd turning on its leap = indicator on the day of the leap second.=C2=A0

<= /div>
Warner

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Mike

>=C2=A0 =C2=A0 =C2=A0PR:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= conf/275419
>=C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 cy, michaelo, imp
>=C2=A0 =C2=A0 =C2=A0MFC after:=C2=A0 =C2=A0 =C2=A0 3 days
>=C2=A0 =C2=A0 =C2=A0Differential Revision: https://= reviews.freebsd.org/D42875
> ---
>=C2=A0 usr.sbin/periodic/etc/daily/480.leapfile-ntpd | 4 ++--
>=C2=A0 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/usr.sbin/periodic/etc/daily/480.leapfile-ntpd b/usr.sbin/= periodic/etc/daily/480.leapfile-ntpd
> index 17db53e625f8..c7de845ea87d 100755
> --- a/usr.sbin/periodic/etc/daily/480.leapfile-ntpd
> +++ b/usr.sbin/periodic/etc/daily/480.leapfile-ntpd
> @@ -12,9 +12,9 @@ fi
>
>=C2=A0 case "$daily_ntpd_leapfile_enable" in
>=C2=A0 =C2=A0 =C2=A0 [Yy][Ee][Ss])
> -=C2=A0 =C2=A0 =C2=A0if service ntpd oneneedfetch; then
> +=C2=A0 =C2=A0 =C2=A0if service ntpd enabled && service ntpd n= eedfetch; then
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0anticongestion
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0service ntpd onefetch
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0service ntpd fetch
>=C2=A0 =C2=A0 =C2=A0 =C2=A0fi
>=C2=A0 =C2=A0 =C2=A0 =C2=A0;;
>=C2=A0 esac
--0000000000000047eb060b9c068e--