Conversation
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>
Contributor
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ochamitool.PCS had
httpshardcoded 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.
RedfishEndpointstructs 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