Bug 838583 - ERROR: if repo['repo_id'] not in cluster['repo_ids']: KeyError: 'repo_id', while creating entitlement certificate
Summary: ERROR: if repo['repo_id'] not in cluster['repo_ids']: KeyError: 'repo_id', w...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA
Version: 2.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: mkovacik
QA Contact: Martin Kočí
URL:
Whiteboard:
: 840532 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-09 14:21 UTC by wes hayutin
Modified: 2012-08-24 11:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Two separate repository lists were used by rhui-manager to display and track what repositories were selected during the creation of client entitlement certificate which led to a conflict. A repository list that is synchronised with what is displayed to the user has now been created to remove this error.
Clone Of:
Environment:
Last Closed: 2012-08-24 11:55:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Verifying screen log (12.32 KB, text/plain)
2012-08-02 14:29 UTC, mkovacik
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:1205 0 normal SHIPPED_LIVE RHUI 2.1 Enhancement Update 2012-08-24 15:52:31 UTC

Description wes hayutin 2012-07-09 14:21:30 UTC
Description of problem:
ERROR:  if repo['repo_id'] not in cluster['repo_ids']: KeyError: 'repo_id', while creating entitlement certificate

Connecting to RHUA [ip-10-212-87-146.ec2.internal]...
Successfully connected to [ip-10-212-87-146.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/client.py", line 88, in generate
    if repo['repo_id'] not in cluster['repo_ids']:
KeyError: 'repo_id'
Unexpected error caught at the shell level



recreate:

             -= Red Hat Update Infrastructure Management Tool =-


-= Client Entitlement Management =-

   e   generate an entitlement certificate
   c   create a client configuration RPM from an entitlement certificate

                                      Connected: ip-10-212-87-146.ec2.internal
------------------------------------------------------------------------------
rhui (client) => e

Select the CDS cluster that clients using this entitlement certificate will use to download content:

  1  - cluster01
Enter value (1-1) or 'b' to abort: 1


An unexpected error has occurred during the last operation.
More information can be found in /root/.rhui/rhui.log.


------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Client Entitlement Management =-

   e   generate an entitlement certificate
   c   create a client configuration RPM from an entitlement certificate

   logout
       removes stored authentication credentials and exits

   <   move to the previous screen
   ^, home
       move to the home screen
   /, clear
       clears the screen
   ?, help
       display help
   q, quit, exit
       exit

                                      Connected: ip-10-212-87-146.ec2.internal
------------------------------------------------------------------------------
rhui (client) => e

Select the CDS cluster that clients using this entitlement certificate will use to download content:

  1  - cluster01
Enter value (1-1) or 'b' to abort: 1


An unexpected error has occurred during the last operation.
More information can be found in /root/.rhui/rhui.log.


Version:
rh-rhui-tools-2.0.68-1.el6_3.noarch.rpm

Comment 1 wes hayutin 2012-07-09 15:24:44 UTC
To recreate this issue, I believe a custom repo needs to be created.
I'm not sure yet, but I think the key for custom repos needs to be changed from "id" to "repo_id"

Comment 2 wes hayutin 2012-07-09 16:40:04 UTC
I believe this is a possible fix..

--- a/rhui-2.0/tools/src/rhui/tools/screens/client.py
+++ b/rhui-2.0/tools/src/rhui/tools/screens/client.py
@@ -85,7 +85,7 @@ class ClientScreen(Screen):
             # List each repo for that path underneath it, indented to match 
             # the menu
             for repo in ent.repos:
-                if repo['repo_id'] not in cluster['repo_ids']:
+                if repo['id'] not in cluster['repo_ids']:
                     continue
                 menu_item += '             %s\n' % repo['name']
 
diff --git a/rhui-2.0/tools/test/data/ca1.srl b/rhui-2.0/tools/test/data/ca1.srl
index adb9de8..86397e5 100644
--- a/rhui-2.0/tools/test/data/ca1.srl
+++ b/rhui-2.0/tools/test/data/ca1.srl
@@ -1 +1 @@
-08
+09

Comment 3 wes hayutin 2012-07-10 01:53:18 UTC
cloude ae1789aaabf07247f2d5f72e93dd426a72b0a86b

Comment 4 wes hayutin 2012-07-16 15:45:57 UTC
*** Bug 840532 has been marked as a duplicate of this bug. ***

Comment 5 mkovacik 2012-08-02 14:29:31 UTC
Created attachment 601962 [details]
Verifying screen log

Verified according to steps in Bug 840532. See the screen log attached.

Build: RHEL-6.3-RHUI-2.1-20120801.0-Server-x86_64-DVD1.iso

Comment 6 sachua 2012-08-15 04:45:57 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Two separate repository lists were used by rhui-manager to display and track what repositories were selected during the creation of client entitlement certificate which led to a conflict. A repository list that is synchronised with what is displayed to the user has now been created to remove this error.

Comment 8 errata-xmlrpc 2012-08-24 11:55:09 UTC
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/RHEA-2012-1205.html


Note You need to log in before you can comment on or make changes to this bug.