Bug 1494575 - RHEL7.* isn't subscribed to EUS channel with option --use-eus-channel
Summary: RHEL7.* isn't subscribed to EUS channel with option --use-eus-channel
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Martin Korbel
URL:
Whiteboard:
Depends On:
Blocks: sat58-errata
TreeView+ depends on / blocked
 
Reported: 2017-09-22 14:26 UTC by Pavel Studeník
Modified: 2017-12-13 07:59 UTC (History)
2 users (show)

Fixed In Version: spacewalk-backend-2.5.3-155-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-13 07:59:26 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:3445 0 normal SHIPPED_LIVE Red Hat Satellite 5.8.0 bug fix update 2017-12-12 19:00:37 UTC

Description Pavel Studeník 2017-09-22 14:26:02 UTC
Description of problem:
I try to register RHEL7.0 to EUS channel as default by command rhnreg_ks  --use-eus-channel. I have synced channels 7.1-7.4. But the system is subscribed to rhel-x86_64-server-7. The RHEL6 works correct. The problem exists only for RHEL7.

I investigate more about this issue and problem is comparison of version. 

RHEL6 

server/rhnChannel.base_eus_channel_for_ver_rel_arch('6.5.0', '6.7.0')
server/rhnChannel.base_eus_channel_for_ver_rel_arch('6.5.0', '6.5.0')

RHEL7
server/rhnChannel.base_eus_channel_for_ver_rel_arch('7.1-1.el7_1', '7.2-9.el7', '7Server')
server/rhnChannel.base_eus_channel_for_ver_rel_arch('7.1-1.el7_1', '7.3-1.el7', '7Server')
server/rhnChannel.base_eus_channel_for_ver_rel_arch('7.1-1.el7_1', '7.1-1.el7', '7Server')
server/rhnChannel.base_eus_channel_for_ver_rel_arch('7.1-1.el7_1', '7.4-1.el7', '7Server')


The function rpm.labelCompare doesn't compare correct version of package. For example 7.1-1.el7_1' and '7.1-1.el7' it is not same version.


Version-Release number of selected component (if applicable):
spacewalk-backend-server-2.5.3-152.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. synced eus channels 7.*
2. create new system 7.1 
3. rhnreg_ks .. --use-eus-channel

Actual results:
system is subscribed to base RHEL7 (not EUS channel) - rhel-x86_64-server-7

Expected results:
system is subscribed to EUS channel - rhel-x86_64-server-7.1.eus

Comment 1 Tomáš Kašpárek 2017-09-25 08:46:38 UTC
Weird I've just registered 7.1 server to rhel-x86_64-server-7.1.eus on two different Satellites.

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.1 (Maipo)

Comment 2 Tomáš Kašpárek 2017-09-27 12:29:57 UTC
spacewalk.git(master): 79b0ed8e2faaf2fa054ebf6263eb12afa662441c
spacewalk.git(master): db8eeb94687cb95a95a9e662bf9b330a363c53e0

Comment 3 Pavel Studeník 2017-09-29 10:16:09 UTC
I created pull request that subscribes nearby version of channel.

https://github.com/spacewalkproject/spacewalk/pull/579

For example:
System with release: redhat-release-server-7.0-1.el7.x86_64

Available channels:
rhel-x86_64-server-7.1.eus
rhel-x86_64-server-7.2.eus
rhel-x86_64-server-7.3.eus
rhel-x86_64-server-7.4.eus

The system will be registered to "rhel-x86_64-server-7.1.eus".

Comment 6 Tomáš Kašpárek 2017-11-01 10:09:15 UTC
spacewalk.git(master): 54cc74cf682f02b9b5e76a8383bbbf11ad55d4cd

Comment 8 Martin Korbel 2017-11-10 14:47:56 UTC
FAILQA on spacewalk-backend-2.5.3-156 and rhn-check-2.0.2-17 (client side)

Reproducer:
1. We have got Sat5.8 with EUS channels
> spacewalk-remove-channel -l
rhel-x86_64-server-7
	rhn-tools-rhel-x86_64-server-7
rhel-x86_64-server-7.1.eus
rhel-x86_64-server-7.2.eus
rhel-x86_64-server-7.3.eus
rhel-x86_64-server-7.4.eus


2. We have a client machine with RHEL7.1
> rpm -q  redhat-release-server
redhat-release-server-7.1-1.el7.x86_64

3. Register client to server with parameter --use-eus-channel
> rhnreg_ks --user aaaa --password xxx --use-eus-channel --force

4. Check the base channel of client
> yum repolist

Actual results:
...
rhel-x86_64-server-7
...

Expected results:
...
rhel-x86_64-server-7.1.eus
...



BTW:  The option "use-eus-channel" is not mentioned in man page.
> man rhnreg_ks | grep -c use-eus-channel
0

Comment 9 Tomáš Kašpárek 2017-11-14 09:55:04 UTC
spacewalk.git(master): cc907aab14259836f0c4ea33ad2229235620a9d6

Comment 11 Martin Korbel 2017-11-14 14:53:13 UTC
VERIFIED on spacewalk-backend-2.5.3-157

created a new bug about documentation bz1512988

reproducer via comment 8

result
...
rhel-x86_64-server-7.1.eus
...

Comment 14 errata-xmlrpc 2017-12-13 07:59:26 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-2017:3445


Note You need to log in before you can comment on or make changes to this bug.