-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Add NTP extended configuration #15058
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
46c61d1
Add NTP YANG model
fastiuk e0fa6a7
Extend NTP config generation mechanism
fastiuk 235e111
Add NTP YANG nodel tests
fastiuk 4d271f4
Add test for NTP Jinja templates
fastiuk f4e8278
Add ntpdate package
fastiuk 1171ae4
Fix 'bad' when auth disabled
fastiuk 3f6a693
[NTP] Changed owner for ntp keys config file to root and remove read …
fastiuk 6f46ee7
Fix NTP warnings after restarting the service
fastiuk ee6ee4d
Add ability to encrypt/decrypt NTP keys
fastiuk 2cbcae9
Update Configuration reference
fastiuk 0537a0a
Merge branch 'master' into dev-ntp-configuration
fastiuk 80fa802
Fix NTP configuration template
fastiuk eac4a88
Fix YANG model description and tests
fastiuk f721615
Align NTP test according to fixed condition
fastiuk 69742ff
Merge branch 'master' into dev-ntp-configuration
fastiuk f911928
Merge branch 'master' into dev-ntp-configuration
fastiuk 82152b0
Merge branch 'master' into dev-ntp-configuration
fastiuk b693790
Merge branch 'master' into dev-ntp-configuration
fastiuk d9ac8e8
Merge branch 'master' into dev-ntp-configuration
fastiuk 30b1685
Merge branch 'master' into dev-ntp-configuration
fastiuk 63a830a
[submodule] Update submodule sonic-utilities
fastiuk a4df615
Merge branch 'master' into dev-ntp-configuration
fastiuk 97d19e7
[submodule] Update submodule sonic-utilities
fastiuk 63c3dd0
Allow eth0 to be as source ifc without defining it
fastiuk 5eadcfa
Align NTP keys file for bookworm
fastiuk 99e779d
Remowe the WA for collision between pool and nopeer
fastiuk f2edb44
Update NTP config test according to new path
fastiuk 64b3040
Merge branch 'master' into dev-ntp-configuration
fastiuk 5a16d6d
Remove ntpsec-ntpdate if-up.d script
fastiuk 403d1da
Merge branch 'master' into dev-ntp-configuration
fastiuk e2e8d97
Update sample config with NTP config
fastiuk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
############################################################################### | ||
# This file was AUTOMATICALLY GENERATED. DO NOT MODIFY. | ||
# Controlled by ntp-config.service | ||
############################################################################### | ||
|
||
{# We can connect only to the servers we trust. Determine those servers -#} | ||
{% set trusted_arr = [] -%} | ||
{% for server in NTP_SERVER if NTP_SERVER[server].trusted == 'yes' and | ||
NTP_SERVER[server].resolve_as -%} | ||
{% set _ = trusted_arr.append(NTP_SERVER[server].resolve_as) -%} | ||
{% endfor -%} | ||
|
||
{# Define authentication keys inventory -#} | ||
{% set trusted_str = ' ' ~ trusted_arr|join(',') -%} | ||
{% for keyid in NTP_KEY if NTP_KEY[keyid].type and NTP_KEY[keyid].value %} | ||
{% set keyval = NTP_KEY[keyid].value | b64decode %} | ||
{{ keyid }} {{ NTP_KEY[keyid].type }} {{ keyval }}{{trusted_str}} | ||
{% endfor -%} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please also add an example of ntp.keys where trusted_str is not empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will attach it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the example:
Ip addresses here are trusted servers