*BSD News Article 16157


Return to BSD News archive

Xref: sserve comp.unix.bsd:12025 comp.unix.osf.misc:212
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!noc.near.net!sunfish.hi.com!hicomb.hi.com!mikew
From: mikew@hicomb.hi.com (Michael Winiarski)
Newsgroups: comp.unix.bsd,comp.unix.osf.misc
Subject: time daemon (timed) questions
Date: 5 May 1993 15:47:27 GMT
Organization: Hitachi Computer Products, OSSD division
Lines: 47
Distribution: world
Message-ID: <1s8nif$hik@sunfish.hi.com>
NNTP-Posting-Host: gandalf.hi.com
Keywords: time, daemon, BSD, OSF

-- 
My primary question is:

	Should a date/time change on a host that is managed by a slave timed
	cause a date/time change on all hosts managed by a master timed?

The basis of this question comes from an OSF extension to the date command.
The date command has a '-n' flag which "does not set the time globally on
all machines in a local area network that have their clock synchronized ..."
Upon reading the date source code, if '-n' is not specified, it will attempt
to send a TSP_SETDATE message to the local timed daemon. Regardless of the
timed handling of the message, the local host's time will be set.

If the local timed daemon is running as a slave, it will send a
TSP_SETDATEREQ message to the master timed, which it turn accepts this
message and propogates this "new time" to all the slave timeds on the net
with a TSP_SETTIME message. If the local timed is master, then the new time
is propogated to all slave timeds with the TSP_SETTIME message.

Is it the intended design that the master timed daemon should blindly accept
a TSP_SETDATEREQ and then propogate it on the net? Normally, the master is
figuring out the average network time and emitting TSP_ADJTIME messages to
the slaves (and itself?). If a slave host's time is outside of some time
delta, it's time is not figured into the average, but it does get a time
adjustment.

In our test case, one of the hosts on our net had an incorrect timezone
(TZ); it was off by an hour. The super-user on this host noticed that the
time didn't match the wall clock, so the date was changed (no...the system
was not in single-user mode). This action caused all the hosts on the net to
have their times adjusted to 1 hour into the future. Needless to say, this
can wreak havoc on cron jobs and the like.

In summary, is the above-mentioned interaction between the timed daemon and
the date command intended? Is there a design problem somewhere, or am I
chasing a non-problem? If I have stated anything that is incorrect, please
set me straight.

Any thoughts on the matter are appreciated. Please reply by email (rather
than posting followups) since I do not frequent this newsgroup.

----------
Michael L. Winiarski                       Internet: mikew@hicomb.hi.com
Hitachi Computer Products (America), Inc.     uunet: uunet!hicomb!mikew
Reservoir Place                               Phone: (617) 890-0444
1601 Trapelo Road                               FAX: (617) 890-4998
Waltham, MA 02154