Skip to content

Support BMC URL overrides#50

Closed
rainest wants to merge 1 commit intomainfrom
rainest/bmc-url-override
Closed

Support BMC URL overrides#50
rainest wants to merge 1 commit intomainfrom
rainest/bmc-url-override

Conversation

@rainest
Copy link
Contributor

@rainest rainest commented Sep 4, 2025

Summary and Scope

Create a utility function for constructing BMC URLs and use it in place of each BMC interaction building its own URL.

Add debug envvars to forcibly override the BMC URL components.

Issues and Related PRs

I originally wrote this before fully exploring the problem and writing OpenCHAMI/ochami#51

If SMD doesn't get the information OpenCHAMI/ochami#51 supplies, PCS will attempt to use the xname as hostname, which isn't valid for all DNS zones (it is valid for the standard CSM DNS zone). This allowed bypassing that problem without and updated ochami tool.

PCS had https hardcoded as the protocol for Redfish URLs. I wanted to use HTTP because test environments are a work in progress, and certificate provisioning and CA distribution wasn't my first priority.

SMD provides no means to indicate supported protocol AFAICT. RedfishEndpoint structs have no protocol field. If we want to support HTTP properly, SMD probably should be responsible for it. A PCS-side override is easier in the short term.

In general, we have no standard structs we populate from the SMD with methods for "build the BMC URL", and services (and individual functions within services) build URLs from scratch. OpenCHAMI/smd#74 is maybe a step in that direction, but IDK what all we'd want in terms of standard methods for Components/RedfishEndpoints/etc.

Testing

Test description:

Manually set protocol, host, and domain overrides, and confirmed that PCS was able to talk to a BMC where SMD had incomplete info. A more detailed description is forthcoming, this is a chicken-before-egg PR that I wanted to have up before the larger test that needs it.

Risks and Mitigations

Adds dev tooling UX surface that we'd probably want to remove later. This is part workaround and part demo of things we might want to refactor more broadly. I'd prefer to actually just discard it and get certificate trust working.

Pull Request Checklist

  • Version number(s) incremented, if applicable
  • Copyrights updated
  • License file intact
  • Target branch correct
  • CHANGELOG.md updated
  • Testing is appropriate and complete, if applicable

Create a utility function for constructing BMC URLs and use it in place
of each BMC interaction building its own URL.

Add debug envvars to forcibly override the BMC URL components.

Signed-off-by: Travis Raines <571832+rainest@users.noreply.github.com>
@rainest
Copy link
Contributor Author

rainest commented Oct 22, 2025

This should be ahead to go ahead and abandon with OpenCHAMI/ochami#51

Still no plaintext HTTP support with that, but I should deal with that in the Redfish emulator or with a lazy reverse proxy shim in front.

@rainest rainest closed this Oct 22, 2025
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.

1 participant