Bug 1029325

Summary: rhc installation and configuration should not depend on broker in installation script.
Product: OpenShift Container Platform Reporter: Johnny Liu <jialiu>
Component: NodeAssignee: John W. Lamb <jolamb>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0.0CC: bleanhar, libra-onpremise-devel, lmeyer
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: 2013-12-16 09:11:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Johnny Liu 2013-11-12 07:47:35 UTC
Description of problem:


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


How reproducible:
Always

Steps to Reproduce:
1. Following https://access.redhat.com/site/articles/492873
2. Disable all useless repo include rhc client repo, only keep the following repos:
# yum repolist
Loaded plugins: priorities, product-id, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
rhel-6-server-beta-rpms
rhel-6-server-ose-2-beta-infra-rpms
rhel-6-server-rpms
rhel-server-rhscl-6-rpms
3. Run oo-admin-check-sources.py on broker vm to make sure all repo is configured successfully.
# ./oo-admin-check-sources.py -c beta2.ini -p -r broker
4. Run oo-install to install broker.

Actual results:
Broker failed to installed.
The following lines in openshift.sh is blocking the installation.
broker && install_rhc_pkg
broker && configure_rhc

Expected results:
Installation for broker should be finished successfully without client repo enabled.

Additional info:

Comment 2 Brenton Leanhardt 2013-11-12 19:01:03 UTC
This is a great catch.  I actually think we should modify oo-admin-check-sources to have the rhc client channel added whenever the broker role is selected.

This is because oo-install is focussed on helping admins stand up a demo environment and part of that demo is having a working rhc _somewhere_.  We also have cases today where users are expecting this.

Comment 3 Johnny Liu 2013-11-13 10:16:18 UTC
Hmmm, I could foresee another issue.
In openshift.sh jbosseap cartridge will be installed by default. That means when user run "./oo-admin-check-sources.py -c beta2.ini -p -r node" to make sure the repos is configured well, take note that this node does not have node_jbosseap role, and no jbosseap cartridge repo is configured, then installation will fail.

Comment 4 Brenton Leanhardt 2013-11-13 13:46:58 UTC
Good point.  We need to make sure CONF_NO_JBOSSEAP is set when oo-install runs openshift.sh if the user doesn't have the EAP add-on.

Comment 5 Luke Meyer 2013-11-13 18:21:37 UTC
Keep in mind that oo-install is currently mostly oriented toward trial installs. Trial subscriptions AFAIK always include the JBoss EAP add-on.

Also, it isn't really my expectation that people will set up the host with check-sources and then run oo-install. If you were going to go to that much trouble, you would probably just run openshift.sh directly. If you're going to run oo-install, do the whole thing using it (mind you, there's just no way to run an oo-install with jbosseap yet). I may be wrong...

It is on the proposed feature list to be able to select cartridges with oo-install. That may be the best way to address not having jbosseap available, or we may want to provide a one-off option for enterprise to set CONF_NO_JBOSSEAP.

Comment 6 Luke Meyer 2013-11-13 18:38:19 UTC
I meant "here's just no way to run an oo-install WITHOUT jbosseap yet"

Comment 7 Brenton Leanhardt 2013-11-13 18:47:59 UTC
agreed.  I think this bug and #1030027 just need to work for the Eval which, as you say, has access to everything so we should just go ahead and install it for trial purposes.

Comment 9 John W. Lamb 2013-11-15 20:31:46 UTC
Addressed in https://github.com/openshift/openshift-extras/pull/184

The client content set is now part of the broker subscription in prod. oo-admin-yum-validator has been updated so that --role=broker should now implicitly set --role=client (with a brief note stating such.)

Comment 10 Johnny Liu 2013-11-18 08:09:21 UTC
Verified this bug with openshift-openshift-extras-ed3e560, and PASS.

For RHN:
# ./oo-admin-yum-validator -c beta2.ini -r broker --oo-version=2.0 -p
Please note: --role=broker implicitly enables --role=client to ensure /usr/bin/rhc is available for testing and troubleshooting.
Detected OpenShift Enterprise repository subscription managed by RHN Classic or RHN Satellite.

The required OpenShift Enterprise repositories are missing:
    rhel-x86_64-server-6-rhscl-1
    rhel-x86_64-server-6-ose-2-rhc-beta
    rhel-x86_64-server-6-ose-2-infrastructure-beta
Please verify that an OpenShift Enterprise subscription is attached to this system using either RHN Classic or Red Hat Subscription Manager by following the instructions here: https://access.redhat.com/site/articles/522923
Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
Please re-run this tool after making any recommended repairs to this system


# ./oo-admin-yum-validator -c beta2.ini -r broker -r client --oo-version=2.0 -p
Detected OpenShift Enterprise repository subscription managed by RHN Classic or RHN Satellite.

The required OpenShift Enterprise repositories are missing:
    rhel-x86_64-server-6-rhscl-1
    rhel-x86_64-server-6-ose-2-rhc-beta
    rhel-x86_64-server-6-ose-2-infrastructure-beta
Please verify that an OpenShift Enterprise subscription is attached to this system using either RHN Classic or Red Hat Subscription Manager by following the instructions here: https://access.redhat.com/site/articles/522923
Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
Please re-run this tool after making any recommended repairs to this system

# rhn-channel -c rhel-x86_64-server-6-rhscl-1 -c rhel-x86_64-server-6-ose-2-rhc-beta -c rhel-x86_64-server-6-ose-2-infrastructure-beta -u <user> -p <password> -a

# ./oo-admin-yum-validator -c beta2.ini -r broker -r client --oo-version=2.0 -a
Detected OpenShift Enterprise repository subscription managed by RHN Classic or RHN Satellite.

Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
Resolving repository/channel/subscription priority conflicts
Setting priority for repository rhel-x86_64-server-6-rhscl-1 to 10
Setting priority for repository rhel-x86_64-server-6-ose-2-infrastructure-beta to 10
Setting priority for repository rhel-x86_64-server-6-ose-2-rhc-beta to 10

# ./oo-admin-yum-validator -c beta2.ini -r broker -r client --oo-version=2.0 -p
Detected OpenShift Enterprise repository subscription managed by RHN Classic or RHN Satellite.

Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
No problems could be detected!

# yum repolist
Loaded plugins: priorities, product-id, rhnplugin, security, subscription-manager
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
This system is receiving updates from RHN Classic or RHN Satellite.
4 packages excluded due to repository priority protections
repo id                                                                         repo name                                                                                       status
rhel-x86_64-server-6                                                            Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)                                        11,063+58
rhel-x86_64-server-6-beta                                                       Red Hat Enterprise Linux Server Beta (v. 6 for 64-bit x86_64)                                       787+6
rhel-x86_64-server-6-ose-2-infrastructure-beta                                  Red Hat OpenShift Enterprise 2 Infrastructure Beta - x86_64                                           113
rhel-x86_64-server-6-ose-2-rhc-beta                                             Red Hat OpenShift Enterprise 2 Client Tools Beta - x86_64                                              14
rhel-x86_64-server-6-rhscl-1                                                    Red Hat Software Collections 1 (RHEL 6 Server x86_64)                                                 454


