-
Notifications
You must be signed in to change notification settings - Fork 54
[1/n] create a nexus-debug service #8983
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
base: main
Are you sure you want to change the base?
Conversation
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 focused mostly on the OmicronZoneType
(and related) changes and skimmed the rest - looks good to me. I'm always a bit nervous changing these bits - probably worth testing a before -> mupdate -> after to make sure we didn't miss anything w.r.t. serialized ledgers? (Also fine to defer that testing to one of the follow PRs that build on this, if we want to stack a few and land them all together.)
@@ -1049,6 +1052,9 @@ mod test { | |||
[deployment.dropshot_internal] | |||
bind_address = "10.1.2.3:4568" | |||
default_request_body_max_bytes = 1024 | |||
[deployment.dropshot_debug] | |||
bind_address = "10.1.2.3:4569" |
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.
This allows a full socketaddr, but the DNS helper function only allows supplying a debug port. Is the expectation that the IP for this must match dropshot_internal
's? (Do we check that at runtime? Still reading the PR...)
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.
This object is a dropshot::ConfigDropshot
, so yeah unfortunately that’s the way it is. I think I check that they have the same IP at runtime but I should double-check all the calls.
@@ -320,14 +325,37 @@ pub trait SledAgentApi { | |||
path_params: Path<SupportBundlePathParam>, | |||
) -> Result<HttpResponseDeleted, HttpError>; | |||
|
|||
// TODO: https://github.com/oxidecomputer/dropshot/pull/1415 |
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.
This is published now I think?
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.
It wasn't when I posted this but I have a local change which fixes this, need to finish remerging.
use sled_hardware_types::{Baseboard, SledCpuFamily}; | ||
|
||
/// Identity and basic status information about this sled agent | ||
#[derive(Deserialize, Serialize, JsonSchema)] |
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.
Oooof on this whole file. Thanks for going through this tedium.
assert_eq!(new_srv.target, new_zone_host.fqdn()); | ||
assert_eq!(changed.len(), 2); | ||
assert_eq!(changed[0].0, ServiceName::NexusDebug.dns_name()); | ||
assert_eq!(changed[1].0, ServiceName::Nexus.dns_name()); |
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.
Is the order of changed
guaranteed?
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.
Yep, the underlying map is a BTreeMap. (As I wrote this my sense for flakes was tingling as well so I checked!)
First step of #8902. It's enough work to get Nexus to stand up another HTTP service that this is worth its own PR ahead of moving APIs out of nexus-internal and into nexus-debug.
To be done in the next PR is adding nexus-debug-client and moving the first batch of omdb/test-specific APIs over.