Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch NTP server change in timesyncd #156

Open
wants to merge 1 commit into
base: 1110
Choose a base branch
from

Conversation

cmjishnu
Copy link

Any change in the dynamic NTP servers when system is in manual mode as the timesyncd is disabled. However the change is not updated even when the system is switched to NTP mode. This commit also consists of the changes to the reload the NTP servers whenever it switches from manual to NTP mode.

Tested by:
Switched to manual mode, updated the NTP servers in DHCP. Verified the updated NTP server is reflected in networkd when switched back to manual.

Fixes : https://jazz07.rchland.ibm.com:13443/jazz/web/projects/CSSD#action=com.ibm.team.workitem.viewWorkItem&id=649008

Change-Id: I6a58e44795e60490d8bee106548de043be40bfe8

In phosphor-networkd, network-provided NTP servers are updated only at
the time of interface creation. Any modifications to the NTP server
are not reflected in networkd until the next restart. As of systemd
version 255, timesyncd emits a property changed signal when the
LinkNTPServers property is updated. This commit implements a watch for
the signal from timesyncd, ensuring that phosphor-networkd loads the
updated NTP servers dynamically.

Also, any change in the dynamic NTP servers when system is in manual
mode as the timesyncd is disabled. However the change is not updated
even when the system is switched to NTP mode. This commit also consists
of the changes to the reload the NTP servers whenever it switches from
manual to NTP mode.

Tested by:

1. Connected the BMC to a DHCP server
2. Configured the DHCP server with the NTP server IP.
3. Verified that timesyncd is updated with the new NTP server IP.
4. Confirmed that phosphor-networkd receives the signal and updates
the D-Bus with the latest NTP servers from timesyncd.
5. Switched to manual mode, updated the NTP servers in DHCP. Verified
the updated NTP server is reflected in networkd.

Change-Id: I6a58e44795e60490d8bee106548de043be40bfe8
Signed-off-by: Jishnu CM <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants