How to set time on slave nodes (Scyld)

Donald Becker becker at scyld.com
Fri Jan 18 14:28:07 EST 2002


On Fri, 18 Jan 2002, Tony Stocker wrote:

> Okay, the host node is set to UTC.  We keep it synced with local time 
> servers.  However when I run /usr/lib/beoboot/bin/bdate to update the slave 
> nodes' time it is setting them to Eastern time.  What do I have to do to get 
> the slave nodes to be set to UTC, and to keep their time synced with the 
> host node?

I suspect you are misinterpreting some aspect of what is happening.

The timezone setting is stored in /etc/localzone, and is used only by
user level programs.  It is independent of the kernel's clock, kept in
UTC/GMT.  The "CMOS clock", a hardware device that keeps time when the
machine is powered off, may be set to either localtime or UTC.

'bdate' is a tiny program that copies UTC time from kernel to kernel.
It is run in the node_up script to synchronize the slave clock to the master.
It's a wonderful illustration of how simple cluster tools should be.

main(int argc, char **argv)
{
	int node = atoi(argv[1]);
	struct timeval master_time;

	gettimeofday(&master_time, NULL);	/* Get time on master. */
	_bproc_move(node, BPROC_DUMP_ALL);	/* Move to slave node. */
	settimeofday(&master_time,NULL);	/* Set time on slave.

	return 0;
}

[[ Error checking omitted for clarity. ]]

The apparent timezone is unrelated to the kernel's idea of what the
current UTC time is.  Each node has it's own copy of /etc/localtime
copied from the master in the node_up script.  If you are having
timezone problems, verify that /etc/localzone is set correctly on the
master.

BTW, I'm personally offended by the need for /etc/localtime.  Yes,
actually insulted by its very existence.  The /etc/* files have long
been a configuration and maintenance issue for clusters.  We have put a
lot of thought into eliminating most of the /etc files.  But 'localzone'
is stubbornly required by the C library and it just _has_ to be there.

Scyld Beowulf only currently requires only three /etc files on the
compute nodes

 /etc/mtab
     Created by 'mount', this records the mounted file systems for 'df'.
     Someday it will be replaced by /proc/mtab, and thus will never be
     out of sync with the kernel.

 /etc/nsswitch.conf
     The Name Server Switch Configuration file.  This configures how
     name lookups ("Directory Services") are done.  The usual settings
     are "files", "NIS" or "DNS" (for hostnames).  We use this to
     specify Beowulf specific methods for user info, host name,
     netgroup, and "ethers" information.
     Someday this could be optionally replaced by an environment variable.

 /etc/localzone
     The static configuration for the local timezone e.g. Eastern
     Standard Time.  This really should be part of the NSSwitch system.
     That way Beowulf users could eliminate the final configuration file.
     Doing this would be useful for other users as well.  A new
     mechanism could be developed to allow implementing per-user, 
     per-group or per-tty timezone settings.  After all, if you are
     grid user near Chicago using machine in both NM and Livermore it
     would nice to have consistent time-stamps on the results.

Donald Becker				becker at scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Second Generation Beowulf Clusters
Annapolis MD 21403			410-990-9993

_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf



More information about the Beowulf mailing list