-
Notifications
You must be signed in to change notification settings - Fork 58
Remove no-longer-needed internal NTP configuration options #6657
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
Changes from all commits
285b6c8
8d1ead8
e216bf0
40305c4
f2632e4
77f3972
916364f
199f85a
c350214
aa879ea
d9d3e7c
ea67184
1044644
3096591
48ee15b
c30a651
5af4223
9df2be0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,9 +245,6 @@ pub enum OmicronZoneType { | |
}, | ||
InternalNtp { | ||
address: SocketAddrV6, | ||
ntp_servers: Vec<String>, | ||
dns_servers: Vec<IpAddr>, | ||
domain: Option<String>, | ||
Comment on lines
-248
to
-250
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. I'm assuming this means that Sled Agent will no longer be sending this information as part of inventory, and that this is okay because we're still doing offline upgrades so Nexus will always be sync'd up? 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. Correct. This is most obvious in the change to |
||
}, | ||
Nexus { | ||
/// The address at which the internal nexus server is reachable. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -431,22 +431,10 @@ impl BpOmicronZone { | |
Some(SqlU32::from(*gz_address_index)); | ||
} | ||
BlueprintZoneType::InternalNtp( | ||
blueprint_zone_type::InternalNtp { | ||
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. Removing fields from |
||
address, | ||
ntp_servers, | ||
dns_servers, | ||
domain, | ||
}, | ||
blueprint_zone_type::InternalNtp { address }, | ||
) => { | ||
// Set the common fields | ||
bp_omicron_zone.set_primary_service_ip_and_port(address); | ||
|
||
// Set the zone specific fields | ||
bp_omicron_zone.ntp_ntp_servers = Some(ntp_servers.clone()); | ||
bp_omicron_zone.ntp_dns_servers = Some( | ||
dns_servers.iter().cloned().map(IpNetwork::from).collect(), | ||
); | ||
bp_omicron_zone.ntp_domain.clone_from(domain); | ||
} | ||
BlueprintZoneType::Nexus(blueprint_zone_type::Nexus { | ||
internal_address, | ||
|
@@ -649,12 +637,7 @@ impl BpOmicronZone { | |
}, | ||
), | ||
ZoneType::InternalNtp => BlueprintZoneType::InternalNtp( | ||
blueprint_zone_type::InternalNtp { | ||
address: primary_address, | ||
ntp_servers: ntp_servers?, | ||
dns_servers: ntp_dns_servers?, | ||
domain: self.ntp_domain, | ||
}, | ||
blueprint_zone_type::InternalNtp { address: primary_address }, | ||
), | ||
ZoneType::Nexus => { | ||
BlueprintZoneType::Nexus(blueprint_zone_type::Nexus { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1467,21 +1467,9 @@ impl InvOmicronZone { | |
inv_omicron_zone.dns_gz_address_index = | ||
Some(SqlU32::from(*gz_address_index)); | ||
} | ||
OmicronZoneType::InternalNtp { | ||
address, | ||
ntp_servers, | ||
dns_servers, | ||
domain, | ||
} => { | ||
OmicronZoneType::InternalNtp { address } => { | ||
// Set the common fields | ||
inv_omicron_zone.set_primary_service_ip_and_port(address); | ||
|
||
// Set the zone specific fields | ||
inv_omicron_zone.ntp_ntp_servers = Some(ntp_servers.clone()); | ||
inv_omicron_zone.ntp_dns_servers = Some( | ||
dns_servers.iter().cloned().map(IpNetwork::from).collect(), | ||
); | ||
inv_omicron_zone.ntp_domain.clone_from(domain); | ||
Comment on lines
-1478
to
-1484
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. I was expecting a change to the db model types and database schema and then I thought "this is gonna be complicated" because we might have old inventories that have this information. But I guess maybe: no change is strictly necessary because these are NULL-able fields anyway, so they will just be NULL for all new inventories? Should we still drop the columns? This technically loses data from old inventories where they were populated but I think we're saying this data is useless anyway. 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. We cannot drop the columns; they were used (i.e., set to non-NULL values) by both internal NTP and boundary NTP; they are still used by boundary NTP. Good question though - I need to update some comments that refer to them as applying to both kinds. 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. Updated the comments on these columns in |
||
} | ||
OmicronZoneType::Nexus { | ||
internal_address, | ||
|
@@ -1642,12 +1630,9 @@ impl InvOmicronZone { | |
|| anyhow!("expected dns_gz_address_index, found none"), | ||
)?, | ||
}, | ||
ZoneType::InternalNtp => OmicronZoneType::InternalNtp { | ||
address: primary_address, | ||
ntp_servers: ntp_servers?, | ||
dns_servers: ntp_dns_servers?, | ||
domain: self.ntp_domain, | ||
}, | ||
ZoneType::InternalNtp => { | ||
OmicronZoneType::InternalNtp { address: primary_address } | ||
} | ||
ZoneType::Nexus => OmicronZoneType::Nexus { | ||
internal_address: primary_address, | ||
external_ip: self | ||
|
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.
These comments should go a long way in reducing confusion about which of these to use. Thanks for straightening that out!