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

Dockerhub pull request limits - additional registry/docs #4046

Closed
planetf1 opened this issue Oct 31, 2020 · 17 comments
Closed

Dockerhub pull request limits - additional registry/docs #4046

planetf1 opened this issue Oct 31, 2020 · 17 comments
Assignees
Labels
containers Docker, docker-compose, Kubernetes, operators documentation Documentation related dojo Activity related to our education lab dojo pinned Keep open (do not time out)

Comments

@planetf1
Copy link
Member

See https://docs.docker.com/docker-hub/download-rate-limit/ & some useful analysis at https://www.openshift.com/blog/mitigate-impact-of-docker-hub-pull-request-limits

Need to consider

  • effect on build process
  • effect on consumers
  • whether we need to save base images (as those images will have restrictions)
  • use of other registries (github, azure, quay.io) and/or premium subscriptions

tbc....

@planetf1 planetf1 self-assigned this Oct 31, 2020
@planetf1
Copy link
Member Author

planetf1 commented Nov 4, 2020

Dockerhub is now offering exemption for qualifying open source projects -> see https://www.docker.com/blog/expanded-support-for-open-source-software-projects/
Will see if we can get this in place cc: @jmertic

@github-actions
Copy link

github-actions bot commented Jan 4, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Jan 4, 2021
@planetf1 planetf1 removed the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Jan 4, 2021
@github-actions
Copy link

github-actions bot commented Mar 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Mar 6, 2021
@planetf1 planetf1 removed the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Mar 8, 2021
@github-actions
Copy link

github-actions bot commented May 8, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label May 8, 2021
@planetf1 planetf1 removed the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label May 10, 2021
@planetf1
Copy link
Member Author

planetf1 commented May 27, 2021

During an attempt to test the 2.10 release #5211 , the following was noted when trying to setup egeria:

 Warning  Failed          19s               kubelet            Failed to pull image "docker.io/odpi/egeria:2.10": rpc error: code = Unknown desc = Error reading manifest 2.10 in docker.io/odpi/egeria: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

Following https://www.docker.com/blog/checking-your-current-docker-pull-rate-limits-and-status/ we see:

TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:odpi/egeria:pull" | jq -r .token)

and decoding at jwt.io :

{
  "access": [
    {
      "type": "repository",
      "name": "odpi/egeria",
      "actions": [
        "pull"
      ],
      "parameters": {
        "pull_limit": "100",
        "pull_limit_interval": "21600"
      }
    }
  ],
  "aud": "registry.docker.io",
  "exp": 1622154518,
  "iat": 1622154218,
  "iss": "auth.docker.io",
  "jti": "fTZgVmovxlHuKuoo9K1Y",
  "nbf": 1622153918,
  "sub": ""
}
curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/odpi/egeria/manifests/2.10 2>&1
HTTP/1.1 200 OK
content-length: 19568
content-type: application/vnd.docker.distribution.manifest.v1+prettyjws
docker-content-digest: sha256:e3c61ab251ec404b05d0dc92b136a7823b245690989e1b20badf30c7c6d0d792
docker-distribution-api-version: registry/2.0
etag: "sha256:e3c61ab251ec404b05d0dc92b136a7823b245690989e1b20badf30c7c6d0d792"
date: Thu, 27 May 2021 22:25:35 GMT
strict-transport-security: max-age=31536000
ratelimit-limit: 100;w=21600
ratelimit-remaining: 100;w=21600

This doesn't seem to indicate an issue..... as our limit is 100, with a limit remaining of 100

@planetf1 planetf1 mentioned this issue May 27, 2021
26 tasks
@planetf1
Copy link
Member Author

planetf1 commented May 27, 2021

It looks as if the image limits are now controlled by IP address - so this limit may only apply to my k8s cluster - hence the odd results above (initiated from laptop)

Or the entire cloud provider...

If so we may have less of a problem. See https://www.docker.com/blog/scaling-docker-to-serve-millions-more-developers-network-egress/ . However at this time quay.io appears to remain free/unlimited for public repos

@planetf1
Copy link
Member Author

dockerhub is useful for 'visibility', so we may be able to publish to both, and have our charts pointing to quay.io.

@planetf1
Copy link
Member Author

Even with a free account, these limits are slightly higher if authenticated when doing a pull.
Additionally, rather than have the potential for sharing any free quotas with other users appearing at same IP (which may depend on network topology/cloud provider) this uses a unique user id for 'me'.

Additionally if an org is making extensive use of images they can either build locally, or pull the image into their local container registry.

As an example, for openshift by following https://docs.openshift.com/container-platform/4.7/openshift_images/managing_images/using-image-pull-secrets.html

