Commit 4010226
committed
feat(switch-controller): add ConfigureCertificate phase with RMS job polling
Extend the switch Configuring state machine with a certificate configuration
sub-flow that runs after RotateOsPassword and before Validating. The handler
submits an async RMS job via Component Manager and polls until completion.
State machine (api-model):
- Add ConfigureCertificateState { Start, WaitForComplete { job_id } }
- Nest under ConfiguringState::ConfigureCertificate
- RotateOsPassword now transitions into ConfigureCertificate(Start)
Switch handler (configuring.rs):
- Start: derive cert_name from switch.rack_id; build SwitchEndpoint from BMC
MAC, NVOS interface, and vault credentials; call CM to start the job
- WaitForComplete: poll CM for ConfigureSwitchCertificateState until Completed
(→ Validating), Failed (→ Error), or in-progress (wait)
- Skip certificate configuration when rack_id or component manager is absent
Component Manager:
- Expose configure_switch_certificate(endpoint, cert_name) → job_id
- Expose get_configure_switch_certificate_job_status(job_id) → job status
- Extend NvSwitchManager; implement in mock (configurable job status), NSM
(unsupported), and RmsBackend (stub until librms RPCs land)
- Add ConfigureSwitchCertificateState { Started, InProgress, Completed, Failed }
Tests:
- Integration tests for skip paths, Start → WaitForComplete, success/failure
polling, and RotateOsPassword → ConfigureCertificate(Start)
- Test fixtures for rack_id assignment and versioned state transitions
Docs:
- Add switch_configure_certificate.md with FSM detail and RMS sequence diagrams
- Update switch.md transitions and link to the new design doc
Signed-off-by: Vinod Chitrali <vchitrali@nvidia.com>1 parent 791c8b5 commit 4010226
24 files changed
Lines changed: 1631 additions & 88 deletions
File tree
- crates
- api-core/src/tests/switch_state_controller
- fixtures
- api-model/src
- switch
- api-test-helper/src
- component-manager
- src
- rack-controller/src
- rack/src
- switch-controller/src
- deploy/nico-base/api/config-files
- docs/architecture/state_machines
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 53 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
37 | 89 | | |
38 | 90 | | |
39 | 91 | | |
| |||
0 commit comments