Bug 1509921

Summary: sapconf does not identify E4S SAP channel as a SAP channel
Product: Red Hat Enterprise Linux 7 Reporter: Ondrej Faměra <ofamera>
Component: sapconfAssignee: Than Ngo <than>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: mjuricek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sapconf-0.98-15.el7 Doc Type: Bug Fix
Doc Text:
Cause: the current sapconf does not check the E4S SAP channel Consequence: it does not identify E4S SAP channel as a SAP channel Fix: the new sapconf now has a check for the E4S SAP channel Result: it identifies E4S SAP channel as a SAP channel correctly
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 11:37:16 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:    
Bug Blocks: 1522983    

Description Ondrej Faměra 2017-11-06 10:52:20 UTC
=== Description of problem:
'sapconf' doesn't recognize the 'e4s' repositories and reports that SAP repositories are missing.

=== Version-Release number of selected component (if applicable):
sapconf.noarch-0.98-11.el7

=== How reproducible:
Always

=== Steps to Reproduce:
1. Minimal installation of RHEL 7.4
2. Subscribe to E4S (SAP Solutions) repositories only
# subscription-manager repos --disable='*' --enable="rhel-7-server-e4s-rpms" --enable="rhel-sap-for-rhel-7-server-e4s-rpms"
3. Install 'sapconf' package - yum install sapconf
4. Run the 'sapconf -n' command

=== Actual results:

######        sapconf-0.98-11  by Red Hat       ######
###### Checking System for SAP Installation    ######

RHEL system not subscribed to RHEL for SAP channel ... WARNING

=== Expected results:
######        sapconf-0.98-11  by Red Hat       ######
###### Checking System for SAP Installation    ######

RHEL system subscribed to RHEL for SAP channel ... OK
...

RHEL E4S repository is recognized correctly

=== Additional info:
This change should be backported to all supported EUS releases - 7.2, 7.3, 7.4
Simple way to add the 'e4s' repositories can be achieved by changing the line below in 'sapconf'

Line 706
- if yum repolist | egrep -q "rhel-$(uname -m)-server-sap|rhel-sap-for-rhel-$(awk '{print $7}' /etc/redhat-release | cut -c      -1)-server-rpms"; then
+ if yum repolist | egrep -q "rhel-$(uname -m)-server-sap|rhel-sap-for-rhel-$(awk '{print $7}' /etc/redhat-release | cut -c      -1)-server(-e4s)?-rpms"; then

I can see that there is similar bz1470563 for the EUS channel detection. If that one should be also included then the following line can be used to detect both EUS and E4S repositories.
+ if yum repolist | egrep -q "rhel-$(uname -m)-server-sap|rhel-sap-for-rhel-$(awk '{print $7}' /etc/redhat-release | cut -c      -1)-server(-e4s|-eus)?-rpms"; then

Comment 3 Than Ngo 2017-11-06 13:22:26 UTC
it's fixed in sapconf-0.98-15.el7

Comment 8 errata-xmlrpc 2018-04-10 11:37:16 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.

https://access.redhat.com/errata/RHBA-2018:0721