Re: [Ntp] CLOCK_TAI (was NTPv5: big picture)

Miroslav Lichvar <mlichvar@redhat.com> Tue, 05 January 2021 16:29 UTC

Return-Path: <mlichvar@redhat.com>
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 8E3663A12C3 for <ntp@ietfa.amsl.com>; Tue, 5 Jan 2021 08:29:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.37
X-Spam-Level:
X-Spam-Status: No, score=-2.37 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.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 tH-7wXE7eUM8 for <ntp@ietfa.amsl.com>; Tue, 5 Jan 2021 08:29:44 -0800 (PST)
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0E29C3A12C9 for <ntp@ietf.org>; Tue, 5 Jan 2021 08:29:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609864147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FzSsHV093UZReJGvnMeZEmDtLkRpcXVYibx8cKfvwMc=; b=XRZFoNvySZvY4lIIHzYwAsO6yp7gDsihWxk3RhEePw2Cue2sQcStOxfhQfO6kWFspRkufz lR0eCrGzzpGWNzy2z7cIxRqZnv+KQDip1U83O7PWqB0BWmx2DKHI8aunuFo2yQakoIBSyQ B99RCrPbB/jDenUrrWeCr2YntT6vvb8=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-491-53flXkWqPxOnvV3syW8BVA-1; Tue, 05 Jan 2021 11:29:05 -0500
X-MC-Unique: 53flXkWqPxOnvV3syW8BVA-1
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2EC87800D53; Tue, 5 Jan 2021 16:29:04 +0000 (UTC)
Received: from localhost (holly.tpb.lab.eng.brq.redhat.com [10.43.134.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 824EF61D31; Tue, 5 Jan 2021 16:29:02 +0000 (UTC)
Date: Tue, 05 Jan 2021 17:29:01 +0100
From: Miroslav Lichvar <mlichvar@redhat.com>
To: Magnus Danielson <magnus@rubidium.se>
Cc: ntp@ietf.org
Message-ID: <20210105162901.GJ3008666@localhost>
References: <20210102081603.1F63C40605C@ip-64-139-1-69.sjc.megapath.net> <cecaf661-92af-8b35-4c53-2f025c928144@rubidium.se> <20210104164449.GE2992437@localhost> <b1e61f7d-6cea-5e99-69f0-7eae815d9e19@rubidium.se> <20210105083328.GA3008666@localhost> <ba5d2cde-6b5e-d9b6-1877-c4060bf43e80@rubidium.se> <20210105144225.GH3008666@localhost> <35c4be55-b6af-82b5-aacd-d5a591383dec@rubidium.se>
MIME-Version: 1.0
In-Reply-To: <35c4be55-b6af-82b5-aacd-d5a591383dec@rubidium.se>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mlichvar@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/s9wzMy1ekbIG_3BfVa4h96xF1J4>
Subject: Re: [Ntp] CLOCK_TAI (was NTPv5: big picture)
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 05 Jan 2021 16:29:47 -0000

On Tue, Jan 05, 2021 at 04:51:13PM +0100, Magnus Danielson wrote:
> Actually, here lies a problem. There seems to be fairly wide agreement
> that we want the core time-stamping to use a TAI-like form of time. This
> means, it keeps ticking, behaves like a well-functioned linear ramp.
> That makes any processing of it easy and so does all encoding.

Yeah, I don't agree with this idea. It will create more problems than
solve. I'd like NTP to be versatile and support multiple timescales,
as PTP does for instance.

> So, when forces say they really, really want to get rid of these
> encoding issues in the core transport of time-stamps, it's a real thing.
> It will be completely incompatible with UTC transport without means to
> handle things.

You cannot get rid of these issues until operating systems fully
support a non-leaping timescale and the TAI-UTC offset is always
known. I don't expect that happen anytime soon. You can specify a
nice protocol that supports only a non-leaping representation of time,
but it will just make implementations more complicated and less
reliable on those systems if the protocol actually gets implemented.

> Now, if the source side is unable to derive the TAI-UTC difference from
> it's timing source (say a simple GPS-receiver), when to resolve this,
> some other means of resolvement needs to be done at the server. You
> could use a leap-second.list file. You could use DNS based methods. You
> could listen to other trusted NTP servers only to attain the TAI-UTC
> difference and then re-distribute that. Regardless of which, when
> achieved you can provide the full service for all clients.

That's not always practical. If you start to rely on humans doing
something once every few years, you can be sure it will be broken. We
have few CDMA-based NTP servers in our network. They need to be
manually programmed for each leap second. You can guess how many times
I have seen that done correctly. Not once. It's fixed only when people
notice their clocks are off by one second. Before another leap second
occurs, it's all forgotten.

> If we say that we indeed can have different time-scales, then each user
> then needs to be able to handle the situation of conflicting time-scales
> from different servers, either separate or at the same time. I end
> thinking madness lies within.

I don't expect it to be a problem, at least not a bigger problem than
trying to convert everything to a common timescale. In the case when
the server cannot provide the service in the requested timescale and
the client cannot convert the timestamps locally, how could it
work if the protocol allowed only one timescale?

> I lean towards pushing the conversion requirement onto the NTP source
> nodes just to achieve the intended cleanness of the rest of the
> infrastructure.

It makes sense to require servers to convert the timestamps if they
have the offset, but for some hardware implementations (one-step
clocks) that might not be possible.

-- 
Miroslav Lichvar