Project

Profile

Help

Issue #1353

Updated by cduryee about 7 years ago

When using the export distributor with the "start_date" parameter, the distributor will fail with an exception if there are no rpms or errata associated with the repo since start_date. 

 For example: 

 <pre> 
 pulp-admin rpm repo create --repo-id zoo --feed https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/ 
 pulp-admin rpm repo sync run --repo-id zoo 
 # this works 
 pulp-admin rpm repo export run --repo-id zoo 
 # this fails 
 pulp-admin rpm repo export run --repo-id zoo --start-date <utc date after the time of the last sync> 
 </pre> 

 Here is the stack: 

 <pre> 
 Exception caught from plugin during publish for repo [zoo] 
 Traceback (most recent call last): 
 File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/publish.py", line 116, in _do_publish 
   publish_report = publish_repo(transfer_repo, conduit, call_config) 
 File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 578, in wrap_f 
   return f(*args, **kwargs) 
 File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/export_distributor/distributor.py", line 135, in publish_repo 
   return self._publisher.publish() 
 File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 557, in publish 
   return self.process_lifecycle() 
 File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 502, in process_lifecycle 
   super(PluginStep, self).process_lifecycle() 
 File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 126, in process_lifecycle 
   step.process() 
 File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 203, in process 
   self._process_block() 
 File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 245, in _process_block 
   self.process_main() 
 File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 890, in process_main 
   copytree(self.source_dir, self.target_dir, symlinks=self.preserve_symlinks) 
 File "/usr/lib/python2.7/site-packages/pulp/server/util.py", line 215, in copytree 
   names = os.listdir(src) 
 Error: [Errno 2] No such file or directory: '/var/cache/pulp/reserved_resource_worker-0@beav-2/a4069b22-9444-401e-bc9e-bd5c0433aeea/scratch' 

 </pre> 

 It would be better if the task succeeded (with an appropriate message) and simply did not create an export ISO.

Back