Bug 818140 - rhui-installer /opt/rhua/my-answers giving IOError
rhui-installer /opt/rhua/my-answers giving IOError
Status: CLOSED DUPLICATE of bug 789994
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Documentation (Show other bugs)
2.0
x86_64 All
urgent Severity urgent
: ---
: ---
Assigned To: Shikha
mkovacik
: Reopened
Depends On:
Blocks: 711169
  Show dependency treegraph
 
Reported: 2012-05-02 06:30 EDT by IBM Bug Proxy
Modified: 2016-04-27 19:38 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-02 19:19:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
my-answers file (4.01 KB, application/octet-stream)
2012-05-08 02:20 EDT, IBM Bug Proxy
no flags Details
screen shots of specified command o/p (51.84 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-05-08 02:20 EDT, IBM Bug Proxy
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 81170 None None None Never

  None (edit)
Description IBM Bug Proxy 2012-05-02 06:30:48 EDT
== Comment: #0 - Tarun Karmakar <tarunk@us.ibm.com> - 2012-04-30 05:15:18 ==
---Problem Description---
I was installing RHUI. RHUA and CDS was installed successfully. But during post - installation I got the below message :
[root@v52540beadca ~]# rhui-installer /opt/rhua/my-answers
Generating RHUA configuration RPM
RHUA RPM can be found at [/tmp/rhui]
Generating CDS bundle for CDS [v52540b24a4.hsltv3prod.cloud9.ibm.com]
Traceback (most recent call last):
  File "/usr/bin/rhui-installer", line 16, in <module>
    rhui.installer.launcher.main()
  File "/usr/lib/python2.6/site-packages/rhui/installer/launcher.py", line 104, in main
    cds_rpm_path = cds.build_rpm(cds_bundle, CONFIG_DIR)
  File "/usr/lib/python2.6/site-packages/rhui/rpm/cds.py", line 70, in build_rpm
    _do_ssl(builder, answers)
  File "/usr/lib/python2.6/site-packages/rhui/rpm/cds.py", line 140, in _do_ssl
    shutil.copy(answers['ssl_cert'], os.path.join(rpm_builder.source_gz_dir, 'cds-ssl-cert.crt'))
  File "/usr/lib64/python2.6/shutil.py", line 84, in copy
    copyfile(src, dst)
  File "/usr/lib64/python2.6/shutil.py", line 50, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/root/rhui-ssl/certs/server.crt'
[root@v52540beadca ~]#

 
Contact Information = tarunk@us.ibm.com 
 
---uname output---
Linux v52540beadca 2.6.32-220.7.1.el6.x86_64 #1 SMP Fri Feb 10 15:22:22 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
 
---Patches Installed---
NA
 
Machine Type = Tell me command to get this info 
 
---Debugger---
A debugger is not configured
 
---Steps to Reproduce---
 Need to follow the RHUI installation guide with latest ISO image
 
Install method: ISO
 
Install ISO Information: RHEL-6.1-RHUI-2.0-LATEST-Server-x86_64-DVD.iso
 
Userspace tool common name: I do not know 

Userspace rpm: I do not know 
 
Install disk info: Not getting about what to provide
 
The userspace tool has the following bit modes: 64 

Userspace tool obtained from project website:  na 
 
*Additional Instructions for tarunk@us.ibm.com: 
-Post a private note with access information to the machine that the bug is occuring on. 
-Attach Anaconda screen shot(s) to the bug.
-Attach ltrace and strace of userspace application. 
-Attach Anaconda console logs to the bug.

== Comment: #1 - SRINIVASA N. THIMALAPUR <srinivasa.tn@in.ibm.com> - 2012-04-30 05:33:33 ==
Hi,
   The error says that it cannot read the ssl certificate.  Did you follow the steps mentioned in http://docs.redhat.com/docs/en-US/Red_Hat_Update_Infrastructure/2.0/html-single/Installation_Guide/index.html#sect-Installation_Guide-RHUI_Installer-Setting_up_SSL?

Regards,
Seenu.

== Comment: #2 - Tarun Karmakar <tarunk@us.ibm.com> - 2012-04-30 08:43:31 ==
Hello,

I followed the same as Installation Guidelines on Red Hat site. I created SSL certificates as explained and modified my-answers file for the location of SSL certificates.
But still it's saying that files are not present; I mean that IOError it's throwing.

Regards,
~ Tarun Karmakar

== Comment: #3 - SRINIVASA N. THIMALAPUR <srinivasa.tn@in.ibm.com> - 2012-04-30 08:52:36 ==
Please check the permission of the certificate file (ls -l /root/rhui-ssl/certs/  and  cat /root/rhui-ssl/certs/server.crt).

Regards,
Seenu.

== Comment: #4 - Tarun Karmakar <tarunk@us.ibm.com> - 2012-04-30 09:43:22 ==
Permission level is 777. 
I tried both 744 and 777, but nothing to avail.

== Comment: #8 - Tarun Karmakar <tarunk@us.ibm.com> - 2012-05-02 05:42:04 ==
The said certificate (server.crt) is SSL certificate of CDS instance and that's residing on CDS instance. All this information are maintained in my-answers.

You can have a look at my-answer file here :

[root@v52540beadca ~]# vim /opt/rhua/my-answers
# Full path to the NSS database used to secure QPID communications. This is generated
# using the nss-db-gen script included with the RHUI Installer. Note: This must be
# a directory containing a number of files, including the NSS database and password file.
qpid_nss_db: /opt/rhua/qpid/nss

# == RHUA ===========================================================================

# The [rhua] section contains attributes describing a particular RHUA instance.
[rhua]

# Name of the RHUA configuration RPM created by RHUI tools.
rpm_name: rh-rhua-config

# Fully qualified hostname of the RHUA instance.
hostname: v52540beadca.hsltv3prod.cloud9.ibm.com

# SSL certificate and private key to be installed on the RHUA. The CN of this certificate
# must match the hostname listed above.
ssl_cert: /tmp/tarunk-RHUI-CDS/rhui-ssl/certs/rhua-server.crt
ssl_key: /tmp/tarunk-RHUI-CDS/rhui-ssl/certs/rhua-server.key

# CA certificate used to sign the RHUA's SSL certificate. This is needed by the CDS
# instances when connecting back to the RHUA to synchronize content to verify the
# RHUA certificate during the handshake.
ca_cert: /opt/rhua/qpid/ca.crt

# If a proxy server is needed for the RHUA to connect to the internet, this is the hostname
# of that server. If this is not specified, no proxy server will be used.
# proxy_server_host: proxy.example.com

# Port to access on the proxy server. This value has no effect if proxy_server_host is
# not specified.
# proxy_server_port: 443

# Proxy server username. Omit if the proxy server does not require authentication.
# proxy_server_username: admin

# Proxy server password.
# proxy_server_password: password


# == CDS Instances ===========================================================================

# There should be one [cds-*] section for each CDS to be used in the RHUI infrastructure.
# The name between the [ ] must begin with "cds", however the remainder is arbitrary and must
# only be unique with respect to other cds sections. There will be one CDS configuration RPM
# generated for each section found.

[cds-1]

# Name of the RPM that will be created for this CDS configuration.
rpm_name: rh-cds1-config

# Fully qualified name of this CDS instance.
hostname: v52540b24a4.hsltv3prod.cloud9.ibm.com

# SSL certificate and private key to be used by this CDS instance. The CN of this
# certificate must match the hostname listed above.
ssl_cert: /tmp/tarunk-RHUI-CDS/rhui-ssl/certs/server.crt
ssl_key: /tmp/tarunk-RHUI-CDS/rhui-ssl/certs/server.key

# [cds-2]
# rpm_name: rh-cds2-config
# hostname: cds2.example.com
# ssl_cert:
# ssl_key:
Comment 2 Ondrej Vasik 2012-05-02 06:40:00 EDT
Basesystem is definitely wrong component. Product is also imho wrong... Moved to RHUI product and CDS component (I don't know which component is correct, please reassign it, sorry for that).
Comment 3 James Slagle 2012-05-02 09:22:52 EDT
Are you sure the answers file you pasted is the one you used that resulted in the traceback?  The path (/root/rhui-ssl/certs/server.crt) that caused the IOError exception isn't even referenced in the answers file shown.

Verify the path to the ssl_cert for the CDS is correct.  Do you intend it to be /root/rhui-ssl/certs/server.crt or /tmp/tarunk-RHUI-CDS/rhui-ssl/certs/server.crt?

Please attach the answers file actually used to this bugzilla.

Also, what version of rh-rhui-tools do you have?
Comment 4 IBM Bug Proxy 2012-05-07 02:20:18 EDT
------- Comment From srinivasa.tn@in.ibm.com 2012-05-07 06:14 EDT-------
It was hit and trial method experiment. Initially I placed all SSL certificates under /root/rhui-ssl/certs/ and executing rhui-installer considering this directory as SSL certificates location.
Later I copied all SSL certificates to a temporary location (/tmp/tarunk-RHUI-CDS/rhui-ssl/certs/) thinking that /root directory might be having some access permission problem and tried to execute rhui-installer.

But in both cases it's giving IOError.

To inform you more, I tried with different permission level(744, 777) for all those SSL certificates but to no avail. Comments were added already in this regard.

I am happy to clear your confusion on whether I am using different directory location in my-answers file whereas SSL certificates are placed in some other directory.
I verified all those parameter values in my-answers file prior executing rhui-installer command.

It is latest RHUI installer( RHEL-6.1-RHUI-2.0-LATEST-Server-x86_64-DVD.iso ).
Comment 5 James Slagle 2012-05-07 14:41:40 EDT
Assuming your certs are under /root/rhui-ssl/certs/, can you run the following as root, capture the screen output exactly, and provide that screen capture:

ls -Z -l -d /root/rhui-ssl/certs/
ls -Z -l /root/rhui-ssl/certs/

Then please do a screen capture of the execution of rhui-installer with the answers file and provide that output.

Also, please provide the information I asked for earlier:

Please attach the answers file actually used to this bugzilla.

Also, what version of rh-rhui-tools do you have?
Comment 6 IBM Bug Proxy 2012-05-08 02:20:51 EDT
Created attachment 582860 [details]
my-answers file


------- Comment (attachment only) From tarunk@us.ibm.com 2012-05-08 06:18 EDT-------
Comment 7 IBM Bug Proxy 2012-05-08 02:20:57 EDT
Created attachment 582861 [details]
screen shots of specified command o/p


------- Comment (attachment only) From tarunk@us.ibm.com 2012-05-08 06:19 EDT-------
Comment 8 James Slagle 2012-05-08 07:41:16 EDT
I see from the screen capture that you have the CDS certs (/root/rhui/ssl-certs/server.*) on a different machine.  Everything needs to be on the same machine when you run rhui-installer so that it has access to the files to build the needed rpm's.  Move these files from your CDS to the RHUA, where you're running rhui-installer.  Make sure your answers files is correct and then run the command again.
Comment 9 IBM Bug Proxy 2012-05-09 03:50:37 EDT
------- Comment From tarunk@us.ibm.com 2012-05-09 07:46 EDT-------
Thank you. This step(rhui-installer) has successfully completed now.

But may I know where to get the complete RHUI installation guide ?

For instance I was looking for /etc/pulp/client.conf and which is actually replaced by /etc/pulp/admin/admin.conf and many others as well.
Comment 10 IBM Bug Proxy 2012-05-15 18:30:29 EDT
------- Comment From tpnoonan@us.ibm.com 2012-05-15 22:20 EDT-------
(In reply to comment #28)
> Yeah, I check RedHat RHUI installation guide as :
> http://docs.redhat.com/docs/en-US/Red_Hat_Update_Infrastructure/2.0/html/
> Installation_Guide/index.html

And found some information are not present.
> For instance, /etc/pulp/client.conf has been replaced to
> /etc/pulp/admin/admin.conf etc.

All related information are available in my
> previous comment.

Thanks.

hi red hat, can this doc be updated? thanks
Comment 11 IBM Bug Proxy 2012-05-21 03:09:48 EDT
------- Comment From tarunk@us.ibm.com 2012-05-21 06:48 EDT-------
Here is output of CDS instance registration :

Below if for CDS Instance hostname as FQDN:
-= Content Delivery Server (CDS) Management =-

l list all CDS instances registered to the RHUI
a register (add) a new CDS instance
d unregister (delete) a CDS instance from the RHUI

Connected: v52540beadca.hsltv3prod.cloud9.ibm.com
------------------------------------------------------------------------------
rhui (cds) => a

Prior to registering a CDS, the CDS must be configured and running.

Hostname of the CDS to register:
v52540b24a4.hsltv3prod.cloud9.ibm.com

Display name for the CDS [v52540b24a4.hsltv3prod.cloud9.ibm.com]:

The following CDS instance will be registered:
Hostname: v52540b24a4.hsltv3prod.cloud9.ibm.com
Name: v52540b24a4.hsltv3prod.cloud9.ibm.com
Proceed? (y/n) y

Error registering v52540b24a4.hsltv3prod.cloud9.ibm.com, check the log file for more information

------------------------------------------------------------------------------
rhui (cds) =>

The error message is already posted in my previous comment.

Following is for CDS instance hostname as short hostname

-= Content Delivery Server (CDS) Management =-

l   list all CDS instances registered to the RHUI
a   register (add) a new CDS instance
d   unregister (delete) a CDS instance from the RHUI

Connected: v52540beadca.hsltv3prod.cloud9.ibm.com
------------------------------------------------------------------------------
rhui (cds) => l

-= RHUI Content Delivery Servers =-

No CDS instances are registered.

------------------------------------------------------------------------------
rhui (cds) => a

Prior to registering a CDS, the CDS must be configured and running.

Hostname of the CDS to register:
v52540b24a4

Display name for the CDS [v52540b24a4]:
cds-mytest-v52540b24a4

The following CDS instance will be registered:
Hostname: v52540b24a4
Name:     cds-mytest-v52540b24a4
Proceed? (y/n) y

Successfully registered cds-mytest-v52540b24a4

------------------------------------------------------------------------------
rhui (cds) =>

We can see from the above that their is some disparity in host name during CDS instance registration and also throughout the post installation of RHUI. In some places it's mentioned what to be provided as host name like FQDN or as such. But most places it's not clear. For instance, the following is from RHUI Installation guidelines :

[
Also on the RHUA server, edit the /etc/rhui/rhui-tools.conf configuration file using your
preferred text editor, and add the fully qualified domain name (FQDN) to be used to connect to the
RHUA:

hostname: rhua.example.com

]

Here is prominent information between the clash of hostnames :

[root@v52540beadca etc]# pulp-admin cds list
ERROR: The server hostname you have configured in /etc/pulp/admin/admin.conf doe
hostname returned from the Pulp server you are connecting to.

You have: [v52540beadca] configured but got: [v52540beadca.hsltv3prod.cloud9.ibm

Please correct the host in the /etc/pulp/admin/admin.conf file

From all of the above, I do not see any uniformity in hostname input.  So, is it possible to maintain the uniqueness of hostname throughout the post installation configuration of RHUI ? Else please update RHUI installation guidelines about where to provide which hostname value.

If RedHat can clarify in this regard that will be a big help.
Comment 12 Chris Morgan 2012-05-21 08:34:47 EDT
As this is a support issue and not a bug issue please use the Red Hat support process.  If you have questions, then contact your IBM RHUI interface, Matt Lobbes: Matthew Lobbes <lobbes@us.ibm.com>
Comment 13 IBM Bug Proxy 2012-05-29 17:31:56 EDT
------- Comment From tpnoonan@us.ibm.com 2012-05-29 21:21 EDT-------
(In reply to comment #31)
As
> this is a support issue and not a bug issue please use the Red Hat support
> process.  If you have questions, then contact your IBM RHUI interface, Matt
> Lobbes: Matthew Lobbes <lobbes@us.ibm.com>

hi red hat, for clarity can you do a doc update? thanks
Comment 15 James Slagle 2012-07-02 19:19:49 EDT

*** This bug has been marked as a duplicate of bug 789994 ***

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