Open
Description
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