-
Notifications
You must be signed in to change notification settings - Fork 63
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
Frequent calls to docker-credential-desktop and osascript when doing a copy #483
Comments
(This is also adding 4+ minutes after the copy completes. I'm doing a repo-to-repo copy) |
This seems to be invoked about once per call to https://github.com/carvel-dev/imgpkg/blob/develop/pkg/imgpkg/registry/auth/custom_keychain.go#L62, still digging as to why. |
It appears that we're constructing a new https://github.com/carvel-dev/imgpkg/blob/develop/pkg/imgpkg/registry/registry.go#L265 I'm guessing it's because the |
Nevermind, we are finding the correct RoundTripper, but it's not caching the credentials at all. |
I'm currently looking at https://github.com/carvel-dev/imgpkg/blob/develop/pkg/imgpkg/registry/registry.go#L244, and wondering whether we should be caching the set of |
(have to put this down for the evening, though) |
Looking in Ref: https://github.com/google/go-containerregistry/tree/main/pkg/v1/remote/options.go#L140 |
It looks like augmenting |
What steps did you take:
I was attempting to copy the image from these instructions: https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/1.4/tap/install-aws.html
The copy was from a password-protected repository at
registry.tanzu.vmware.com
to a non-password-protected docker container registry.What happened:
This is 214 images and approx 7GB of data. I noticed that it took a long time (more than 2 minutes) to collect all the information for the clone, and while that was happening, the terminal title was flashing between
osascript
,sw_version
and a few other commands. Aps
revealed the following:As an approximate guess, this looks like approx
(31370 - 28423) / 4 > 700
invocations ofdocker-credential-desktop get
, which seems excessive. This seems to continue; after 5 minutes, there seem to have 1200 invocations (or approx 2/second). Nothing else seems to be spawning processes on my machine (idle except for typing this bug report into Chrome). Overall, it took 8 minutes to collect the information for these 214 images, and then approx 1 minute to verify that all the images had been copied to the destination registry (I'd prevously copied most images, so this should have been a metadata-only comparison).What did you expect:
One invocation of
docker-credential-desktop get
per registry, or perhaps one per minute.Anything else you would like to add:
This is running 0.35.0; looking through previous bugs, #334 looks related but clearly doesn't seem to have helped in this case.
Running with
--debug
doesn't show a lot of requests to the/v2
endpoint for authentication as described in #290Environment:
imgpkg --version
):Docker registry used (e.g.
Docker HUB
):Self-install of Docker
registry
image from https://github.com/evankanderson/k8s-private-local-registryOS (e.g. from
/etc/os-release
):Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
The text was updated successfully, but these errors were encountered: