Repository navigation
fix: honor OS_INTERFACE for OpenStack service endpoints - #180
Open
Dayeon Jung (Dianaland1112) wants to merge 1 commit into
Open
Dayeon Jung (Dianaland1112) wants to merge 1 commit into
Dayeon Jung (Dianaland1112) wants to merge 1 commit into
Conversation
Validate the configured interface before OpenStack authentication and apply it to Cinder, Nova and Neutron clients while preserving the public default. Add catalog-based regression coverage and document container configuration. Refs vexxhost#179
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.
Background
Workers in isolated networks may reach Keystone and internal OpenStack API endpoints while the public service URLs are unreachable. An internal
OS_AUTH_URLcontrols authentication, but does not select the interface for subsequent service API requests.Cause
NewClientSetpassed onlyOS_REGION_NAMEto each service client'sEndpointOpts. Gophercloud applied itspublicavailability default, andAuthOptionsFromEnv()did not readOS_INTERFACE. As a result, passingOS_INTERFACE=internalto the container did not affect the Cinder, Nova or Neutron endpoint selection.Changes
OS_INTERFACEbefore OpenStack authentication.public,internalandadmin; preservepublicwhen unset or empty.OS_AUTH_URL.The change is limited to
internal/openstack/client.go,internal/openstack/client_test.goandREADME.md.Validation
Regression against unchanged production code reproduced the missing behavior:
internalandadminselected public endpoints for all three clients, and an unsupported value returned no error.Successful fork validation passed:
go test ./...go test -race ./internal/openstackgo vet ./...go build ./...Validation used a Fedora 44 container with Go and libnbd development packages. The three changed file blobs match the validated versions exactly. The fork-only validation workflow is excluded from this PR.
No live VMware/OpenStack migration was performed.
Closes #179