Bug 1053130

Summary: oo-diagnostics does no differentiate between nodes and brokers when checking rpms
Product: OpenShift Container Platform Reporter: Timothy Williams <tiwillia>
Component: NodeAssignee: Luke Meyer <lmeyer>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 2.0.0CC: bleanhar, charles_sheridan, libra-onpremise-devel, xjia
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: OSE 2.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1053127 Environment:
Last Closed: 2014-07-08 18:12:59 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:
Bug Depends On: 1053127    
Bug Blocks:    

Description Timothy Williams 2014-01-14 17:48:14 UTC
+++ This bug was initially created as a clone of Bug #1053127 +++

Description of problem:
The oo-diagnostics script does not differentiate between nodes and brokers when checking enterprise rpms. This can cause issues to be reported that are not actually issues. 

For instance, facter is not usually installed on the broker, but in many cases will be due to it being a dependency for puppet. When facter is installed on the broker, the oo-diagnostics script will complain about the version because it is not the 'el6op' package. It should not be complaining about this at all because it has no reason to check the broker for the facter package. 

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

How reproducible:
Always

Steps to Reproduce:
1. Install puppet on a broker, which requires a thrid-party facter package
2. Run oo-diagnostics

Actual results:
FAIL: test_enterprise_rpms
      The following problems were found with your RPMs:
        facter should be an OpenShift Enterprise RPM but installed version 1.7.4-1.el6 does not have 'el6op' in it
      Please ensure that you have not enabled EPEL or other third-party repositories, and
      do not have any of these RPMs pre-installed in your install image. These RPMs must come
      from your OpenShift Enterprise subscription in order to be supported.

Expected results:
No errors

Comment 2 Luke Meyer 2014-01-14 18:32:21 UTC
Thanks for pointing this out. The list of RPMs in this test should be updated. The point is to check that any RPMs that *should* come from OSE, do come from OSE. I'm fairly sure we're actually no longer using "facter" at all (instead using the SCL-ized one), although it may be pulled in by stray dependencies. You might technically be unsupported if you do have a package from EPEL or puppetlabs on your host, but as long as it is not a replacement for a supported OSE package, this check should not complain.

Comment 3 Luke Meyer 2014-06-06 17:30:25 UTC
I believe as of OSE 2.1 we finally got rid of whatever was requiring the non-SCL "facter" and updated the list of RPMs. It should be possible to install puppet without RPM conflicts or errors from oo-diagnostics. Please confirm... and we'll close CURRENTRELEASE if so.

Comment 4 xjia 2014-06-10 11:39:57 UTC
Verify: No error and conflicts from oo-diagnostics.
Version:
2.1.z/2014-05-29.3

Step:

(1)For broker:
[root@broker ~]# yum info puppet
Loaded plugins: priorities, product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is not registered with RHN Classic or RHN Satellite.
You can use rhn_register to register.
RHN Satellite or RHN Classic support will be disabled.
71 packages excluded due to repository priority protections
Installed Packages
Name        : puppet
Arch        : noarch
Version     : 2.7.25
Release     : 2.el6
Size        : 3.2 M
Repo        : installed
From repo   : epel
Summary     : A network tool for managing many disparate systems
URL         : http://puppetlabs.com
License     : ASL 2.0
Description : Puppet lets you centrally manage every important aspect of your system using a
            : cross-platform specification language that manages all the separate elements
            : normally aggregated in different files, like users, cron jobs, and hosts,
            : along with obviously discrete elements like packages, services, and files.

[root@broker ~]# yum info facter
Loaded plugins: priorities, product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is not registered with RHN Classic or RHN Satellite.
You can use rhn_register to register.
RHN Satellite or RHN Classic support will be disabled.
71 packages excluded due to repository priority protections
Installed Packages
Name        : facter
Arch        : x86_64
Version     : 1.6.18
Release     : 3.el6
Size        : 146 k
Repo        : installed
From repo   : epel
Summary     : Command and ruby library for gathering system information
URL         : http://www.puppetlabs.com/puppet/related-projects/facter/
License     : ASL 2.0
Description : Facter is a lightweight program that gathers basic node information about the
            : hardware and operating system. Facter is especially useful for retrieving
            : things like operating system names, hardware characteristics, IP addresses, MAC
            : addresses, and SSH keys.
            : 
            : Facter is extensible and allows gathering of node information that may be
            : custom or site specific. It is easy to extend by including your own custom
            : facts. Facter can also be used to create conditional expressions in Puppet that
            : key off the values returned by facts.

[root@broker ~]# oo-diagnostics -v test_enterprise_rpms
INFO: loading list of installed packages
INFO: OpenShift broker installed.
INFO: Loading the broker rails environment.
INFO: running: test_enterprise_rpms
INFO: Checking that all OpenShift RPMs are actually from OpenShift Enterprise
NO ERRORS


