Configuring NTP
Configure NTP to synchronize the time between compute and controller nodes.
- Install the chrony component on all nodes.
yum install -y chrony
- Set the same time zone for all nodes. For example, set the time zone to Asia.
timedatectl set-timezone Asia/Shanghai
- Set the controller node as the NTP server node.
- Modify the /etc/chrony.conf file on the controller node.
vi /etc/chrony.conf
- Press i to enter the insert mode and add the following content:
allow controller_subnet_ip/21 local stratum 10
- controller_subnet_ip and 21 indicate the network segment and subnet of the IP address of the controller node. For example, if the IP address of the controller node is 192.128.10.2, its controller_subnet_ip is 192.128.10.0.
- local stratum indicates the time synchronization precision.
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Modify the /etc/chrony.conf file on the controller node.
- Configure the compute and storage nodes as NTP clients.
- Modify the /etc/chrony.conf file on the compute and storage nodes.
vi /etc/chrony.conf
- Press i to enter the insert mode and comment out the following line:
pool pool.ntp.org iburst

Add the following content:
server controller iburst
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Modify the /etc/chrony.conf file on the compute and storage nodes.
- Start the NTP service.
- Start the NTP service on all nodes and check the service status.
systemctl enable chronyd.service systemctl start chronyd.service systemctl status chronyd.service
- Start NTP synchronization on all nodes.
timedatectl set-ntp no timedatectl set-ntp yes
- Start the NTP service on all nodes and check the service status.
- Verify time synchronization.
chronyc sources
The controller is displayed as the clock source of the compute and storage nodes.

The external clock source is displayed on the controller node.

If the controller node is not connected to the Internet, the external clock source is not displayed.
Parent topic: Configuring the Deployment Environment