Bug 838583 - ERROR: if repo['repo_id'] not in cluster['repo_ids']: KeyError: 'repo_id', while creating entitlement certificate
ERROR: if repo['repo_id'] not in cluster['repo_ids']: KeyError: 'repo_id', w...
Status: CLOSED ERRATA
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA (Show other bugs)
2.1
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: mkovacik
Martin Kočí
:
: 840532 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-09 10:21 EDT by wes hayutin
Modified: 2012-08-24 07:55 EDT (History)
6 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-24 07:55:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description wes hayutin 2012-07-09 10:21:30 EDT
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 11:24:44 EDT
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 12:40:04 EDT
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-09 21:53:18 EDT
cloude ae1789aaabf07247f2d5f72e93dd426a72b0a86b
Comment 4 wes hayutin 2012-07-16 11:45:57 EDT
*** Bug 840532 has been marked as a duplicate of this bug. ***
Comment 5 mkovacik 2012-08-02 10:29:31 EDT
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 00:45:57 EDT
    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 07:55:09 EDT
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.