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

[3/3 sled-agent] convert bootstrap agent API into a trait #6124

Conversation

sunshowers
Copy link
Contributor

Make a new bootstrap-agent-api crate which has the bootstrap agent trait in it,
and implement it within the sled agent.

Changed some of the comments slightly to align their style generally with
omicron ("Resets" -> "Reset").

Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
@sunshowers sunshowers changed the title [sled-agent] convert bootstrap agent API into a trait [3/3 sled-agent] convert bootstrap agent API into a trait Jul 19, 2024
Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
rqctx: RequestContext<Self::Context>,
) -> Result<HttpResponseOk<Baseboard>, HttpError>;

/// Provide a list of components known to the bootstrap agent.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed these to be "Provide" instead of "Provides" etc, because that's the general style we use within Omicron. (I personally prefer "Provides" in my own projects, but I think consistency is more important.)

"title": "Oxide Bootstrap Agent API",
"description": "API for interacting with individual sleds",
"title": "Bootstrap Agent API",
"description": "Per-sled API for setup and teardown",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also changed this.

@@ -0,0 +1,19 @@
[package]
name = "bootstrap-agent-api"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this live under sled-agent, just like nexus-internal-api lives under nexus? I think the actual sled-agent API would live under sled-agent.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I kinda think that makes sense, though I acknowledge "clearly either way could work".

Just having the directory within sled-agent makes it more clear to me, IMO, that the bootstrap agent is software running within the sled agent process.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -0,0 +1,19 @@
[package]
name = "bootstrap-agent-api"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I kinda think that makes sense, though I acknowledge "clearly either way could work".

Just having the directory within sled-agent makes it more clear to me, IMO, that the bootstrap agent is software running within the sled agent process.

@sunshowers sunshowers changed the base branch from sunshowers/spr/main.sled-agent-convert-bootstrap-agent-api-into-a-trait to main July 19, 2024 23:16
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
@sunshowers sunshowers enabled auto-merge (squash) July 20, 2024 04:45
@sunshowers sunshowers merged commit b83eb7c into main Jul 20, 2024
25 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/sled-agent-convert-bootstrap-agent-api-into-a-trait branch July 20, 2024 06:02
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.

2 participants