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

Commits on Oct 24, 2024

  1. Watch NTP server change in timesyncd

    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]>
    cm-jishnu authored and cmjishnu committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    bca7491 View commit details
    Browse the repository at this point in the history