Installing Network Time Protocol (NTP)
To keep all the services in sync across multiple machines,
you need to install NTP, and if you do a multi-node
configuration you will configure one server to be the
reference server.
$ sudo apt-get install ntp
$ sudo yum install ntp
$ sudo zypper install ntp
Set up the NTP server on your controller node so that it
receives data by modifying the ntp.conf
file and restarting the service. As root:
# sed -i 's/server ntp.ubuntu.com/server ntp.ubuntu.com\nserver 127.127.1.0\nfudge 127.127.1.0 stratum 10/g' /etc/ntp.conf
# service ntp restart
$ sudo service ntpd start
$ sudo chkconfig ntpd on
$ sudo systemctl start ntp.service
$ sudo systemctl enable ntp.service
Set up the NTP client on your compute node so that the time
between controller node and compute node is synchronized. The
simplest way to do this is to add a daily cron job that
synchronizes the compute node's clock with the controller
node. You can accomplish this by adding a file, owned by root,
marked executable, at
/etc/cron.daily/ntpdate that contains
the
following:ntpdate <hostname or IP address of controller>
hwclock -w
If a large clock skew builds up between the compute nodes and the controller node, then
the time change that occurs when the ntpdate cron job runs may confuse some programs running
on the compute nodes. To allow more gradual time updates, install the NTP package on the
compute nodes in addition to the API nodes.