Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions clients/sled-agent-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ progenitor::generate_api!(
ServiceZoneNatEntry = sled_agent_types_versions::latest::system_networking::ServiceZoneNatEntry,
Sha3_256Digest = sled_agent_types_versions::latest::rot::Sha3_256Digest,
SingleMeasurementInventory = sled_agent_types_versions::latest::inventory::SingleMeasurementInventory,
SledAgentInfo = sled_agent_types_versions::latest::multirack::SledAgentInfo,
SledRole = sled_agent_types_versions::latest::inventory::SledRole,
SledVmmState = sled_agent_types_versions::latest::instance::SledVmmState,
SourceNatConfigGeneric = sled_agent_types_versions::latest::inventory::SourceNatConfigGeneric,
Expand Down
8 changes: 8 additions & 0 deletions nexus/mgs-updates/src/test_util/host_phase_2_test_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ mod api_impl {
use sled_agent_types::inventory::OmicronSledUpdateDisposition;
use sled_agent_types::inventory::SledCpuFamily;
use sled_agent_types::inventory::SvcsEnabledNotOnlineResult;
use sled_agent_types::multirack::MultirackJoinServiceStatus;
use sled_agent_types::probes::ProbeSet;
use sled_agent_types::sled::AddSledRequest;
use sled_agent_types::support_bundle::RangeRequestHeaders;
Expand Down Expand Up @@ -1152,5 +1153,12 @@ mod api_impl {
) -> Result<HttpResponseUpdatedNoContent, HttpError> {
unimplemented!()
}

async fn multirack_join_service_status(
_request_context: RequestContext<Self::Context>,
) -> Result<HttpResponseOk<MultirackJoinServiceStatus>, HttpError>
{
unimplemented!()
}
}
}
99 changes: 79 additions & 20 deletions openapi/bootstrap-agent-lockstep.json
Original file line number Diff line number Diff line change
Expand Up @@ -2343,6 +2343,14 @@
{
"type": "object",
"properties": {
"start_sled_agent_status": {
"nullable": true,
"allOf": [
{
"$ref": "#/components/schemas/StartSledAgentsStatus"
}
]
},
"state": {
"type": "string",
"enum": [
Expand All @@ -2357,6 +2365,9 @@
{
"type": "object",
"properties": {
"rack_id": {
"$ref": "#/components/schemas/RackUuid"
},
"sleds": {
"title": "BiHashMap",
"x-rust-type": {
Expand All @@ -2380,25 +2391,57 @@
"enum": [
"start_sled_agents"
]
},
"this_nodes_sled_id": {
"$ref": "#/components/schemas/SledUuid"
}
},
"required": [
"rack_id",
"sleds",
"state"
"state",
"this_nodes_sled_id"
]
},
{
"type": "object",
"properties": {
"rack_id": {
"$ref": "#/components/schemas/RackUuid"
},
"sleds": {
"title": "BiHashMap",
"x-rust-type": {
"crate": "iddqd",
"parameters": [
{
"$ref": "#/components/schemas/SledAgentInfo"
}
],
"path": "iddqd::BiHashMap",
"version": "*"
},
"type": "array",
"items": {
"$ref": "#/components/schemas/SledAgentInfo"
},
"uniqueItems": true
},
"state": {
"type": "string",
"enum": [
"wait_for_completion"
]
},
"this_nodes_sled_id": {
"$ref": "#/components/schemas/SledUuid"
}
},
"required": [
"state"
"rack_id",
"sleds",
"state",
"this_nodes_sled_id"
]
},
{
Expand Down Expand Up @@ -4018,24 +4061,6 @@
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"reason": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"failed"
]
}
},
"required": [
"reason",
"type"
]
}
]
},
Expand All @@ -4048,6 +4073,40 @@
"type": "string",
"format": "uuid"
},
"StartSledAgentsStatus": {
"type": "object",
"properties": {
"rack_id": {
"$ref": "#/components/schemas/RackUuid"
},
"sleds": {
"title": "BiHashMap",
"x-rust-type": {
"crate": "iddqd",
"parameters": [
{
"$ref": "#/components/schemas/SledAgentInfo"
}
],
"path": "iddqd::BiHashMap",
"version": "*"
},
"type": "array",
"items": {
"$ref": "#/components/schemas/SledAgentInfo"
},
"uniqueItems": true
},
"this_nodes_sled_id": {
"$ref": "#/components/schemas/SledUuid"
}
},
"required": [
"rack_id",
"sleds",
"this_nodes_sled_id"
]
},
"SwitchSlot": {
"description": "Identifies switch physical location",
"oneOf": [
Expand Down
1 change: 1 addition & 0 deletions openapi/sled-agent/sled-agent-59.0.0-8d320f.json.gitstub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
140f558aa442ceb73583fe6da4032747a96e32cd:openapi/sled-agent/sled-agent-59.0.0-8d320f.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": "59.0.0"
"version": "60.0.0"
},
"paths": {
"/artifacts": {
Expand Down Expand Up @@ -395,6 +395,31 @@
}
}
},
"/multirack-join-service-status": {
"get": {
"summary": "Return the status of this sled's multirack join service.",
"description": "Returns a 404 if no multirack join service is running, or a 409 if the service is running but has not yet determined its status.",
"operationId": "multirack_join_service_status",
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MultirackJoinServiceStatus"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/network-bootstore-config": {
"put": {
"operationId": "write_network_bootstore_config",
Expand Down Expand Up @@ -7202,6 +7227,44 @@
}
]
},
"MultirackJoinServiceStatus": {
"type": "object",
"properties": {
"rack_id": {
"$ref": "#/components/schemas/RackUuid"
},
"rack_subnet": {
"$ref": "#/components/schemas/Ipv6Subnet"
},
"sled_agents": {
"title": "BiHashMap",
"x-rust-type": {
"crate": "iddqd",
Comment thread
andrewjstone marked this conversation as resolved.
Resolved
"parameters": [
{
"$ref": "#/components/schemas/SledAgentInfo"
}
],
"path": "iddqd::BiHashMap",
"version": "*"
},
"type": "array",
"items": {
"$ref": "#/components/schemas/SledAgentInfo"
},
"uniqueItems": true
},
"sled_id": {
"$ref": "#/components/schemas/SledUuid"
}
},
"required": [
"rack_id",
"rack_subnet",
"sled_agents",
"sled_id"
]
},
"MupdateOverrideBootInventory": {
"description": "Inventory representation of the MUPdate override on the boot disk.",
"type": "object",
Expand Down Expand Up @@ -9602,6 +9665,67 @@
"result"
]
},
"SledAgentInfo": {
"description": "Status information for a given sled agent",
"type": "object",
"properties": {
"address": {
"type": "string",
"format": "ipv6"
},
"baseboard_id": {
"$ref": "#/components/schemas/BaseboardId"
},
"sled_id": {
"$ref": "#/components/schemas/SledUuid"
},
"start_state": {
"$ref": "#/components/schemas/SledAgentStartState"
}
},
"required": [
"address",
"baseboard_id",
"sled_id",
"start_state"
]
},
"SledAgentStartState": {
"oneOf": [
{
"type": "object",
"properties": {
"last_error": {
"nullable": true,
"type": "string"
},
"type": {
"type": "string",
"enum": [
"in_progress"
]
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"started"
]
}
},
"required": [
"type"
]
}
]
},
"SledConfigGeneration": {
"description": "Generation numbers stored in the database, used for optimistic concurrency control",
"x-rust-type": {
Expand Down
2 changes: 1 addition & 1 deletion openapi/sled-agent/sled-agent-latest.json
17 changes: 17 additions & 0 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),
(60, ADD_MULTIRACK_JOIN_SERVICE_STATUS),
(59, INSTANCE_ATTACHED_SUBNETS_MAP),
(58, BYTE_WRAPPER_0_2_BUMP),
(57, ADD_RACK_ID_TO_INVENTORY),
Expand Down Expand Up @@ -1773,4 +1774,20 @@ pub trait SledAgentApi {
async fn multirack_join_complete(
request_context: RequestContext<Self::Context>,
) -> Result<HttpResponseUpdatedNoContent, HttpError>;

/// Return the status of this sled's multirack join service.
///
/// Returns a 404 if no multirack join service is running, or a 409 if the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cool, I can't remember ever seeing 409 used before, always fun seeing unusual status codes in places that actually make sense for them :)

/// service is running but has not yet determined its status.
#[endpoint {
method = GET,
path = "/multirack-join-service-status",
versions = VERSION_ADD_MULTIRACK_JOIN_SERVICE_STATUS..,
}]
async fn multirack_join_service_status(
request_context: RequestContext<Self::Context>,
) -> Result<
HttpResponseOk<latest::multirack::MultirackJoinServiceStatus>,
HttpError,
>;
}
Loading
Loading