oxidecomputer / oxidecomputer/dendrite
return better error message on port config failure
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 20
- Forks
- 3
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 4
Description
When attempting to create a 40g link with RS-fec from wicket, it failed and returned an error message of:
✘ Configuring switch (105.791986ms)
failed to create port Qsfp(Qsfp("qsfp0"))
Caused by:
Error Response: status: 400 Bad Request; headers: {"content-type": "application/json", "x-request-id": "60b4d195-4373-4990-99b0-03120fefb8f0", "content-length": "161", "date": "Sun, 28 Dec 1986 00:15:11 GMT"}; value: Error { error_code: Some("invalid data: invalid port configuration"), message: "invalid port configuration", request_id: "60b4d195-4373-4990-99b0-03120fefb8f0" }
Looking at the dpd log we can see both the source of that message, as well as the much more useful error logged by the SDE:
1986-12-28 00:17:05.908733 BF_PM ERROR - pm_port_valid_speed_and_channel_internal:979 Port validation failed for Dev-family: Tofino2 dev : 0 d_p : 320 : 33/0 speed : 40g num-lanes: 4 error-msg: RS FEC not valid for this speed
00:17:05.910Z ERRO dpd: port_settings op failed: Switch(InvalidArg("invalid port configuration"))
We should find a way to convey the detailed message from the SDE to dpd, and thus to the original client. If it's not practical to fix the error mechanism from SDE (which I suspect is just a single 32-bit error code), we can certainly sanity check the speed/fec combinations in dpd before calling into the SDE, and generate a more useful error ourselves.
Contributor guide
No contributing guide indexed for this repository
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 by tracing the dpd port_settings operation and the SDE error path described in the issue, comparing the detailed dpd log with the error returned to wicket. Done means the original client receives the detailed validation reason, or dpd performs a speed/FEC sanity check and reports a useful error before calling the SDE.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100