Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 622528

Summary: rhelVersion procedure is not working on RHEL6 since Beta2
Product: Red Hat Enterprise Linux 6 Reporter: David Kutálek <dkutalek>
Component: sosAssignee: Bryn M. Reeves <bmr>
Status: CLOSED ERRATA QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: agk, bmr, gavin, prc, tcapek
Target Milestone: rcKeywords: RHELNAK
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sos-2.2-3.el6 Doc Type: Bug Fix
Doc Text:
Previously, the rhelVersion() function incorrectly identified the major release version in Red Hat Enterprise Linux 6. This impacted two non-default sos plug-ins (general and cluster) and sometimes caused that incomplete information was retrieved from the system when these plug-ins were enabled. This bug has been fixed and the rhelVersion() now always returns correct value of the Red Hat Enterprise Linux version.
Story Points: ---
Clone Of:
: 653522 710567 916705 (view as bug list) Environment:
Last Closed: 2011-05-19 14:27:35 UTC Type: ---
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:    
Bug Blocks: 653522, 916705    

Description David Kutálek 2010-08-09 15:56:50 UTC
Description of problem:

There is a procedure called 'rhelVersion' in /usr/lib/python2.6/site-packages/sos/policyredhat.py. This procedure is not returning correct value on RHEL6 since Beta2. It should return 6, but returns False. 

It is because it uses 'redhat-release' package for getting RHEL version. But this package has been obsoleted as a full package and is only virtually provided now by other packages, eg redhat-release-workstation or redhat-release-server.

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

sos-2.2-2.el6

How reproducible:

Always. Be sure to remove obsoleted package redhat-release or do a fresh post-Beta2 install.

Steps to Reproduce:
1. Be sure redhat-release is not installed (only provided by something else)
2. run python, import sos.policyredhat
3. create a policy and ask for version
  
Actual results:

False

Expected results:

6

Additional info:

This function is used by 5 sos plugins. Two of them are (IMHO!) affected by means of loss/incomplete/wrong functionality on RHEL6:

general.py:
 - all_logs option does not work (is off by default)

cluster:
 - diagnostics is not complete - checks for services are not executed
   (fenced,corosync,dlm_controld,gfs_controld)
 - cluster plugin is enabled even though required packages are missing
   (ricci,corosync,openais,cman,clusterlib,fence-agents)

Other plugins which are using rhelVersion but are not IMHO affected are:
 - s390
 - sanitize
 - yum

Comment 2 RHEL Program Management 2010-08-09 16:08:04 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 5 RHEL Program Management 2010-08-18 21:33:35 UTC
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Red Hat Enterprise Linux. Unfortunately, we
are unable to address this request in the current release. Because we
are in the final stage of Red Hat Enterprise Linux 6 development, only
significant, release-blocking issues involving serious regressions and
data corruption can be considered.

If you believe this issue meets the release blocking criteria as
defined and communicated to you by your Red Hat Support representative,
please ask your representative to file this issue as a blocker for the
current release. Otherwise, ask that it be evaluated for inclusion in
the next minor release of Red Hat Enterprise Linux.

Comment 11 Pierre Carrier 2010-11-23 10:20:20 UTC
Fixed upstream.
https://fedorahosted.org/sos/changeset/1007

Comment 12 David Kutálek 2010-11-24 05:51:36 UTC
(In reply to comment #11)
> Fixed upstream.
> https://fedorahosted.org/sos/changeset/1007

Pierre,

how is this patch supposed to fix this bug?
I don't see how it solves the problem with rhelVersion returning False for RHEL6 (see above).

David

Comment 13 Pierre Carrier 2010-11-24 12:29:01 UTC
Sorry David, wrong commit. https://fedorahosted.org/sos/changeset/996

Comment 17 Tomas Capek 2011-05-18 14:52:07 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,6 +1 @@
-A change in the package that the sos tool uses to determine the installed version of Red Hat Enterprise Linux will cause the tool to incorrectly identify the major release version. This adversely impacts a small number of non-default sos plugins and may cause incomplete information to be captured from the system when these plugins are enabled. The affected plugins are:
+Previously, the rhelVersion() function incorrectly identified the major release version in Red Hat Enterprise Linux 6. This impacted two non-default sos plug-ins (general and cluster) and sometimes caused that incomplete information was retrieved from the system when these plug-ins were enabled. This bug has been fixed and the rhelVersion() now always returns correct value of the Red Hat Enterprise Linux version.-
-general (only when using the non-default all_logs option)
-cluster (diagnostics may not be run)
-
-Users affected by this problem should retrieve any missing data manually from systems.

Comment 18 errata-xmlrpc 2011-05-19 14:27:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0773.html