oc create secret docker-registry dockerhub --docker-server=docker.io --docker-username=MYUSERID --docker-password='MYPASSWORD --docker-email=MYEMAIL
oc secrets link default  dockerhub --for=pull

(For odpi-egeria-lab we currently use the 'default' serviceaccount - the egeria-lab chart is different)

With this done images would then load & containers start

@planetf1 planetf1 changed the title Dockerhub pull request limits - mitigation planning Dockerhub pull request limits - additional registry/docs May 28, 2021
@planetf1
Copy link
Member Author

May not be request-limiting, but noticing more occurances of outages connecting to dockerhub

  • it would be prudent to start looking at publishing to an additional repository soon.....

ie

  Warning  Failed          17m                  kubelet            Failed to pull image "docker.io/odpi/egeria-configure:2.11-SNAPSHOT": rpc error: code = Unknown desc = error pinging docker registry registry-1.docker.io: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 161.26.0.8:53: read udp 10.242.128.44:39047->161.26.0.8:53: i/o timeout

@planetf1 planetf1 added containers Docker, docker-compose, Kubernetes, operators documentation Documentation related labels Aug 3, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label Oct 16, 2021
@planetf1 planetf1 added pinned Keep open (do not time out) and removed no-issue-activity Issues automatically marked as stale because they have not had recent activity. labels Oct 18, 2021
@planetf1
Copy link
Member Author

This is affecting operator dev at times, AND this will impact the Dojo as we will be asking many users to retrieve the containers.
It needs fixing ASAP....
cc: @davidradl

@planetf1 planetf1 added the dojo Activity related to our education lab dojo label Oct 19, 2021
planetf1 added a commit to planetf1/egeria that referenced this issue Oct 20, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit that referenced this issue Oct 20, 2021
planetf1 added a commit to planetf1/egeria that referenced this issue Oct 20, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit to planetf1/egeria that referenced this issue Oct 21, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit that referenced this issue Oct 21, 2021
planetf1 added a commit to planetf1/egeria that referenced this issue Oct 21, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit to planetf1/egeria that referenced this issue Oct 21, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
@planetf1 planetf1 mentioned this issue Oct 22, 2021
1 task
@planetf1
Copy link
Member Author

planetf1 commented Oct 22, 2021

Build process for egeria now being updated to publish to both dockerhub and quay.io
We know we have users pulling from docker, plus it's the most well known registry, so for now we will continue to publish to both

References in the helm charts in egeria-charts will be updated as the container images are available on quay.io

  • egeria
  • egeria-configure
  • jupyter
  • egeria-ui
  • egeria-react-ui
  • egeria-database-connectors
  • egeria-connector-sas-viya
  • egeria-k8s-operator (scripts updated, no full ci/cd publish in place yet)

@planetf1
Copy link
Member Author

Just waiting on sas-viya fix to be merged (approval required), other images done.
Charts updated

@planetf1
Copy link
Member Author

Verified our charts.

However of note is that 'nginx' (which we use for the egeria UI, and in future may consolidate more UI access under) fails ie:

  Warning  Failed          56s                kubelet            Failed to pull image "docker.io/nginx": rpc error: code = Unknown desc = Error reading manifest latest in docker.io/library/nginx: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

Not yet clear which nginx image on quay.io is appropriate.

@planetf1
Copy link
Member Author

Changes to our images are now almost done,

However the same issue affects any third party containers we use. WIll close the main issue and track these on a case by case basis:

@planetf1
Copy link
Member Author

Response from nginx team - their images are also published to the non-limited container registry:
https://gallery.ecr.aws/nginx/nginx

Therefore I'm going to update our references to go here instead of dockerhub

planetf1 added a commit to planetf1/egeria-charts that referenced this issue Oct 27, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit to planetf1/egeria-charts that referenced this issue Oct 27, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit to planetf1/egeria-charts that referenced this issue Oct 27, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit to planetf1/egeria-ui that referenced this issue Oct 27, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
@planetf1
Copy link
Member Author

Changes made in charts (merged) and egeria-ui (PR open: cc: @lpalashevski @sarbull )

Note public amazon registry is public.ecr.aws

sarbull added a commit to odpi/egeria-ui that referenced this issue Oct 27, 2021
odpi/egeria#4046 switch to public amazon registry for nginx source
@planetf1 planetf1 mentioned this issue Oct 29, 2021
41 tasks
@planetf1 planetf1 closed this as completed Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Docker, docker-compose, Kubernetes, operators documentation Documentation related dojo Activity related to our education lab dojo pinned Keep open (do not time out)
Projects
None yet
Development

No branches or pull requests

1 participant