Project

Profile

Help

Issue #5173

Updated by ipanova@redhat.com almost 5 years ago

When syncing from a registry which applies rate-limiting to requests, Pulp fails to handle the 429 response code ("Too many requests") and the sync task fails. 

 A better behaviour would be to back off when seeing 429, then retry. 

 In the particular instance of Quay.io, request limiting is applied per client IP address per second. 

 Related: DELIVERY-7214 

 <pre> 
 2019-07-23 03:34:59 +0000 [ERROR     ] Pulp task [0d11937c-f11a-4ba5-b082-245febe02e1c] failed: PLP0000: Too Many Requests: 
   Traceback (most recent call last): 
     File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 367, in trace_task 
       R = retval = fun(*args, **kwargs) 
     File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 529, in __call__ 
       return super(Task, self).__call__(*args, **kwargs) 
     File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 107, in __call__ 
       return super(PulpTask, self).__call__(*args, **kwargs) 
     File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 622, in __protected_call__ 
       return self.run(*args, **kwargs) 
     File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 769, in sync 
       sync_report = sync_repo(transfer_repo, conduit, call_config) 
     File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 737, in wrap_f 
       return f(*args, **kwargs) 
     File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/importers/importer.py", line 85, in sync_repo 
       return self.sync_step.process_lifecycle() 
     File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 572, in process_lifecycle 
       super(PluginStep, self).process_lifecycle() 
     File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 163, in process_lifecycle 
       step.process() 
     File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 256, in process 
       self._process_block() 
     File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 303, in _process_block 
       self.process_main() 
     File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/importers/sync.py", line 224, in process_main 
       available_tags = self.parent.index_repository.get_tags() 
     File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/registry.py", line 473, in get_tags 
       headers, tags = self._get_path(link) 
     File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/registry.py", line 528, in _get_path 
       self._raise_path_error(report) 
     File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/registry.py", line 550, in _raise_path_error 
       raise IOError(report.error_msg) 
   IOError: Too Many Requests 
 </pre>

Back