Re: [Ntp] Resending: Thoughts on draft-ietf-ntp-refid-updates

Ragnar Sundblad <ragge@netnod.se> Sat, 21 July 2018 00:04 UTC

Return-Path: <ragge@netnod.se>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0FBEF13122A for <ntp@ietfa.amsl.com>; Fri, 20 Jul 2018 17:04:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=netnod-se.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A1uOx-DRpeWP for <ntp@ietfa.amsl.com>; Fri, 20 Jul 2018 17:04:19 -0700 (PDT)
Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1C332130E42 for <ntp@ietf.org>; Fri, 20 Jul 2018 17:04:18 -0700 (PDT)
Received: by mail-lj1-x22c.google.com with SMTP id l15-v6so12405720lji.6 for <ntp@ietf.org>; Fri, 20 Jul 2018 17:04:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netnod-se.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=DfLEs2FDbStpdlIKkYExIpx6HA81eAP/5Sanxyw6h7c=; b=wnV4nSgzuBkYR6PdbLzaFyXCOWyUNdPiXAP85sR0WG+8ei2Oe9I0oQcpbV/Cfx0dKT YGFr0Ava/IVNnn5faGN6ngJMH2/x6Tcla2xXiGUz2bJKf5VkEIEDpawPp2Y1OZ6dghIG onQKwRmf9vHLyGx4sEMOwQA3zq+YdhZSTLS4d0NpM06lYQPDJqoSd2QFBrfHwIO5uE4h 9dIT8YdEE2nYdXGl7jD587SS51Ac2yTm5l9oDMIBihZ4IEFvGnMV0NVAnhP54vVg/bta 9PANGn9fKLZgQLhnG/Uqwd6otPR2V7gkTZNPZhLnZ+byQ07mv2VDSg0hcw+MweB4vQhw TJjQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=DfLEs2FDbStpdlIKkYExIpx6HA81eAP/5Sanxyw6h7c=; b=EtBVZs7qxHwTULh8ZAQDE1UV33B4WmI3cifIkvStl84GYdnunY0c+GHpk67enE8g54 Do+Q/UmfGVSE6LTtLCw3uG5VEFqIiZw7oADeBVZdZrz4tUV61t5BxVmTvdh5De+5YXqa BlSFKfj7mhAqrfiFfH+LLTrSg5D65r5lRwKyWek3o9KCk6ktzoMUgT3qm9Ph/V3mW8+S U7IfXOBSr3sG057ibQEMkHOihPnGqEhXhcv72mGNTkFfiNAA8Vx3KLXIbBTyiSP3G0OL xU7XLNSZIRKUos5bABqOP4BmvrQzQgWNUlQL1hl4VGw/U8kTWhLlSHXchALwQtJiyLRs 9XRw==
X-Gm-Message-State: AOUpUlES7VDeKK+LTBep3A3Gfv6Fd4VkBJcEXV72HbOw0c54USwmS4ES 7bYT9qSZ/PgCFNAGyPgNCMh3ehw67tI=
X-Google-Smtp-Source: AAOMgpcMX+Me/eyXkIw0BfCEL/ZcMmqg0gMDfYxvYwVVc4b2UcnVIlwe7PkNM0sYJ0yyMWYumxAlSA==
X-Received: by 2002:a2e:498:: with SMTP id a24-v6mr3004535ljf.27.1532131457171; Fri, 20 Jul 2018 17:04:17 -0700 (PDT)
Received: from [192.168.8.109] (m176-64-245-35.cust.tele2.se. [176.64.245.35]) by smtp.gmail.com with ESMTPSA id s23-v6sm591464ljs.38.2018.07.20.17.04.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 17:04:16 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Ragnar Sundblad <ragge@netnod.se>
In-Reply-To: <75a62bda-df15-0eaf-df95-8ff7a0ab06a2@meinberg.de>
Date: Sat, 21 Jul 2018 02:04:14 +0200
Cc: ntp@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <A3632AA9-86BB-41FD-8362-278BEF2956FB@netnod.se>
References: <5B2795C6-F78E-40FB-8B98-790E50228808@redfish-solutions.com> <5EB0F348-AC75-4C29-A576-FA590305EA2E@netnod.se> <75a62bda-df15-0eaf-df95-8ff7a0ab06a2@meinberg.de>
To: Martin Burnicki <martin.burnicki@meinberg.de>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/GJT_XxOG_SPkYM6a3spZ_fpni0w>
Subject: Re: [Ntp] Resending: Thoughts on draft-ietf-ntp-refid-updates
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Jul 2018 00:04:23 -0000

