Bug 803379 - The install_RHUA.sh script should accept RHUA hostname and automatically configure install.
Summary: The install_RHUA.sh script should accept RHUA hostname and automatically conf...
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
unspecified
Target Milestone: ---
: ---
Assignee: mkovacik
QA Contact: mkovacik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-14 15:28 UTC by Chris Morgan
Modified: 2012-08-24 13:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, all configuration files requiring the fully qualified domain name (fqdn) of the Red Hat Update Agent (RHUA)had to be manually configured. The updated version of the rhui-installer produces a config rpm which updates the appropriate configuration files with the RHUA hostname.
Clone Of:
Environment:
Last Closed: 2012-08-24 11:53:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
one shot at a better patch (2.38 KB, patch)
2012-05-24 21:05 UTC, wes hayutin
no flags Details | Diff
Verifying screen log (6.35 KB, text/plain)
2012-07-30 17:49 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 Chris Morgan 2012-03-14 15:28:57 UTC
As either a required parameter for the install script and/or have the install script ask for the FQDN of the RHUA.  Subsequently, the install script should automatically configure the various configuration files that today require manual intervention.  Thanks.

Comment 1 Chris Morgan 2012-04-16 18:25:49 UTC
This can be handled in a multitude of ways per our phone call.  Take your pick.

Comment 2 James Slagle 2012-05-08 19:27:32 UTC
We should make this step part of what happens when rh-rhua-config gets installed on the rhua.

This bug will also require documentation changes.

Comment 3 wes hayutin 2012-05-21 18:52:23 UTC
cloude commit 4091449016baf15696fa7d2013ed5653963acfac

whoops.. need to update the messaging section too..
[messaging]
url:        tcp://localhost:5672

Comment 4 wes hayutin 2012-05-21 19:50:26 UTC
AFAICT the messaging section is already handled and configured correctly

# Messaging options.
#
# url:        the broker url.
# cacert:     path to PEM encoded CA certificate file
# clientcert: path to PEM encoded file containing both
#             the private key and certificate.
#
# The url has form: <transport>://<host>:<port> where
# transport can be (tcp|ssl).  When ssl is specified,
# cacert and clientcert must be specified.

[messaging]
url:        ssl://ip-10-46-135-129.ec2.internal:5674
cacert:     /etc/pki/rhua/qpid-ca.crt
clientcert: /etc/pki/rhua/qpid-client.crt

Comment 5 wes hayutin 2012-05-21 19:55:27 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:
For Docs... I believe the following two sections from the docs can now be removed..
http://docs.redhat.com/docs/en-US/Red_Hat_Update_Infrastructure/2.0/html-single/Installation_Guide/index.html#part-Installation_Guide-Installation

2.3. Package Installation
Procedure 2.2. Installing the Red Hat Update Infrastructure packages

On the RHUA server, edit the /etc/pulp/pulp.conf configuration file using your preferred text editor to include the correct hostname of the RHUA server. The hostname will be listed as localhost by default:
[server]
server_name: localhost
...
...
[messaging]
url:        tcp://localhost:5672
Also on the RHUA server, edit the /etc/pulp/client.conf configuration file using your preferred text editor to include the correct hostname of the RHUA server. The hostname will be listed as localhost by default:
[server]
host = localhost.localdomain
...
...
[cds]
baseurl = https://localhost/pulp/repos
keyurl = http://localhost/pulp/gpg
ksurl = http://localhost/pulp/ks
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:
[rhua]
hostname: rhua.example.com

Comment 6 wes hayutin 2012-05-24 20:30:29 UTC
OK.. I see my patch is crap.. and not the way to do this...

The better approach is to update
/cloude/rhui-2.0/tools/src/rhui/rpm/rhua.py

and add a line to configure rhui-tools.conf 
python /usr/bin/rhui_configurator.py /etc/rhui/rhui-tools.conf !PULP_CONFIGURATOR!

Comment 7 wes hayutin 2012-05-24 21:05:56 UTC
Created attachment 586707 [details]
one shot at a better patch

James, can you please review this. I'm not entirely certain what I'm attempting here is the right thing to do.  It also does not address consumer.conf

Let me know what you think.

Comment 8 James Slagle 2012-06-12 12:28:13 UTC
The patch looks good, please commit.

Comment 9 James Slagle 2012-06-12 12:50:55 UTC
Need to make sure that rhua.hostname is also updated in rhui-tools.conf

Comment 10 wes hayutin 2012-06-18 13:56:54 UTC
cloude commit a601126df74223f547263252ce739a0a783456f5

Comment 11 mkovacik 2012-07-30 17:49:07 UTC
Created attachment 601321 [details]
Verifying screen log

Verified that having changing [rhua] section hostname attribute  of the answers file (including a version increase), rhui-installer produces a config rpm applying of which in turn updates the appropriate config file rhua hostnames.
Please note the files /etc/pulp/cds.conf and /etc/pulp/consumer/consumer.conf were modified mistakenly by me during the installation.

Comment 12 Athene Chan 2012-08-14 06:58:52 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,25 +1 @@
-For Docs... I believe the following two sections from the docs can now be removed..
+Previously, all configuration files requiring the fully qualified domain name (fqdn) of the Red Hat Update Agent (RHUA)had to be manually configured. The updated version of the rhui-installer produces a config rpm which updates the appropriate configuration files with the RHUA hostname.-http://docs.redhat.com/docs/en-US/Red_Hat_Update_Infrastructure/2.0/html-single/Installation_Guide/index.html#part-Installation_Guide-Installation
-
-2.3. Package Installation
-Procedure 2.2. Installing the Red Hat Update Infrastructure packages
-
-On the RHUA server, edit the /etc/pulp/pulp.conf configuration file using your preferred text editor to include the correct hostname of the RHUA server. The hostname will be listed as localhost by default:
-[server]
-server_name: localhost
-...
-...
-[messaging]
-url:        tcp://localhost:5672
-Also on the RHUA server, edit the /etc/pulp/client.conf configuration file using your preferred text editor to include the correct hostname of the RHUA server. The hostname will be listed as localhost by default:
-[server]
-host = localhost.localdomain
-...
-...
-[cds]
-baseurl = https://localhost/pulp/repos
-keyurl = http://localhost/pulp/gpg
-ksurl = http://localhost/pulp/ks
-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:
-[rhua]
-hostname: rhua.example.com

Comment 14 errata-xmlrpc 2012-08-24 11:53:43 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.