Issue #5173

Updated by about 3 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, request limiting is applied per client IP address per second. 

 Related: DELIVERY-7214 

 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/", line 367, in trace_task 
       R = retval = fun(*args, **kwargs) 
     File "/usr/lib/python2.7/site-packages/pulp/server/async/", line 529, in __call__ 
       return super(Task, self).__call__(*args, **kwargs) 
     File "/usr/lib/python2.7/site-packages/pulp/server/async/", line 107, in __call__ 
       return super(PulpTask, self).__call__(*args, **kwargs) 
     File "/usr/lib/python2.7/site-packages/celery/app/", line 622, in __protected_call__ 
       return*args, **kwargs) 
     File "/usr/lib/python2.7/site-packages/pulp/server/controllers/", line 769, in sync 
       sync_report = sync_repo(transfer_repo, conduit, call_config) 
     File "/usr/lib/python2.7/site-packages/pulp/server/async/", line 737, in wrap_f 
       return f(*args, **kwargs) 
     File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/importers/", line 85, in sync_repo 
       return self.sync_step.process_lifecycle() 
     File "/usr/lib/python2.7/site-packages/pulp/plugins/util/", line 572, in process_lifecycle 
       super(PluginStep, self).process_lifecycle() 
     File "/usr/lib/python2.7/site-packages/pulp/plugins/util/", line 163, in process_lifecycle 
     File "/usr/lib/python2.7/site-packages/pulp/plugins/util/", line 256, in process 
     File "/usr/lib/python2.7/site-packages/pulp/plugins/util/", line 303, in _process_block 
     File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/importers/", line 224, in process_main 
       available_tags = self.parent.index_repository.get_tags() 
     File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/", line 473, in get_tags 
       headers, tags = self._get_path(link) 
     File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/", line 528, in _get_path 
     File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/", line 550, in _raise_path_error 
       raise IOError(report.error_msg) 
   IOError: Too Many Requests