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

[NTP] Update NTP configuration via ConfigDB #60

Merged
merged 6 commits into from
Nov 13, 2023

Conversation

fastiuk
Copy link
Contributor

@fastiuk fastiuk commented May 13, 2023

hld #1219
closes #1171

This PR brings functionality that allows us to update the NTP configs by writing to the NTP, NTP_SERVER, and NTP_KEY tables of ConfigDB.

@fastiuk
Copy link
Contributor Author

fastiuk commented May 13, 2023

Tests will fail until sonic-net/sonic-swss-common#781 will be merged

@fastiuk fastiuk self-assigned this May 13, 2023
@fastiuk fastiuk force-pushed the dev-ntp-configuration branch 3 times, most recently from 64d4f01 to e46a3aa Compare June 3, 2023 19:23
@fastiuk fastiuk force-pushed the dev-ntp-configuration branch from e46a3aa to 8141e90 Compare June 21, 2023 19:47
scripts/hostcfgd Outdated
"""
NTP_CONF_RESTART = ['service', 'ntp-config', 'restart']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is service being used instead of systemctl?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No special reason. Both will work equally.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regardless, I think systemctl should be used instead of service here, since the systemctl command is already used in many other places, and this would keep things consistent.

fastiuk added 2 commits July 5, 2023 01:17
Signed-off-by: Yevhen Fastiuk <[email protected]>
@fastiuk fastiuk force-pushed the dev-ntp-configuration branch from 8141e90 to c2a05e8 Compare July 4, 2023 22:17
@liat-grozovik
Copy link
Collaborator

/azpw run sonic-host-services

1 similar comment
@fastiuk
Copy link
Contributor Author

fastiuk commented Nov 13, 2023

/azpw run sonic-host-services

@mssonicbld
Copy link

/AzurePipelines run sonic-host-services

Copy link

No pipelines are associated with this pull request.

@liat-grozovik liat-grozovik merged commit ae613fe into sonic-net:master Nov 13, 2023
5 checks passed
qiluo-msft pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Dec 11, 2023
hld [#1296](sonic-net/SONiC#1296)
closes [#1254](sonic-net/SONiC#1254)
depends-on [#60](sonic-net/sonic-host-services#60), [#781](sonic-net/sonic-swss-common#781), [#2835](sonic-net/sonic-utilities#2835), [#10749](sonic-net/sonic-mgmt#10749)

#### Why I did it
To cover the next AIs:
* Configure NTP global parameters
* Add/remove new NTP servers
* Change the configuration for NTP servers
* Show NTP status
* Show NTP configuration

### How I did it
* Add YANG model for a new configuration
* Extend configuration templates to support new knobs

### Description for the changelog
* Add ability to configure NTP global parameters such as authentication, dhcp, admin state
* Change the configuration for NTP servers
* Add an ability to show NTP configuration

#### Link to config_db schema for YANG module changes
[NTP configuration](https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md#ntp-and-syslog-servers)
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.

NTP: Additional NTP configuration knobs + NTP server provisioning
4 participants