VIO Changing NTP servers in a systemd-networkd configuration
search cancel

VIO Changing NTP servers in a systemd-networkd configuration

book

Article ID: 321707

calendar_today

Updated On:

Products

VMware VMware Integrated OpenStack

Issue/Introduction

Symptoms:
  • Using VMware Integrated Openstack 6.x
  • systemd-timesyncd.service reports timed out error connecting to NTP servers.
root@vio6 [ ~ ]# systemctl status systemd-timesyncd.service

Apr 07 10:55:58 vio6.gsslabs.org systemd-timesyncd[1127]: Timed out waiting for reply from 85.91.1.164:123 (0.ie.pool.ntp.org).
Apr 07 10:56:08 vio6.gsslabs.org systemd-timesyncd[1127]: Timed out waiting for reply from 188.125.64.6:123 (1.ie.pool.ntp.org).


Environment

VMware Integrated OpenStack 6.x

Cause

  • Firewall or port filter blocking NTP packages.
Current configuration of VIO6 can be viewed by:
kubectl get secret system-info -n openstack -o yaml

Note: The ntpServers value is set in the machine CR and modifying it will not recreate controller VM.

Resolution

  • Fix the network problem that is preventing communication to the NTP server.
Note:   The controller VMs have both management network and API network but the default gateway is API network.

Workaround:
To change NTP servers on modify the systemd configuration manually on each node.
  1. ssh into the manager node and edit:

/etc/systemd/timesyncd.conf
[Time]
NTP=xxx.xxx.xxx.xxx

  1. Restart timesyncd and verify time synchronization:

systemctl restart systemd-timesyncd.service
systemctl status systemd-timesyncd.service

timedatectl show-timesync 
timedatectl timesync-status
timedatectl

  1. Login to a controller node(s):

root@oms [ /var/log ]# kubectl get node
NAME                    STATUS   ROLES                     AGE   VERSION
controller-2rx87xxnsb   Ready    openstack-control-plane   55d   v1.14.1
controller-6qjfjbnnq7   Ready    openstack-control-plane   55d   v1.14.1
controller-tmgjfmnvr5   Ready    openstack-control-plane   55d   v1.14.1
oms.vio.local           Ready    master                    55d   v1.14.1

root@oms [ /var/log ]# viossh controller-2rx87xxnsb
Last login: Wed Apr 15 13:26:29 UTC 2020 from 172.20.0.45 on pts/0
Last login: Wed Apr 15 21:25:31 2020 from 172.20.0.45
vioadmin@controller-2rx87xxnsb [ ~ ]$

  1. Edit this file:
/etc/systemd/timesyncd.conf.d/cloud-init.conf
[Time]
NTP=xxx.xxx.xxx.xxx
  1. Restart timesyncd and verify time synchronization:

sudo systemctl restart systemd-timesyncd.service
sudo systemctl status systemd-timesyncd.service

timedatectl show-timesync 
timedatectl timesync-status
timedatectl