-
Notifications
You must be signed in to change notification settings - Fork 40
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
internal NTP: resolve boundary NTP sources from DNS in addition to being told explicitly #6050
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4414717
Add boundary NTP internal DNS name with AAAA records for chrony
jgallagher 3c49902
add --boundary-pool arg to chrony zone-setup
jgallagher fe660b4
SMF XML typo fix
jgallagher ef7340a
don't attach DNS zone too early
jgallagher cf33427
test fix
jgallagher 1098aca
review feedback
jgallagher fa58d40
replace TODO with issue link
jgallagher 24b7562
update internal-dns unit test to include boundary NTP
jgallagher 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 |
---|---|---|
|
@@ -104,6 +104,13 @@ struct ChronySetupArgs { | |
/// allowed IPv6 range | ||
#[arg(short, long)] | ||
allow: Ipv6Net, | ||
/// DNS name for the boundary NTP zone pool | ||
#[arg( | ||
short = 'p', | ||
long, | ||
value_parser = NonEmptyStringValueParser::default(), | ||
)] | ||
boundary_pool: String, | ||
} | ||
|
||
// The default clap parser for `serde_json::Value` is to wrap the argument in a | ||
|
@@ -396,6 +403,9 @@ makestep 1.0 3 | |
leapsecmode slew | ||
maxslewrate 2708.333 | ||
|
||
# Refresh boundary NTP servers every two minutes instead of every two weeks | ||
refresh 120 | ||
|
||
"; | ||
|
||
let boundary_ntp_tpl = "# | ||
|
@@ -447,6 +457,7 @@ maxslewrate 2708.333 | |
boundary: is_boundary, | ||
servers, | ||
allow, | ||
boundary_pool, | ||
} = args; | ||
|
||
let mut new_config = | ||
|
@@ -464,10 +475,19 @@ maxslewrate 2708.333 | |
.expect("write to String is infallible"); | ||
} | ||
} else { | ||
// TODO-cleanup: Remove specific boundary NTP servers after R10 is cut; | ||
// once all racks are setting up the boundary NTP pool we can drop | ||
// individual server lines: | ||
// https://github.com/oxidecomputer/omicron/issues/6261 | ||
for s in servers { | ||
writeln!(&mut new_config, "server {s} iburst minpoll 0 maxpoll 4") | ||
.expect("write to String is infallible"); | ||
} | ||
writeln!( | ||
&mut new_config, | ||
"pool {boundary_pool} iburst maxdelay 0.1 maxsources 16", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: I haven't reviewed the change in the chrony config |
||
) | ||
.expect("write to String is infallible"); | ||
} | ||
|
||
// We read the contents from the old configuration file if it existed | ||
|
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.
Worth adding a unit test for this?
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.
I'm on the fence - the expanded
test_blueprint_internal_dns_basic
does check for this name. If you'd like a unit test specific to this crate, I can add one?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.
I think it's worth it, mainly because I think it should just be 1-2 lines of code in
test_builder_output()
below (plus regenerate the expectorate file).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.
Sure enough! Added in 24b7562