Bug 715252

Summary: rhui-manager fails to launch and to create rhui identity certs, serial number db file
Product: Red Hat Update Infrastructure for Cloud Providers Reporter: Kedar Bidarkar <kbidarka>
Component: ToolsAssignee: Jay Dobies <jason.dobies>
Status: CLOSED CURRENTRELEASE QA Contact: wes hayutin <whayutin>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.0CC: kbidarka, sghai, tsanders
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-31 12:52:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Kedar Bidarkar 2011-06-22 10:49:51 UTC
Description of problem:

For a newly installed setup.

[root@ip-10-122-70-115 ~]# rhui-manager
An entitlement signing CA certificate is required to use RHUI Tools
but was not found.

Full path to the new signing CA certificate:
/root/gen_certs/ca1.crt

Full path to the new signing CA certificate private key:
/root/gen_certs/ca1.key

Generating entitlement certificate serial number database file /etc/pki/rhui/entitlement-ca.srl
A RHUI identity certificate is required to use RHUI Tools but was not found.
A new identity certificate will be generated now using the CA certificate
found at /etc/pki/rhui/entitlement-ca.crt.

Traceback (most recent call last):
  File "/usr/bin/rhui-manager", line 16, in <module>
    rhui.tools.launcher.main()
  File "/usr/lib/python2.6/site-packages/rhui/tools/launcher.py", line 314, in main
    _ensure_identity_cert(config, prompt)
  File "/usr/lib/python2.6/site-packages/rhui/tools/launcher.py", line 253, in _ensure_identity_cert
    identity_cert.generate_and_save(config)
  File "/usr/lib/python2.6/site-packages/rhui/tools/identity_cert.py", line 50, in generate_and_save
    cert_utils.generate(entitlements, identity_name, tmp_dir, ca_cert_filename, ca_key_filename, 100, 365)
TypeError: generate() takes exactly 6 arguments (7 given)


Version-Release number of selected component (if applicable):

[root@ip-10-122-70-115 ~]# rpm -qav | grep -ie pulp -ie rhui-tools -ie gofer -ie qpid 
pulp-common-0.0.194-1.el6.noarch
pulp-client-0.0.194-1.el6.noarch
qpid-cpp-server-ssl-0.10-3.el6.x86_64
qpid-cpp-client-ssl-0.10-3.el6.x86_64
qpid-cpp-client-0.10-3.el6.x86_64
python-qpid-0.10-1.el6.noarch
gofer-0.41-1.el6.noarch
rh-rhui-tools-2.0.31-1.el6.noarch
qpid-cpp-server-0.10-3.el6.x86_64
python-gofer-0.41-1.el6.noarch
pulp-0.0.194-1.el6.noarch



How reproducible:

Fresh setup and launching rhui-manager and providing the ca.crt and ca.keys.
Steps to Reproduce:
1.launch rhui-manager
2.provide ca cert and keys
3.
  
Actual results:

throws the above error

Expected results:

Should create Generating entitlement certificate serial number database file and the rhui identity files.


Additional info:

Comment 1 Sachin Ghai 2011-06-22 11:51:47 UTC
Few things to add, not sure these are relevant to this defect. But this is what I observed during upgrade. I followed all steps that Jdob has suggested to perform before upgrade. 

I tried to upgrade the existing setup from pulp build 0.190 to 0.194 and rhui build from 2.0.30 to 2.0.31. 

This replaced the pulp.conf with new pulp.conf. When I replaced the new "pulp.conf" with "pulp.conf.rpmsave" file and restarted the pulp-server, I got "internal server error" 


And then I updated new pulp.conf manually, and added two new entries in [security] section as below and restarted the pulp-server.

user_cert_expiration:
consumer_cert_expiration: 


This way I was able to launch the rhui-manager but CDS register get hanged. Seems that upgrade is also not safe with this new build (0.194).

Comment 2 Jay Dobies 2011-06-22 12:59:05 UTC
Fixed in 2.0.32.

Comment 3 Kedar Bidarkar 2011-06-23 06:37:02 UTC
Now, we are able to connect.

[root@ip-10-122-70-115 rhui]# rhui-manager
Previous authentication credentials could not be found. Logging into
the RHUI.

If this is the first time using the RHUI, it is recommended to change
the user's password in the User Management section of RHUI Tools.

RHUI Username: admin
RHUI Password: 


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


-= Home =-

   r   manage repositories
   c   manage content delivery servers (CDS)
   s   synchronization status and scheduling
   e   create entitlement certificates and client configuration RPMs
   n   manage Red Hat entitlement certificates
   u   manage users

   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-122-70-115.ec2.internal
------------------------------------------------------------------------------
rhui (home) =>

Comment 4 wes hayutin 2011-08-01 21:38:41 UTC
moving to release pending

Comment 5 wes hayutin 2012-05-31 12:52:08 UTC
closing out, product released