oxidecomputer / oxidecomputer/omicron
Could automatically apply switch-port settings to newly created links
@rcgoodfellow is already working on this.
Since Sep 12, 2024.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
I'm attempting to create links on the london environment through the CLI for the first time. The process is a bit confusing, because one needs to create a link and also apply some switch-port settings to that for the link to be created and enabled. The settings object gets created implicitly it looks like -- just doing:
bnaecker@flint : ~/file-cabinet/oxide/oxide.rs $ ./target/release/oxide --profile london system networking link add --rack b373c1a2-8cd1-457f-be2a-1eec43bdd866 --switch switch1 --port qsfp3 --fec rs --speed 100g
Results in:
bnaecker@flint : ~/file-cabinet/oxide/oxide.rs $ ./target/release/oxide --profile london system networking switch-port-settings list
[
{
"description": "initial uplink configuration",
"id": "b3998a2e-95cb-40ff-919a-67c3771edb80",
"name": "default-uplink0",
"time_created": "2024-09-11T19:49:33.302277Z",
"time_modified": "2024-09-11T19:49:33.302277Z"
}, {
"description": "initial uplink configuration",
"id": "0b8a1b26-d357-4248-b1f9-dc695134cf4d",
"name": "default-uplink1",
"time_created": "2024-09-11T19:49:33.560949Z",
"time_modified": "2024-09-11T19:49:33.560949Z"
}, {
"description": "",
"id": "6800e1a8-bd73-4d5d-8a5f-20733d8751e1",
"name": "switch0-qsfp3",
"time_created": "2024-09-12T17:28:45.518309Z",
"time_modified": "2024-09-12T17:28:45.518309Z"
}, {
"description": "",
"id": "7c60f2e4-f457-4b9f-828d-cc57ad39af0c",
"name": "switch1-qsfp3",
"time_created": "2024-09-12T17:29:24.525219Z",
"time_modified": "2024-09-12T17:29:24.525219Z"
}
]
That switch1-qsfp3 settings was created automatically. Now to enable the link, those settings have to be applied, with:
bnaecker@flint : ~/file-cabinet/oxide/oxide.rs $ ./target/release/oxide --profile london system hardware switch-port apply-settings --port qsfp3 --rack-id b373c1a2-8cd1-457f-be2a-1eec43bdd866 --switch-location switch0 --port-settings 7c60f2e4-f457-4b9f-828d-cc57ad39af0c
Since we're creating the settings automatically, it'd be nice if we could automatically apply them as well. OTOH, if we don't want to do that, we should prompt the user to do so at their discretion, and make especially clear that the link will not exist until they do so.
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.
Assessment
This issue has not been assessed yet.