gcs.py: fix up cert error on gcs fetch#52172
Open
linsword13 wants to merge 1 commit intospack:developfrom
Open
gcs.py: fix up cert error on gcs fetch#52172linsword13 wants to merge 1 commit intospack:developfrom
linsword13 wants to merge 1 commit intospack:developfrom
Conversation
When running with newer `google-auth` lib (googleapis/google-auth-library-python#1856), the default behavior is to access the https endpoint of the metadata server. This is causing cert errors like the following: ``` // The spack installation comes with a build-cache hosted on a gcs bucket spack install [email protected] +lustre ^[email protected] fabrics=ucx ^[email protected] +verbs +rdmacm +rc +ud +thread_multiple ==> Error: Failed to retrieve https://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/?recursive=true from the Google Compute Engine metadata service. Compute Engine Metadata server unavailable. Last exception: HTTPSConnectionPool(host='metadata.google.internal', port=443): Max retries exceeded with url: /computeMetadata/v1/instance/service-accounts/default/?recursive=true (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1004)'))) ``` This PR adds the `GCE_METADATA_MTLS_MODE` env-var to avoid accessing the https endpoint. Signed-off-by: Lin Guo <[email protected]>
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.
When running with newer
google-authlib (googleapis/google-auth-library-python#1856), the default behavior is to access the https endpoint of the metadata server. This is causing cert errors like the following:This PR adds the
GCE_METADATA_MTLS_MODEenv-var to avoid accessing the https endpoint.