Skip to content

storage: timeout for /computeMetadata/v1/universe/universe_domain in storage.NewClient #9350

@jaimem88

Description

@jaimem88

Environment details

  • Programming language: Go
  • OS: docker image golang:1.21
  • Language runtime version: go1.21.6
  • Package version: v0.161.0

Steps to reproduce

The latest update is breaking our pipeline when we try to update the library:
https://gitlab.com/gitlab-org/container-registry/-/merge_requests/1569.

One of our integration tests keeps failing as seen in this CI job.

panic: Error creating storage client: dialing: Get "http://169.254.169.254/computeMetadata/v1/universe/universe_domain": dial tcp 169.254.169.254:80: i/o timeout
goroutine 1 [running]:
github.com/docker/distribution/registry/storage/driver/gcs.init.1()
	/builds/gitlab-org/container-registry/registry/storage/driver/gcs/gcs_test.go:87 +0x8c8
FAIL	github.com/docker/distribution/registry/storage/driver/gcs	12.910s
=== Failed
=== FAIL: registry/storage/driver/gcs  (0.00s)
panic: Error creating storage client: dialing: Get "http://169.254.169.254/computeMetadata/v1/universe/universe_domain": dial tcp 169.254.169.254:80: i/o timeout
goroutine 1 [running]:
github.com/docker/distribution/registry/storage/driver/gcs.init.1()
	/builds/gitlab-org/container-registry/registry/storage/driver/gcs/gcs_test.go:87 +0x8c8
FAIL	github.com/docker/distribution/registry/storage/driver/gcs	12.910s
DONE 0 tests, 1 failure in 81.895s
exit status 1

This seems suspiciously related to googleapis/google-api-go-client@b21a1fa. I am not sure where the hostname is coming from but it seems that the DefaultEndpoint is not being set properly.

Metadata

Metadata

Labels

api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions