Description of problem: traceback.. remove all repos from rhua.. immediately nav to repo sync window 1. begin w/ a populated rhui env 2. remove all repos from rhui via rhui-manager 3. nav to sync window, repo sync uccessfully connected to [ip-10-70-90-96.ec2.internal] Unexpected error caught at the shell level Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 86, in safe_listen self.listen(clear=first_run) File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 112, in listen Shell.listen(self) File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 186, in listen item.func(*args, **item.kwargs) File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 171, in repo_sync repos = self.pulp.repos_with_sync_status() File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 242, in repos_with_sync_status full_repo['sync_last_sync_date'] = full_repo['last_sync'] TypeError: 'NoneType' object is unsubscriptable (END)
the issue here is that deleting repositories is not instantaneous, yet the pulp api returns immediately even if the delete task is queued. And a repo with a queued delete task still shows up in the list of repos. So, you can go to the sync screen and try to sync repos and in between it getting the list of repos and checking to see if the repo can get sync'd, the repo gets deleted. There is too much Pulp logic in rhui-manager to determine if a repo can be sync'd this should be returned by the server. That would be quite an involved fix and given that we're still on Pulp v1, I'll go for an easier fix and just shorten the time between repos are fetched and determining if it can be sync'd. It's not a 100% solution, but it should mostly mitigate the issue.
commit df570e0a67dafabb7e601220e26cf1d10687e10f
I've tried to verify this bug and unfortunately ran into a slightly different issue. Test procedure: 1) Run two rhui-manager processes in separate consoles 2) In first console: 2.1 Add all repos from RH certificate 2.2 Run 'Remove all repos' and immediately switch to the second console (while action is still in process) 3) In second console try to run 'sync repo'. The result is in /root/.rhui/rhui.log Unexpected error caught at the shell level Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 86, in safe_listen self.listen(clear=first_run) File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 112, in listen Shell.listen(self) File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 186, in listen item.func(*args, **item.kwargs) File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 171, in repo_sync repos = self.pulp.repos_with_sync_status() File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 239, in repos_with_sync_status full_repo = self.repo(repo['id']) File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 140, in repo raise e ServerRequestError: (500, u'PulpException: No Repo with id: rhel-5-server-rhui-source-rpms-5Server-i386 found', u'Traceback (most recent call last):\n File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 48, in report_error\n return method(self, *args, **kwargs)\n File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 127, in _auth_decorator\n value = method(self, *args, **kwargs)\n File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py", line 1052, in GET\n return field(id)\n File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py", line 1030, in keys\n keylist = api.listkeys(id)\n File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 1774, in listkeys\n repo = self._get_existing_repo(id)\n File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 117, in _get_existing_repo\n raise PulpException("No Repo with id: %s found" % id)') I'm not 100% sure it's the same issue though.
If it's a different symptom of the same problem. The repo in question got deleted in between the time it was first read, and then used (in this case, trying to get it's status). rhui-manager is not written in a way to really handle multiple users at once. But, I added a check for this case, so at least it won't throw an exception. cloude commit: 2ad037f47d7c382e559a6c38b62806b5eb0acfd0 Will move to ON_QA once we get a new iso build.
RHEL-6.3-RHUI-2.1.1-20130211.0-Server-x86_64-DVD1.iso [root@rhua ~]# rpm -q pulp pulp-0.0.263-27.el6_3.noarch [root@rhua ~]# rpm -q rh-rhui-tools rh-rhui-tools-2.1.16-1.el6_3.noarch With my test sequence (https://bugzilla.redhat.com/show_bug.cgi?id=847306#c3) the problem persists: Unexpected error caught at the shell level Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 86, in safe_listen self.listen(clear=first_run) File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 112, in listen Shell.listen(self) File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 186, in listen item.func(*args, **item.kwargs) File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 171, in repo_sync repos = self.pulp.repos_with_sync_status() File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 244, in repos_with_sync_status full_repo = self.repo(repo['id']) File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 145, in repo raise e ServerRequestError: (500, u'PulpException: No Repo with id: rhel-6-server-rhui-supplementary-rpms-6Server-x86_64 found', u'Traceback (most recent call last):\n File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 48, in report_error\n return method(self, *args, **kwargs)\n File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 127, in _auth_decorator\n value = method(self, *args, **kwargs)\n File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py", line 1052, in GET\n return field(id)\n File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py", line 1030, in keys\n keylist = api.listkeys(id)\n File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 1774, in listkeys\n repo = self._get_existing_repo(id)\n File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 117, in _get_existing_repo\n raise PulpException("No Repo with id: %s found" % id)')
This happens due to the typo (s,Repo,repo,) in 2ad037f47d7c382e559a6c38b62806b5eb0acfd0 cloude commit. I'll attach tiny patch (I've tested it) to fix this.
Created attachment 696463 [details] Proposed patch
patch applied, cloude commit 92c8c962b9a1dda9e12ac38584e7e92d1b473887
Verified in # rpm -q rh-rhui-tools rh-rhui-tools-2.1.17-1.el6_3.noarch no error with procedure described in https://bugzilla.redhat.com/show_bug.cgi?id=847306#c3
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0571.html