Date: Tue, 17 Oct 2017 09:32:34 -0600 From: Alan Somers <asomers@freebsd.org> To: Cy Schubert <cy@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r324681 - in head/etc: defaults periodic/daily Message-ID: <CAOtMX2i8wSg=f=ST6V3Nx5jReVWqCWQhaBLO_KbVqgJG5wsAsQ@mail.gmail.com> In-Reply-To: <201710170115.v9H1FDbU046661@repo.freebsd.org> References: <201710170115.v9H1FDbU046661@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This change defeats the anticongestion mechanism. If daily_ntpd_leapfile_background is set and 480.leapfile-ntpd runs before any other periodic script that uses anticongestion (like /usr/local/etc/periodic/security/410.pkg-audit), then the anticongestion mechanism will effectively be disabled for those later scripts. It's worth asking why you would want to do this in the background anyway. Does the submitter complain that it was too slow? The entire point of anticongestion is to slow it down. If the submitter didn't like that, he could've set anticongestion_sleeptime=0 to disable it entirely. Or was the problem that the "service ntpd onefetch" is too slow, even after the anticongestion timer ran? I doubt it, but if so then you should background just that part instead of backgrounding anticongestion too. -Alan On Mon, Oct 16, 2017 at 7:15 PM, Cy Schubert <cy@freebsd.org> wrote: > Author: cy > Date: Tue Oct 17 01:15:13 2017 > New Revision: 324681 > URL: https://svnweb.freebsd.org/changeset/base/324681 > > Log: > Provide an option to run the anticongestion ntpd leapfile fetch in > the background. > > Original patch submitted by feld@. I added the "optional" bit. > > Submitted by: feld (original patch) > MFC after: 2 weeks > > Modified: > head/etc/defaults/periodic.conf > head/etc/periodic/daily/480.leapfile-ntpd > > Modified: head/etc/defaults/periodic.conf > ============================================================================== > --- head/etc/defaults/periodic.conf Tue Oct 17 01:12:17 2017 (r324680) > +++ head/etc/defaults/periodic.conf Tue Oct 17 01:15:13 2017 (r324681) > @@ -141,6 +141,8 @@ daily_status_mail_rejects_shorten="NO" # Shorten out > > # 480.leapfile-ntpd > daily_ntpd_leapfile_enable="YES" # Fetch NTP leapfile > +daily_ntpd_leapfile_background="NO" # Fetch NTP leapfile > + # in the background > > # 480.status-ntpd > daily_status_ntpd_enable="NO" # Check NTP status > > Modified: head/etc/periodic/daily/480.leapfile-ntpd > ============================================================================== > --- head/etc/periodic/daily/480.leapfile-ntpd Tue Oct 17 01:12:17 2017 (r324680) > +++ head/etc/periodic/daily/480.leapfile-ntpd Tue Oct 17 01:15:13 2017 (r324681) > @@ -13,8 +13,15 @@ fi > > case "$daily_ntpd_leapfile_enable" in > [Yy][Ee][Ss]) > - anticongestion > - service ntpd onefetch > + case "$daily_ntpd_leapfile_background" in > + [Yy][Ee][Ss]) > + (anticongestion && service ntpd onefetch) & > + ;; > + *) > + anticongestion > + service ntpd onefetch > + ;; > + esac > ;; > esac > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2i8wSg=f=ST6V3Nx5jReVWqCWQhaBLO_KbVqgJG5wsAsQ>