oxidecomputer / oxidecomputer/omicron
a4x2 sim-sp reporting wrong type for some targets
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
On a4x2:
root@oxz_switch:~# omdb mgs inventory
note: MGS URL not specified. Will pick one from DNS.
note: using DNS server for subnet fd00:1122:3344::/48
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using MGS URL http://[fd00:1122:3344:101::2]:12225
ALL CONFIGURED SPs
TYPE SLOT
Sled 0
Sled 1
Sled 2
Sled 3
Switch 0
SPs FOUND THROUGH IGNITION
TYPE SLOT SYSTEM_TYPE
Sled 0 Gimlet
Sled 1 Gimlet
Sled 2 Gimlet
Sled 3 Sidecar
Switch 0 Gimlet
...
In ignition, switch 0 reports itself as a Gimlet and sled 3 reports itself as a Sidecar. That seems wrong? I confirmed this is wrong in the MGS response:
$ curl -s http://[::1]:12225/ignition
...
(piped to jq off-box)
[
{
"id": {
"type": "sled",
"slot": 3
},
"details": {
"present": "yes",
"id": {
"system_type": "sidecar"
},
"power": true,
"ctrl_detect_0": true,
"ctrl_detect_1": false,
"flt_a3": false,
"flt_a2": false,
"flt_rot": false,
"flt_sp": false
}
},
{
"id": {
"type": "switch",
"slot": 0
},
"details": {
"present": "yes",
"id": {
"system_type": "gimlet"
},
"power": true,
"ctrl_detect_0": true,
"ctrl_detect_1": false,
"flt_a3": false,
"flt_a2": false,
"flt_rot": false,
"flt_sp": false
}
},
{
"id": {
"type": "sled",
"slot": 0
},
"details": {
"present": "yes",
"id": {
"system_type": "gimlet"
},
"power": true,
"ctrl_detect_0": true,
"ctrl_detect_1": false,
"flt_a3": false,
"flt_a2": false,
"flt_rot": false,
"flt_sp": false
}
},
{
"id": {
"type": "sled",
"slot": 1
},
"details": {
"present": "yes",
"id": {
"system_type": "gimlet"
},
"power": true,
"ctrl_detect_0": true,
"ctrl_detect_1": false,
"flt_a3": false,
"flt_a2": false,
"flt_rot": false,
"flt_sp": false
}
},
{
"id": {
"type": "sled",
"slot": 2
},
"details": {
"present": "yes",
"id": {
"system_type": "gimlet"
},
"power": true,
"ctrl_detect_0": true,
"ctrl_detect_1": false,
"flt_a3": false,
"flt_a2": false,
"flt_rot": false,
"flt_sp": false
}
}
]
I spent some time trying to track this down but it wasn't obvious. The initial ignition states appear to be set here in sp-sim:
https://github.com/oxidecomputer/omicron/blob/903b9929e3add74c9407274f2315fdff45126d2e/sp-sim/src/sidecar.rs#L1275-L1280
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in sp-sim/src/sidecar.rs at the initial ignition-state setup around lines 1275-1280, then compare those states with the /ignition MGS response and omdb mgs inventory output shown here. Done means switch 0 and sled 3 report their correct system types instead of Gimlet and Sidecar respectively.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100