For RHSM:
After register rhsm, then disable all available repo.
# ./oo-admin-yum-validator -c beta2.ini -r broker --oo-version=2.0 -p
Please note: --role=broker implicitly enables --role=client to ensure /usr/bin/rhc is available for testing and troubleshooting.
Detected OpenShift Enterprise repository subscription managed by Red Hat Subscription Manager.

The required OpenShift Enterprise repositories are disabled:
    rhel-server-rhscl-6-rpms
    rhel-6-server-rpms
    rhel-6-server-ose-2-beta-infra-rpms
    rhel-6-server-ose-2-beta-rhc-rpms
    rhel-6-server-beta-rpms
Enable these repositories by running these commands:
# subscription-manager repos --enable=rhel-server-rhscl-6-rpms
# subscription-manager repos --enable=rhel-6-server-rpms
# subscription-manager repos --enable=rhel-6-server-ose-2-beta-infra-rpms
# subscription-manager repos --enable=rhel-6-server-ose-2-beta-rhc-rpms
# subscription-manager repos --enable=rhel-6-server-beta-rpms
Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
The following repositories need package exclusions set:
    rhel-6-server-beta-rpms
    rhel-6-server-rpms
Make the following modifications to /etc/yum.repos.d/redhat.repo
Add the following to the [rhel-6-server-beta-rpms] section:
    exclude=tomcat6*
Add the following to the [rhel-6-server-rpms] section:
    exclude=tomcat6*
Please re-run this tool after making any recommended repairs to this system

# ./oo-admin-yum-validator -c beta2.ini -r broker -r client --oo-version=2.0 -p
Detected OpenShift Enterprise repository subscription managed by Red Hat Subscription Manager.

The required OpenShift Enterprise repositories are disabled:
    rhel-server-rhscl-6-rpms
    rhel-6-server-rpms
    rhel-6-server-ose-2-beta-infra-rpms
    rhel-6-server-ose-2-beta-rhc-rpms
    rhel-6-server-beta-rpms
Enable these repositories by running these commands:
# subscription-manager repos --enable=rhel-server-rhscl-6-rpms
# subscription-manager repos --enable=rhel-6-server-rpms
# subscription-manager repos --enable=rhel-6-server-ose-2-beta-infra-rpms
# subscription-manager repos --enable=rhel-6-server-ose-2-beta-rhc-rpms
# subscription-manager repos --enable=rhel-6-server-beta-rpms
Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
The following repositories need package exclusions set:
    rhel-6-server-beta-rpms
    rhel-6-server-rpms
Make the following modifications to /etc/yum.repos.d/redhat.repo
Add the following to the [rhel-6-server-beta-rpms] section:
    exclude=tomcat6*
Add the following to the [rhel-6-server-rpms] section:
    exclude=tomcat6*
Please re-run this tool after making any recommended repairs to this system


# ./oo-admin-yum-validator -c beta2.ini -r broker -r client --oo-version=2.0 -a
Detected OpenShift Enterprise repository subscription managed by Red Hat Subscription Manager.

Enabled repository rhel-server-rhscl-6-rpms
Enabled repository rhel-6-server-rpms
Enabled repository rhel-6-server-ose-2-beta-infra-rpms
Enabled repository rhel-6-server-ose-2-beta-rhc-rpms
Enabled repository rhel-6-server-beta-rpms
Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
Resolving repository/channel/subscription priority conflicts
Setting priority for repository rhel-server-rhscl-6-rpms to 10
Setting priority for repository rhel-6-server-ose-2-beta-infra-rpms to 10
Setting priority for repository rhel-6-server-ose-2-beta-rhc-rpms to 10
Setting priority for repository rhel-6-server-rpms to 20
Setting priority for repository rhel-6-server-beta-rpms to 20
Setting package exclusions for the following repositories:
    rhel-6-server-beta-rpms: tomcat6*
    rhel-6-server-rpms: tomcat6*


# ./oo-admin-yum-validator -c beta2.ini -r broker -r client --oo-version=2.0 -p
Detected OpenShift Enterprise repository subscription managed by Red Hat Subscription Manager.

Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
No problems could be detected!