Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ mod api_impl {
use sled_agent_types::inventory::SledCpuFamily;
use sled_agent_types::inventory::SledRegistrationInfo;
use sled_agent_types::inventory::SvcsEnabledNotOnlineResult;
use sled_agent_types::multirack::MultirackJoinCompleteResponse;
use sled_agent_types::multirack::MultirackJoinServiceStatus;
use sled_agent_types::probes::ProbeSet;
use sled_agent_types::sled::AddSledRequest;
Expand Down Expand Up @@ -1146,7 +1147,8 @@ mod api_impl {

async fn multirack_join_complete(
_request_context: RequestContext<Self::Context>,
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
) -> Result<HttpResponseOk<MultirackJoinCompleteResponse>, HttpError>
{
unimplemented!()
}

Expand Down
1 change: 1 addition & 0 deletions openapi/sled-agent/sled-agent-62.0.0-539084.json.gitstub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
80c9531ef93788125f9a88789ed0406d0967a68e:openapi/sled-agent/sled-agent-62.0.0-539084.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://oxide.computer",
"email": "api@oxide.computer"
},
"version": "62.0.0"
"version": "63.0.0"
},
"paths": {
"/artifacts": {
Expand Down Expand Up @@ -380,11 +380,18 @@
"/multirack-join-complete": {
"put": {
"summary": "Report that this sled's multirack join is complete.",
"description": "Sent by Nexus once it has observed this sled on the underlay network.",
"description": "Sent by Nexus once it has observed this sled on the underlay network. Returns the final bootstore generation written by the multirack join service. Repeated requests return the same generation.\n\nReturns 409 Conflict if this request arrives while a new networking configuration was accepted but not written. Also returns 409 Conflict if sled-agent restarted after a completed join.",
"operationId": "multirack_join_complete",
"responses": {
"204": {
"description": "resource updated"
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultirackJoinCompleteResponse"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
Expand Down Expand Up @@ -7252,6 +7259,21 @@
}
]
},
"MultirackJoinCompleteResponse": {
"description": "The result of completing a multirack join",
"type": "object",
"properties": {
"bootstore_generation": {
"description": "The latest bootstore generation when join completes.",
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
"required": [
"bootstore_generation"
]
},
"MultirackJoinServiceStatus": {
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion openapi/sled-agent/sled-agent-latest.json
31 changes: 29 additions & 2 deletions sled-agent/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ api_versions!([
// | example for the next person.
// v
// (next_int, IDENT),
(63, MULTIRACK_JOIN_COMPLETE_GENERATION),
(62, ADD_SLED_REGISTRATION_INFO),
(61, TRUST_QUORUM_NULLABLE_RESPONSES),
(60, ADD_MULTIRACK_JOIN_SERVICE_STATUS),
Expand Down Expand Up @@ -1844,14 +1845,40 @@ pub trait SledAgentApi {
/// Report that this sled's multirack join is complete.
///
/// Sent by Nexus once it has observed this sled on the underlay network.
/// Returns the final bootstore generation written by the multirack join
/// service. Repeated requests return the same generation.
///
/// Returns 409 Conflict if this request arrives while a new networking
/// configuration was accepted but not written. Also returns 409 Conflict
Comment thread
nicolaskagami marked this conversation as resolved.
Resolved
/// if sled-agent restarted after a completed join.
#[endpoint {
method = PUT,
path = "/multirack-join-complete",
versions = VERSION_ADD_MULTIRACK_JOIN_COMPLETE..,
versions = VERSION_MULTIRACK_JOIN_COMPLETE_GENERATION..,
}]
async fn multirack_join_complete(
request_context: RequestContext<Self::Context>,
) -> Result<HttpResponseUpdatedNoContent, HttpError>;
) -> Result<
HttpResponseOk<latest::multirack::MultirackJoinCompleteResponse>,
HttpError,
>;

/// Report that this sled's multirack join is complete.
///
/// Sent by Nexus once it has observed this sled on the underlay network.
#[endpoint {
operation_id = "multirack_join_complete",
method = PUT,
path = "/multirack-join-complete",
versions = VERSION_ADD_MULTIRACK_JOIN_COMPLETE..VERSION_MULTIRACK_JOIN_COMPLETE_GENERATION,
}]
async fn multirack_join_complete_v56(
request_context: RequestContext<Self::Context>,
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
Self::multirack_join_complete(request_context)
.await
.map(|_| HttpResponseUpdatedNoContent())
}

/// Return the status of this sled's multirack join service.
///
Expand Down
Loading
Loading