(2) For node:
[root@node1 ~]# yum install puppet
Loaded plugins: priorities, product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is not registered with RHN Classic or RHN Satellite.
You can use rhn_register to register.
RHN Satellite or RHN Classic support will be disabled.
epel/metalink                                                                                                                                  |  12 kB     00:00     
epel                                                                                                                                           | 4.4 kB     00:00     
epel/primary_db                                                                                                                                | 6.2 MB     00:01     
223 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package puppet.noarch 0:2.7.25-2.el6 will be installed
--> Processing Dependency: facter < 1:2.0 for package: puppet-2.7.25-2.el6.noarch
--> Processing Dependency: facter >= 1.5 for package: puppet-2.7.25-2.el6.noarch
--> Processing Dependency: ruby-shadow for package: puppet-2.7.25-2.el6.noarch
--> Processing Dependency: ruby-augeas for package: puppet-2.7.25-2.el6.noarch
--> Processing Dependency: ruby(selinux) for package: puppet-2.7.25-2.el6.noarch
--> Running transaction check
---> Package facter.x86_64 0:1.6.6-1.el6op will be installed
---> Package libselinux-ruby.x86_64 0:2.0.94-5.3.el6_4.1 will be installed
---> Package ruby-augeas.x86_64 0:0.4.1-1.el6 will be installed
--> Processing Dependency: augeas-libs >= 0.8.0 for package: ruby-augeas-0.4.1-1.el6.x86_64
--> Processing Dependency: libaugeas.so.0(AUGEAS_0.8.0)(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
--> Processing Dependency: libaugeas.so.0(AUGEAS_0.12.0)(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
--> Processing Dependency: libaugeas.so.0(AUGEAS_0.11.0)(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
--> Processing Dependency: libaugeas.so.0(AUGEAS_0.10.0)(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
--> Processing Dependency: libaugeas.so.0(AUGEAS_0.1.0)(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
--> Processing Dependency: libaugeas.so.0()(64bit) for package: ruby-augeas-0.4.1-1.el6.x86_64
---> Package ruby-shadow.x86_64 0:1.4.1-13.el6 will be installed
--> Running transaction check
---> Package augeas-libs.x86_64 0:1.0.0-5.el6_5.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================
 Package                                 Arch                           Version                                      Repository                                  Size
======================================================================================================================================================================
Installing:
 puppet                                  noarch                         2.7.25-2.el6                                 epel                                       1.1 M
Installing for dependencies:
 augeas-libs                             x86_64                         1.0.0-5.el6_5.1                              rhel6                                      309 k
 facter                                  x86_64                         1.6.6-1.el6op                                openshift_node_cdn                          69 k
 libselinux-ruby                         x86_64                         2.0.94-5.3.el6_4.1                           rhel6                                       99 k
 ruby-augeas                             x86_64                         0.4.1-1.el6                                  epel                                        21 k
 ruby-shadow                             x86_64                         1.4.1-13.el6                                 epel                                        11 k

Transaction Summary
======================================================================================================================================================================
Install       6 Package(s)

Total download size: 1.6 M
Installed size: 4.5 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): augeas-libs-1.0.0-5.el6_5.1.x86_64.rpm                                                                                                  | 309 kB     00:00     
(2/6): facter-1.6.6-1.el6op.x86_64.rpm                                                                                                         |  69 kB     00:00     
(3/6): libselinux-ruby-2.0.94-5.3.el6_4.1.x86_64.rpm                                                                                           |  99 kB     00:00     
(4/6): puppet-2.7.25-2.el6.noarch.rpm                                                                                                          | 1.1 MB     00:00     
(5/6): ruby-augeas-0.4.1-1.el6.x86_64.rpm                                                                                                      |  21 kB     00:00     
(6/6): ruby-shadow-1.4.1-13.el6.x86_64.rpm                                                                                                     |  11 kB     00:00     
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                 1.6 MB/s | 1.6 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : augeas-libs-1.0.0-5.el6_5.1.x86_64                                                                                                                 1/6 
  Installing : ruby-augeas-0.4.1-1.el6.x86_64                                                                                                                     2/6 
  Installing : ruby-shadow-1.4.1-13.el6.x86_64                                                                                                                    3/6 
  Installing : facter-1.6.6-1.el6op.x86_64                                                                                                                        4/6 
  Installing : libselinux-ruby-2.0.94-5.3.el6_4.1.x86_64                                                                                                          5/6 
  Installing : puppet-2.7.25-2.el6.noarch                                                                                                                         6/6 
  Verifying  : libselinux-ruby-2.0.94-5.3.el6_4.1.x86_64                                                                                                          1/6 
  Verifying  : ruby-augeas-0.4.1-1.el6.x86_64                                                                                                                     2/6 
  Verifying  : puppet-2.7.25-2.el6.noarch                                                                                                                         3/6 
  Verifying  : facter-1.6.6-1.el6op.x86_64                                                                                                                        4/6 
  Verifying  : ruby-shadow-1.4.1-13.el6.x86_64                                                                                                                    5/6 
  Verifying  : augeas-libs-1.0.0-5.el6_5.1.x86_64                                                                                                                 6/6 

Installed:
  puppet.noarch 0:2.7.25-2.el6                                                                                                                                        

Dependency Installed:
  augeas-libs.x86_64 0:1.0.0-5.el6_5.1      facter.x86_64 0:1.6.6-1.el6op      libselinux-ruby.x86_64 0:2.0.94-5.3.el6_4.1      ruby-augeas.x86_64 0:0.4.1-1.el6     
  ruby-shadow.x86_64 0:1.4.1-13.el6        

Complete!
[root@node1 ~]# oo-diagnostics -v test_enterprise_rpms
INFO: loading list of installed packages
INFO: OpenShift node installed.
INFO: running: test_enterprise_rpms
INFO: Checking that all OpenShift RPMs are actually from OpenShift Enterprise
NO ERRORS
[root@node1 ~]#