Description of problem: repo sync should error out with proper error when run on repos without feed. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Id: local Display Name: local Description: None Content Unit Count: 55 Notes: Importers: Config: Id: yum_importer Importer Type Id: yum_importer Last Sync: 2012-11-18T15:52:28-05:00 Repo Id: local Scheduled Syncs: 50a94988758cc9261f00049e Scratchpad: None Distributors: Auto Publish: True Config: Http: False Https: True Relative URL: local Distributor Type Id: yum_distributor Id: yum_distributor Last Publish: 2012-11-16T14:51:50-05:00 Repo Id: local Scheduled Publishes: Scratchpad: None Auto Publish: False Config: Http: False Https: True Distributor Type Id: export_distributor Id: export_distributor Last Publish: None Repo Id: local Scheduled Publishes: Scratchpad: None [root@preethi ~]# pulp-admin rpm repo sync run --repo-id local +----------------------------------------------------------------------+ Synchronizing Repository [local] +----------------------------------------------------------------------+ This command may be exited by pressing ctrl+c without affecting the actual operation on the server. Downloading metadata... [\] ... failed 2012-11-18 15:52:27,660 9759:140448072967936: pulp.plugins.yum_importer.importer_rpm:INFO: importer_rpm:477 Begin sync of repo <local> from feed_url <None> 2012-11-18 15:52:28,167 9759:140448072967936: pulp.plugins.yum_importer.importer_rpm:ERROR: importer_rpm:486 Failed to fetch metadata on: None 2012-11-18 15:52:28,168 9759:140448072967936: pulp.plugins.yum_importer.importer:ERROR: importer:493 Caught Exception: 'NoneType' object has no attribute 'encode' Traceback (most recent call last): File "/usr/lib/pulp/plugins/importers/yum_importer/importer.py", line 487, in sync_repo status, summary, details = self._sync_repo(repo, sync_conduit, config) File "/usr/lib/pulp/plugins/importers/yum_importer/importer.py", line 516, in _sync_repo rpm_status, summary["packages"], details["packages"] = self.importer_rpm.sync(repo, sync_conduit, config, progress_callback) File "/usr/lib/pulp/plugins/importers/yum_importer/importer_rpm.py", line 483, in sync num_retries=num_retries, retry_delay=retry_delay) File "/usr/lib/python2.7/site-packages/grinder/RepoFetch.py", line 154, in setup info.setUp() File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 397, in setUp filter=self.filter, num_retries=self.num_retries, retry_delay=self.retry_delay) File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 50, in __init__ self.repo_url = repo_url.encode('ascii', 'ignore') AttributeError: 'NoneType' object has no attribute 'encode' 2012-11-18 15:52:28,225 9759:140448072967936: pulp.server.dispatch.task:ERROR: task:126 Importer indicated a failed response Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/dispatch/task.py", line 123, in _run result = call(*args, **kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/sync.py", line 144, in sync raise PulpExecutionException(_('Importer indicated a failed response')) PulpExecutionException: Importer indicated a failed response 2012-11-18 15:52:28,238 9759:140448072967936: pulp.server.dispatch.task:INFO: task:158 FAILURE: Task c13fc4d4-8127-4f9d-af1e-d1a86fd444b4: CallRequest: RepoSyncManager.sync(u'local', sync_config_override=None, importer_config={}, importer_instance=<yum_importer.importer.YumImporter object at 0x7fbc87daebd0>) 2012-11-18 15:52:28,252 9759:140448072967936: pulp.server.dispatch.call:ERROR: call:208 Exception encountered while pickling: kwargs 2012-11-18 15:52:28,252 9759:140448072967936: pulp.server.dispatch.call:ERROR: call:209 can't pickle lock objects Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/dispatch/call.py", line 204, in serialize data[field] = pickle.dumps(getattr(self, field)) File "/usr/lib64/python2.7/pickle.py", line 1374, in dumps Pickler(file, protocol).dump(obj) File "/usr/lib64/python2.7/pickle.py", line 224, in dump self.save(obj) File "/usr/lib64/python2.7/pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "/usr/lib64/python2.7/pickle.py", line 649, in save_dict self._batch_setitems(obj.iteritems()) File "/usr/lib64/python2.7/pickle.py", line 663, in _batch_setitems save(v) File "/usr/lib64/python2.7/pickle.py", line 331, in save self.save_reduce(obj=obj, *rv) File "/usr/lib64/python2.7/pickle.py", line 419, in save_reduce save(state) File "/usr/lib64/python2.7/pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "/usr/lib64/python2.7/pickle.py", line 649, in save_dict self._batch_setitems(obj.iteritems()) File "/usr/lib64/python2.7/pickle.py", line 663, in _batch_setitems save(v) File "/usr/lib64/python2.7/pickle.py", line 331, in save self.save_reduce(obj=obj, *rv) File "/usr/lib64/python2.7/pickle.py", line 419, in save_reduce save(state) File "/usr/lib64/python2.7/pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "/usr/lib64/python2.7/pickle.py", line 649, in save_dict self._batch_setitems(obj.iteritems()) File "/usr/lib64/python2.7/pickle.py", line 663, in _batch_setitems save(v) File "/usr/lib64/python2.7/pickle.py", line 331, in save self.save_reduce(obj=obj, *rv) File "/usr/lib64/python2.7/pickle.py", line 419, in save_reduce save(state) File "/usr/lib64/python2.7/pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "/usr/lib64/python2.7/pickle.py", line 649, in save_dict self._batch_setitems(obj.iteritems()) File "/usr/lib64/python2.7/pickle.py", line 663, in _batch_setitems save(v) File "/usr/lib64/python2.7/pickle.py", line 331, in save self.save_reduce(obj=obj, *rv) File "/usr/lib64/python2.7/pickle.py", line 419, in save_reduce save(state) File "/usr/lib64/python2.7/pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "/usr/lib64/python2.7/pickle.py", line 649, in save_dict self._batch_setitems(obj.iteritems()) File "/usr/lib64/python2.7/pickle.py", line 663, in _batch_setitems save(v) File "/usr/lib64/python2.7/pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "/usr/lib64/python2.7/pickle.py", line 725, in save_inst save(stuff) File "/usr/lib64/python2.7/pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "/usr/lib64/python2.7/pickle.py", line 649, in save_dict self._batch_setitems(obj.iteritems()) File "/usr/lib64/python2.7/pickle.py", line 663, in _batch_setitems save(v) File "/usr/lib64/python2.7/pickle.py", line 331, in save self.save_reduce(obj=obj, *rv) File "/usr/lib64/python2.7/pickle.py", line 419, in save_reduce save(state) File "/usr/lib64/python2.7/pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "/usr/lib64/python2.7/pickle.py", line 649, in save_dict self._batch_setitems(obj.iteritems()) File "/usr/lib64/python2.7/pickle.py", line 663, in _batch_setitems save(v) File "/usr/lib64/python2.7/pickle.py", line 306, in save rv = reduce(self.proto) File "/usr/lib64/python2.7/copy_reg.py", line 70, in _reduce_ex raise TypeError, "can't pickle %s objects" % base.__name__ TypeError: can't pickle lock objects Expected results: Additional info:
Fixed the plugin importer to check and return a failure report. There still seems to be an issue on CLI where the sync never returns which seems related to coordinator. For this issue the plugin side API is fixed in the following commit, commit 46e62011416ddfe404e546a3c1bf15519a93141f Author: Pradeep Kilambi <pkilambi> Date: Tue Nov 27 17:55:03 2012 -0500 check if a feed url is set to the importer config before performing repo sync. If no feed is present return a failure
Spoke to jdob and moving this to jconnor for further investigation on why the CLI is hanging.
This bug is two parts: - sync pickle bug - tracked in 875843 - CLI hanging issue - already fixed, don't have the bug number handy I'll verify that the CLI is happy and we'll track the pickle bug in the other one.
Closing out as a duplicate. The pickle bug is tracked elsewhere, the CLI hanging was fixed, and the remaining issue about synccing a feedless repo is in 857528. *** This bug has been marked as a duplicate of bug 857528 ***