> On 20 Jul 2018, at 15:33, Martin Burnicki <martin.burnicki@meinberg.de> wrote:
> 
> Ask Bjørn Hansen wrote:
>> 
>>> On Jul 19, 2018, at 2:58, Ragnar Sundblad <ragge@netnod.se> wrote:
>>> 
>>> I would really like to avoid splitting the NTP world into several different
>>> ones. There is also a high risk that they meet downstream due to
>>> misconfiguration, which will have the clients have bad time and e.g. get
>>> leap seconds even when the operator wanted to avoid that.
> 
> Please don't blame ntpd for smearing leap seconds.

I certainly don’t.

> The leap second is inserted/handled by the kernel, and that's basically
> the way it should be.

There are many ways that this could be handled, that is just one of them.

If you want to do it over 20 hours or whatever, that could be done with
the current kernel API as well, which is actually exactly what happens
with the current violating smeared NTP time scales, just that the NTP
clients are not aware that they are tricked into doing this.

There is still no need to set up a separate public NTP distribution
systems with separate time scales just to get this behaviour.

> However, this is often done in a way that applications may become
> confused if the system time is simply stepped back by 1 s.
> 
> If you used any other time synchronization software which just passes a
> leap second announcement to the kernel then the applications will have
> the same problems.
> 
> Leap second smearing by an NTP server is just an optional way to avoid
> these problems because there's no better way to get around it.

There are many ways that don’t involve separate NTP networks with
different time scales. But for some applications, this was the fastest
solution, especially since "someone else" had already done the work
and you just needed a configuration change, and this was at a time
when many didn’t trust their kernels of a certain brand since it
had problems before, if you were unlucky resulting in deadlocking.

> On 20 Jul 2018, at 15:55, Martin Burnicki <martin.burnicki@meinberg.de> wrote:
> 
> Ragnar Sundblad wrote:
>> 
>> I agree with Philip.
>> 
>> 1.
>> I believe a much more relevant time scale to distribute than a leap smeared
>> one is UT1, as in:
>> <https://www.nist.gov/pml/time-and-frequency-division/time-services/ut1-ntp-time-dissemination>
>> Now, I have no idea how much this is used, but I can easily imagine there
>> are astrophysicists that appreciate it.
> 
> If you use this with a standard NTP client then your system time will be
> UT1 instead of UTC.

Correct.

Some people only care about UT1 in their applications. This is a timescale
that has to be distributed in real time or at least pretty often,
depending on your application, and which actually may be a proper use
case for a time distribution system like NTP.

Leap second smearing, which is just a workaround for broken software,
isn’t.

>> There may possibly be other more relevant ones, like TAI.
>> 
>> So I guess if other time scales than UTC should be allowed, that you should
>> be able to flag for all of them.
> 
> And the question is: where to put the flag? If you actually need UTC as
> a basis for the local time zones then you don't just need a leap second
> warning, but also the current UTC/TAI offset.

Right. That is why I wonder if it is wise to have a special “smeared
timescale” flag and not having similar flags for other time scales.

But I do believe the answer is that NTP on the public internet should
always carry UTC for now, and that all conversions to other time scales
should be a local thing.

>> 2.
>> Regarding leap smear, I personally believe it should be done in the client
>> and not in the server.
> 
> Hm, I think it depends on the situation. ;-)

I strongly believe we need to have a defined time scale in NTP, or NTP
is worth nothing. RFC 5905 mentions UTC several times, so that should
be it.

If someone starts to distribute other time scales, they should not be
possible to mix up by mistake, as is the case today.

Regarding leap seconds, that information already is distributed in
NTP, and there is absolutely no reason to set up separate public
NTP systems with smeared time.

>> Today, most unix/linux machines smear an extra leap
>> second over two seconds.
> 
> Hm, I haven't seen any Unix kernel that does so. Do you have an example?
> 
> All I've yet seen on Unix-like systems is that the time is simply
> stepped back by 1 s to insert a leap second.

Right, “smear” was not the correct term here. But it could very well
be implemented by just letting the clock go at half speed for 2 seconds,
or at 1s/20h speed for 20 hours. It should be up to the owner of the
box to choose which kind of headache she/he prefers (sadly, because of
the lacking API:s and all the broken software out there).

> However, the Windows port of ntpd does this on Windows, because except
> the next Windows Server version (Server 2019) and associated future
> Windows 10 versions, there's no leap second support at all in Windows.
> 
>> If you want to do it over 20 hours or whatever,
>> and if you want to avoid telling your untrusted kernel about it, then fine,
>> handle it as you wish. I understand that modifying the time scale in the
>> server is an easy way out if you have control also over the servers, I
>> still don’t think that is a good solution more than in very special confined
>> cases, and I think it will split the NTP world in two for the entirely wrong
>> reasons.
> 
> It's indeed just a hack, but if you can let the server do the smearing
> you don't have to fiddle with the configuration on every single client,
> which caused much work, specifically in a huge network with many clients.

If you have a large network of machines that implements a large application,
setting up leap second smearing style on the boxes is a non issue.
It is one of hundreds or thousands of things that have to be configured
to have your boxes do you want them to do.

/ragge