Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerapplifecycle doesn't work with Azure private registries - update dependency #353

Closed
thomasmitchell opened this issue Sep 5, 2017 · 6 comments
Labels

Comments

@thomasmitchell
Copy link

Hi. Not sure if I should put this issue in the dockerapplifecycle dependencies repo because the builder there is whats broken, or here because the dependency that breaks it is vendored here... but I chose here.

The dockerapplifecycle builder doesn't work with Azure private docker registries, it seems.

./builder -dockerRef "<myref>" -dockerUser "<myuser>" -outputMetadataJSONFilename ~/tmp/builderout.json -dockerPassword "<mypassword>"
Staging process started ...
Failed getting docker image by tag: Get <myendpoint>: authorization server did not include a token in the response  Going to retry attempt: 1
Failed getting docker image by tag: Get <myendpoint>: authorization server did not include a token in the response  Going to retry attempt: 2
Failed getting docker image by tag: Get <myendpoint>: authorization server did not include a token in the response  Going to retry attempt: 3
Failed getting docker image by tag: Get <myendpoint>: authorization server did not include a token in the response
Staging process failed: Exit trace for group:
builder exited with error: failed to fetch metadata from [<myrepo>] with tag [latest] and insecure registries [] due to Get <myendpoint>: authorization server did not include a token in the response

Did some messing around though, and bumping the dependency github.com/docker/distribution to commit 91627604 appears to fix the issue. (Bumping past that point runs you into a major Go API refactor that would require code changes to dockerapplifecycle)

./builder -dockerRef "<myref>" -dockerUser "<myuser>" -dockerPassword "<mypassword>" -outputMetadataJSONFilename ~/tmp/builderout.json
Staging process started ...
Staging process finished

~/tmp/builderout.json then contains

{"lifecycle_type":"docker","lifecycle_metadata":{"docker_image":"<myuri>"},"process_types":{"web":"/bin/bash"},"execution_metadata":"{\"cmd\":[\"/bin/bash\"],\"ports\":[{\"Port\":7001,\"Protocol\":\"tcp\"}]}"}

This would also appear to allow for the removal of your local copy of github.com/docker/docker, because docker/distribution doesn't use it anymore at that point.

This is hardly thorough testing, but its a lead toward hopefully getting Azure private registries to work.

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/150821436

The labels on this github issue will be updated when the story is started.

@thomasmitchell
Copy link
Author

This does cause the tests to fail in dockerapplifecycle, but those failures seem to be because the library is hitting different docker API endpoints that have not been manually spec'd out in the gomega test server.

@emalm
Copy link
Member

emalm commented Sep 18, 2017

Hi, @thomasmmitchell,

Thanks for reporting the problem and investigating it thoroughly! Prioritizing this issue for the Diego team to work on soon.

Best,
Eric, CF Diego PM

@glestaris
Copy link
Contributor

Hey @thomasmmitchell,

This is unexpected. We did test CF working with Azure private repositories: https://www.pivotaltracker.com/story/show/146708087/comments/173431993. That test included dockerapplifecycle.

@thomasmitchell
Copy link
Author

Yeah. Hrm. Our ACR seems pretty default, too. And the Docker CLI can do everything as expected. Can I do anything to potentially help you replicate this issue?

@jvshahid
Copy link
Contributor

worth noting that although this fixed the dockerapplifecycle issue. garden-shed and grootfs are still unable to download the image. /cc @julz @glestaris

n4wei pushed a commit that referenced this issue Oct 9, 2019
Submodule src/github.com/onsi/ginkgo eea6ad008..d90e0dcda:
  > Add integration test
  > Fix coverage files combining
  > A new CLI option: -ginkgo.reportFile <file path> (#601)
  > v1.10.2
  > speed up table entry generateIt() (#609)
  > Fix. Write errors to stderr instead of stdout (#610)
  > v1.10.1
  > stack backtrace: fix skipping (#600)
  > v1.10.0
  > stack backtrace: fix alignment and skipping
  > fix typo in documentation
  > v1.9.0
  > Fixed typos in comments
  > gofmt code
  > Simplify code
  > Simplify concatenation, incrementation and function assignment
  > Avoid unnecessary conversions
  > JUnit: include more detailed information about panic
  > Option to print output into report, when tests have passed
  > Print help to stdout when the user asks for help
Submodule src/github.com/onsi/gomega 41673fd8f..bdebf9e0e:
  > v1.7.0
  > export format property variables (#347)
  > minor fix in the documentation of ExpectWithOffset (#358)
  > v1.6.0
  > Remove duplication in XML matcher tests
  > Remove unnecessary conversions (#357)
  > Fixed import order (#353)
  > Added missing error handling in test (#355)
  > Simplify code (#356)
  > Simplify code (#354)
  > Fixed typos (#352)
  > Add failure message tests to BeElementOf matcher
  > Update go-testcov untested sections
  > mark all uncovered files so go-testcov ./... works
  > display special chars on error
  > Reenable gotip in travis
  > Add BeElementOf matcher
  > Fix the typo of comment (#345)
  > Optimize contain_element_matcher
  > v1.5.0
  > add analogous tests to fields_test.go
  > added tests for error messages
  > remove redundant validity check
  > ensure error messages refer to the underlying interface, not the `reflect.Value`
  > Run CI on go 1.12 and not 1.9
  > Turn off gotip on travis
  > Mark session_test.go with build tag (#324)
  > more matcher tests
  > try to appease linters
  > MatchKeys
  > Clarify message for unexpected errors
  > make it easy to run everythin that travis would do
  > remove go 1.6, 1.7, 1.8 from the build matrix, and add tip
  > fix lint errors and use type aliases to remove stuttering
  > remove duplication of code and add docs to public function
  > v1.4.3
  > test yaml parser errors and better comment on why panics are there
  > add test for not matcher with errors
  > add test for or matcher with errors
  > add tests for positive failure messages of Panic
  > ensure file name and line numbers are correctly reported
  > Fail the build if gofmt detects any changes required
  > Make changes to satisfy gofmt
  > Move GO111MODULE into more suitable env key in Travis
  > Add coverage for BeZero and Succeed matchers (#307)
  > Fixed matcher for content-type (#305)
  > v1.4.2
  > Refactor goexec build test
  > Updates for Go v1.11 official release
  > Add go.mod and go.sum files to define the gomega go module
  > Work around go vet issue with Go v1.11 (#300)
  > Better output when using with go XUnit-style tests, fixes #255 (#297)
  > Fix MatchJSON fail to parse json.RawMessage (#298)
  > Move funcs shared by MatchJSON and MatchYAML to a dedicated support file
  > Added first failure path matching for YAML (#279)
  > show threshold in failure message of BeNumericallyMatcher (#293)
  > v1.4.1
  > Update documentation (#289)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants