3

Question

We need to create an ntp server that syncs against other ntp servers but gives its client a modified utc.

For example, it will receive utc 5:17 pm but it's clients will receive utc 7:17pm.

Current situation/problem

I'll describe the current situation so you'll understand the reason for this need. Some of the terms I'll use are from the world of mainframe so I'll try to explain them.

We have a number of LPARS (similar to VM guest) on a single physical machine. The LPARS are grouped in a number of Sysplexes (similar to cluster). The LPARS in each Sysplex are synced using an ETS that is connected to the machine and modifies the clock of each LPAR directly.

Years ago someone thought it will be a great idea to set the ETS's clock to the local time (The site is not in UTC±00:00). The LPARs get the UTC from the ETS clock. We can't change the ETS clock to the real UTC without effecting all of the machine. We want to test the change in test environments first. We can change the sync method to STP (sysplex time protocol) that manages each Sysplex separately. This method uses external ntp server.

So first we want to change one sysplex to use STP that gets a false UTC and perform testing if we set the STP correctly. And then change the utc and perform testing that the system can work with real utc.

Thanks, Wolf

2 Answers2

2

Firstly, three cheers for you, WolfThreeFeet, for explaining what you're trying to do; without that, it's a rum question indeed.

If I understand correctly, what you want to confirm is that when you change a sysplex's clock from local time to UTC, the LPARs don't all fall over and die horribly, and you want to test this in a dev sysplex before rolling it out across the whole machine.

I don't think it's possible to do what you describe in the way you describe it, but I think you can do something equivalent. Set up a test machine whose sole job is to be an NTP server with a wrong clock; it's perfectly possible to tell an NTP server to treat its own motherboard clock as authoritative, and to allow NTP clients to bind to it, and to promulgate that time. Then have the sysplex in question sync via STP (which you say is NTP) to that wrong-clock server.

MadHatter
  • 78,442
  • 20
  • 178
  • 229
  • Thanks for the answer. You can also connect the NTP server to PPS source and that way it will be accurate. – WolfThreeFeet Dec 28 '13 at 19:59
  • By the way STP is not NTP. Its a way to sync Sysplex members between themselves by exchangeing messages but it relies on an exteranal source for accuracy, which is NTP. – WolfThreeFeet Dec 28 '13 at 20:02
1

Caveat First (Dont worry I have three suggestions):

I am not sure about:

We need to create an ntp server that syncs against other ntp servers but gives its client a modified utc.

Why do you need it to sync to external clocks? You need to serve a fake time and make sure the time does not wander/drift?

There are three ways I can think/know of. The first is the easiest and can deal with drift/wander if you hookup a PPS source.

  • ntpd reference implementation with Undiciplined Local Clock (Recommended/Easiest):

    If you want to have an ntp server serve a fake time this is pretty easy. Set the hardware/kernel clock to whatever faketime you need. Then configure ntpd to use the Undisciplined Local Clock driver (127.127.1.x) and no external clocks. The ntp server will happily chug along and serve the local clock. The one problem is that since you are using the local clock driver the time will not be stable and will drift milliseconds one way or the other because that quartz crystal is no rubidium reference. If you need the faketime and stability; you need to use the ULC and add a PPS source. Once you add the PPS source you will need to add the prefer keyword for the ULC entry in ntp.conf.

  • ntpd reference implementation with External Clock Discipline and the Local Clock Driver (Complicated):

    This is still a solution that relies on using the ntpd reference implementation but I am not very familiar with it. All I can do is give you the link to more details: http://www.eecis.udel.edu/~mills/ntp/html/extern.html

  • Jans - third party ntp testing tool

    I have no experience with this product but I know of it from the ntp mailing list. It will allow you to server faketime but it does none of the clock discipline like the reference implementation. More info: http://www.vanheusden.com/time/jans/

dfc
  • 1,331
  • 8
  • 16