Skip to content

feat(machine-a-tron): expose IPMI ports in machine status - #3724

Merged
poroh merged 1 commit into
NVIDIA:mainfrom
poroh:machine-a-tron-machine-status-ipmi-ports
Jul 20, 2026
Merged

feat(machine-a-tron): expose IPMI ports in machine status#3724
poroh merged 1 commit into
NVIDIA:mainfrom
poroh:machine-a-tron-machine-status-ipmi-ports

Conversation

@poroh

@poroh poroh commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Expose each simulated BMC's IPMI endpoint through machine-a-tron's /machines/status response.

IPMI simulators bind to dynamically allocated local ports, while clients may reach them through the standard IPMI port exposed by the deployment. Reporting both ports lets external orchestration create the correct per-BMC forwarding:

  • reachable_port is the client-facing port advertised through Redfish.
  • listen_port is the dynamically allocated simulator port.
  • In direct mode, both values are the simulator port.
  • Machines without an IPMI simulator omit the ipmi endpoint.

This also keeps the port advertised by Redfish ManagerNetworkProtocol.IPMI.Port consistent with the reported reachable port. The Kubernetes controller can use this status in follow-up work to create services that map port 623 to each simulator's dynamic port.

Related issues

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

This PR only exposes the endpoint information. Kubernetes service creation and port forwarding remain part of #3380.

Signed-off-by: Dmitry Porokh <dporokh@nvidia.com>
@poroh
poroh requested a review from a team as a code owner July 20, 2026 19:07
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f06f920e-ad7c-4fa4-9043-a01aef9365f6

📥 Commits

Reviewing files that changed from the base of the PR and between b764546 and c22f9c5.

📒 Files selected for processing (10)
  • crates/bmc-mock/src/ipmi_sim.rs
  • crates/bmc-mock/src/main.rs
  • crates/machine-a-tron/src/bmc_mock_wrapper.rs
  • crates/machine-a-tron/src/control_router.rs
  • crates/machine-a-tron/src/dpu_machine.rs
  • crates/machine-a-tron/src/host_machine.rs
  • crates/machine-a-tron/src/machine_state_machine.rs
  • crates/machine-a-tron/src/status.rs
  • crates/ssh-console/tests/util/ipmi_sim.rs
  • crates/ssh-console/tests/util/mod.rs

Summary by CodeRabbit

  • New Features

    • Added IPMI endpoint details, including reachable and listening ports.
    • Exposed IPMI endpoint information through machine and BMC status responses.
    • Added support for configuring a distinct externally reachable IPMI port.
  • Bug Fixes

    • Improved IPMI-only simulator connectivity by using the standard reachable port.
    • Ensured unavailable IPMI endpoints are omitted from status responses.
  • Tests

    • Added coverage for direct and forwarded IPMI endpoints and machine status reporting.

Walkthrough

IPMI simulator endpoints now distinguish reachable client ports from internal listen ports. BMC mock handles propagate this endpoint through live machine state, and /machines/status reports optional IPMI endpoint details for machines with IPMI enabled.

Changes

IPMI endpoint status

Layer / File(s) Summary
Simulator endpoint model
crates/bmc-mock/src/ipmi_sim.rs, crates/bmc-mock/src/main.rs, crates/ssh-console/tests/util/ipmi_sim.rs
Adds IpmiEndpoint, configurable reachable ports, standard port handling, updated simulator handles, and direct/forwarded endpoint tests.
BMC wrapper propagation
crates/machine-a-tron/src/bmc_mock_wrapper.rs, crates/machine-a-tron/src/machine_state_machine.rs
Passes reachable-port configuration through BMC startup, exposes the endpoint from the wrapper handle, and stores it in live state.
Machine status exposure
crates/machine-a-tron/src/status.rs, crates/machine-a-tron/src/dpu_machine.rs, crates/machine-a-tron/src/host_machine.rs, crates/machine-a-tron/src/control_router.rs, crates/ssh-console/tests/util/mod.rs
Adds optional serialized IPMI status with reachable and listen ports, propagates it for hosts and DPUs, and validates /machines/status output and listen-port usage.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant IPMISimulator
  participant BMCMockWrapper
  participant MachineState
  participant MachinesStatus
  IPMISimulator->>BMCMockWrapper: Expose IpmiEndpoint
  BMCMockWrapper->>MachineState: Update ipmi_endpoint
  MachineState->>MachinesStatus: Serialize BmcStatus.ipmi
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes exposing IPMI ports in machine status.
Description check ✅ Passed The description matches the code changes and explains the new IPMI endpoint reporting clearly.
Linked Issues check ✅ Passed The changes satisfy [#3379] by surfacing IPMI endpoint data in /machines/status and preserving client-facing versus listen ports.
Out of Scope Changes check ✅ Passed No unrelated code changes stand out; the edits are confined to status plumbing and IPMI endpoint propagation.
Docstring Coverage ✅ Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@poroh
poroh merged commit 82ddd08 into NVIDIA:main Jul 20, 2026
61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(machine-a-tron): expose machine status over HTTP

2 participants