Skip to content

Improve error message from MGS when attempting to set wrong active slot #8350

Open
@karencfv

Description

@karencfv

When attempting to set the wrong RoT bootloader slot as active, I get the following response from MGS

error: Error Response: status: 400 Bad Request; headers: {"content-type": "application/json", "x-request-id": "f843617f-4a97-4e01-8943-920f33b9c38f", "content-length": "257", "date": "Tue, 17 Jun 2025 00:42:33 GMT"}; value: Error { error_code: Some("RequestUnsupportedForComponent"), message: "error communicating with SP SpIdentifier { typ: Switch, slot: 0 }: Error response from SP: unsupported request for this SP component", request_id: "f843617f-4a97-4e01-8943-920f33b9c38f" }

Or from faux-mgs

$ ./target/debug/faux-mgs --sp-sim-addr [::1]:48938 component-active-slot stage0 --set 0 -p
Jun 17 01:08:53.054 INFO creating SP handle on to talk to SP simulator at [::1]:48938, component: faux-mgs
Jun 17 01:08:53.054 INFO initial discovery complete, addr: [::1]:48938, component: faux-mgs
Error: Error response from SP: unsupported request for this SP component

This message implies that you can't set the active slot for the RoT bootloader via MGS, when in reality you're just trying to set the wrong slot.

Working fine when you set the correct slot :)

$ ./target/debug/faux-mgs --sp-sim-addr [::1]:48938 component-active-slot stage0 --set 1 -p
Jun 17 01:09:09.211 INFO creating SP handle on to talk to SP simulator at [::1]:48938, component: faux-mgs
Jun 17 01:09:09.211 INFO initial discovery complete, addr: [::1]:48938, component: faux-mgs
set active slot for SpComponent { id: "stage0" } to 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    developmentBugs, paper cuts, feature requests, or other thoughts on making omicron development better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions