Bug 1275738 - [Satellite 6] Physical hosts does not honours the release version defined in the activation key.
[Satellite 6] Physical hosts does not honours the release version defined in ...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Candlepin (Show other bugs)
6.1.0
x86_64 Linux
urgent Severity urgent with 2 votes (vote)
: GA
: --
Assigned To: satellite6-bugs
Lukas Pramuk
: PrioBumpGSS, PrioBumpPM, Regression, Triaged
Depends On: 1504105
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-27 11:39 EDT by Dan Lavu
Modified: 2018-05-16 18:09 EDT (History)
30 users (show)

See Also:
Fixed In Version: john.thiesfeld@shell.com
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1504105 (view as bug list)
Environment:
Last Closed: 2018-02-21 11:54:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
channel_not_working_during_provisioning (188.92 KB, image/jpeg)
2015-10-27 11:39 EDT, Dan Lavu
no flags Details
rhsm-debug content: A working and a problematic system, under the same SATserver and AK. (220.00 KB, application/x-tar)
2017-10-04 10:16 EDT, Rodrigo A B Freire
no flags Details
Candlepin log (90.46 KB, application/x-gzip)
2017-10-04 14:05 EDT, Rodrigo A B Freire
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Github candlepin/candlepin/pull/1819 None None None 2017-12-05 12:58 EST
Red Hat Knowledge Base (Solution) 3178281 None None None 2017-10-18 09:04 EDT

  None (edit)
Description Dan Lavu 2015-10-27 11:39:15 EDT
Created attachment 1086907 [details]
channel_not_working_during_provisioning

Description of problem:
When provisioning a host with the release version selected in the activation key, the subscription channel is not available when provisioning. 


Version-Release number of selected component (if applicable):
rubygem-hammer_cli_katello-0.0.7.18-1.el7sat.noarch
katello-debug-2.2.0.16-1.el7sat.noarch
katello-service-2.2.0.16-1.el7sat.noarch
katello-installer-2.3.20-1.el7sat.noarch
ruby193-rubygem-katello-2.2.0.73-1.el7sat.noarch
katello-default-ca-1.0-1.noarch
katello-installer-base-2.3.20-1.el7sat.noarch
katello-2.2.0.16-1.el7sat.noarch
katello-certs-tools-2.2.1-1.el7sat.noarch
katello-common-2.2.0.16-1.el7sat.noarch
pulp-katello-0.5-1.el7sat.noarch
katello-server-ca-1.0-1.noarch
python-pulp-puppet-common-2.6.0.16-1.el7sat.noarch
pulp-nodes-common-2.6.0.16-1.el7sat.noarch
pulp-puppet-plugins-2.6.0.16-1.el7sat.noarch
pulp-puppet-tools-2.6.0.16-1.el7sat.noarch
rubygem-smart_proxy_pulp-1.0.1.2-1.el7sat.noarch
python-pulp-common-2.6.0.16-1.el7sat.noarch
pulp-docker-plugins-0.2.5-1.el7sat.noarch
pulp-selinux-2.6.0.16-1.el7sat.noarch
python-kombu-3.0.24-10.pulp.el7sat.noarch
python-isodate-0.5.0-4.pulp.el7sat.noarch
python-pulp-rpm-common-2.6.0.16-1.el7sat.noarch
python-pulp-bindings-2.6.0.16-1.el7sat.noarch
pulp-nodes-parent-2.6.0.16-1.el7sat.noarch
pulp-rpm-plugins-2.6.0.16-1.el7sat.noarch
python-pulp-docker-common-0.2.5-1.el7sat.noarch
pulp-server-2.6.0.16-1.el7sat.noarch
pulp-katello-0.5-1.el7sat.noarch


How reproducible:
Always


Steps to Reproduce:
1. Synchronize RHEL 7.1 repositories only
2. Add 7.1 to activation keys and content view

CONTENT VIEW LIST
----------------|-----------------------------------------|-----------------------------------------|-----------|-----------------------------------------------------------------
CONTENT VIEW ID | NAME                                    | LABEL                                   | COMPOSITE | REPOSITORY IDS                                                  
----------------|-----------------------------------------|-----------------------------------------|-----------|-----------------------------------------------------------------
2               | Default Organization View               | 12b3a80d-47d6-4ef4-979a-c5fb13d26e4a    |           |                                                                 
6               | oVirt Hypervisor Platform               | oVirt_Hypervisor_Platform               |           | 34, 36, 39, 38, 30, 1, 19, 20, 18, 13, 9, 32                    
3               | Red Hat Cluster Suite                   | Red_Hat_Cluster_Suite                   |           | 21, 31, 2, 15, 17, 14, 12, 33                                   
12              | Red Hat Directory Server                | Red_Hat_Directory_Server                |           | 31, 2, 15, 17, 14, 12, 33, 506                                  
4               | Red Hat Enterprise Linux Server         | Red_Hat_Enterprise_Linux_Server         |           | 1, 19, 20, 18, 16, 2, 15, 17, 14, 13, 12, 11, 10, 32, 33, 30, 31
13              | Red Hat Enterprise Linux Server Nightly | Red_Hat_Enterprise_Linux_Server_Nightly |           | 508, 507                                                        
5               | Red Hat Enterprise Linux Workstation    | Red_Hat_Enterprise_Linux_Workstation    |           | 3, 6, 7, 5, 4, 31                                               
11              | Red Hat Identity Management             | Red_Hat_Identity_Management             |           | 31, 2, 15, 17, 14, 12, 33                                       
9               | Red Hat Open Stack                      | Red_Hat_Open_Stack                      |           | 25, 24, 26, 31, 2, 15, 17, 14, 12, 33                           
----------------|-----------------------------------------|-----------------------------------------|-----------|-----------------------------------------------------------------

CONTENT VIEW
ID:                     11
Name:                   Red Hat Identity Management
Label:                  Red_Hat_Identity_Management
Composite:              
Description:            
Content Host Count:     2
Organization:           Runlevelone
Yum Repositories:       
 1) ID:    31
    Name:  Extra Packages for Enterprise Linux (EPEL) 7 x86_64
    Label: Extra_Packages_for_Enterprise_Linux__EPEL__7_x86_64
 2) ID:    2
    Name:  Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.1
    Label: Red_Hat_Enterprise_Linux_7_Server_Kickstart_x86_64_7_1
 3) ID:    15
    Name:  Red Hat Enterprise Linux 7 Server - Optional RPMs x86_64 7.1
    Label: Red_Hat_Enterprise_Linux_7_Server_-_Optional_RPMs_x86_64_7_1
 4) ID:    17
    Name:  Red Hat Enterprise Linux 7 Server RPMs x86_64 7.1
    Label: Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7_1
 5) ID:    14
    Name:  Red Hat Enterprise Linux 7 Server - Supplementary RPMs x86_64 7.1
    Label: Red_Hat_Enterprise_Linux_7_Server_-_Supplementary_RPMs_x86_64_7_1
 6) ID:    12
    Name:  Red Hat Satellite Tools 6.1 for RHEL 7 Server RPMs x86_64
    Label: Red_Hat_Satellite_Tools_6_1_for_RHEL_7_Server_RPMs_x86_64
 7) ID:    33
    Name:  Zabbix 2.4 Packages for Server 7 RPMs x86_64
    Label: Zabbix_2_4_Packages_for_Server_7_RPMs_x86_64
Docker Repositories:    

Puppet Modules:         
 1) ID:      47
    Name:    concat
    Author:  puppetlabs
    Created: 2015/10/23 17:04:03
    Updated: 2015/10/23 17:04:03
 2) ID:      48
    Name:    stdlib
    Author:  puppetlabs
    Created: 2015/10/23 17:04:03
    Updated: 2015/10/23 17:04:03
 3) ID:      51
    Name:    ssh
    Author:  saz
    Created: 2015/10/23 17:04:03
    Updated: 2015/10/23 17:04:03
 4) ID:      52
    Name:    rsyslog
    Author:  saz
    Created: 2015/10/23 17:04:04
    Updated: 2015/10/23 17:04:04
 5) ID:      53
    Name:    sudo
    Author:  saz
    Created: 2015/10/23 17:04:04
    Updated: 2015/10/23 17:04:04
 6) ID:      54
    Name:    zabbix
    Author:  wdijkerman
    Created: 2015/10/23 17:04:04
    Updated: 2015/10/23 17:04:04
 7) ID:      68
    Name:    ntp
    Author:  saz
    Created: 2015/10/23 22:25:36
    Updated: 2015/10/23 22:25:36
 8) ID:      69
    Name:    timezone
    Author:  saz
    Created: 2015/10/23 22:27:16
    Updated: 2015/10/23 22:27:16
 9) ID:      70
    Name:    motd
    Author:  jeffmccune
    Created: 2015/10/23 22:28:13
    Updated: 2015/10/23 22:28:13
 10)ID:      71
    Name:    root
    Author:  thias
    Created: 2015/10/23 22:28:44
    Updated: 2015/10/23 22:28:44
Lifecycle Environments: 
 1) ID:   2
    Name: Library
 2) ID:   6
    Name: Red Hat Identity Management Servers
Versions:               
 1) ID:        18
    Version:   1.0
    Published: 2015/10/23 17:06:57
 2) ID:        28
    Version:   2.0
    Published: 2015/10/23 22:28:54
Components:             

Activation Keys:        
 1) rhel7-idm



3. Try and provision, tested against Bare Metal and RHEV computer cluster, both fails. 

Actual results:
Channel is not available to be used during kickstart. 
<Please see attachment>


Expected results:
Channel is available and packages are installed. 


Additional info:
The host does finally provision but none of the post installation scripts get processed during provisioning. You can select the release post after the host is stood up and it will then have access to the repositories.
Comment 3 Justin Sherrill 2015-11-11 13:39:23 EST
What version of subscription-manager is used?  That feature is only usable in newer versions of subscription-manager (looking like 1.12.1-1 or newer)
Comment 4 Dan Lavu 2015-11-17 12:15:41 EST
RHEL7.1
subscription-manager-1.13.22-1.el7.x86_64

RHEL6.7
subscription-manager-1.14.10-1.el6.x86_64
Comment 6 Peter Vreman 2017-09-15 11:57:08 EDT
I use this daily to set release_version to make sure EUS channels are set. This works without problem since 6.1.x times. Before i had a workaround implemeneted the die an additional 'subscription-manager release --set 7.x' to make sure 7.x was used instead of 7Server to allow the EUS channels.
Comment 11 Rodrigo A B Freire 2017-10-04 10:16 EDT
Created attachment 1334268 [details]
rhsm-debug content: A working and a problematic system, under the same SATserver and AK.

(In reply to Barnaby Court from comment #9)
> The zip file from "rhsm-debug system" for the system where this is not
> working. In addition the detailed view of the activation key would be
> helpful. 

Hi Barnaby,

I have it reproduced in my test Satellite environment. Please find attached the debug file for a working and a bad system.

Both are registered to the same AK (ak_RHEL72).
Both were provisioned by Satellite.

The bad system tries to fetch the content from the 7Server tree, instead of 7.2.
It is worked around by defining the --release flag in the register command.

The only diference is that the bad system is a physical system, whereas the system that registers seamlessly is a KVM guest.
Comment 12 Barnaby Court 2017-10-04 13:37:47 EDT
Rodrigo, can you provide the candlepin log file from /var/log/candlepin/candlepin.log on your satellite server?
Comment 13 Rodrigo A B Freire 2017-10-04 14:05 EDT
Created attachment 1334417 [details]
Candlepin log

Hi Barnaby;

(In reply to Barnaby Court from comment #12)
> Rodrigo, can you provide the candlepin log file from
> /var/log/candlepin/candlepin.log on your satellite server?

Please find it attached. Thanks for your review!
Comment 14 Barnaby Court 2017-10-10 09:54:37 EDT
Everything in the logs & information looks clean. Rodrigo, are you able to reproduce this on a current Satellite 6.2 server?
Comment 16 Rodrigo A B Freire 2017-10-18 07:04:01 EDT
(In reply to Barnaby Court from comment #14)
> Everything in the logs & information looks clean. Rodrigo, are you able to
> reproduce this on a current Satellite 6.2 server?

Hi Barnaby;

Yep: Sat 6.2.11.

See Comment #15, where Jiri states that his customers also have the same issue in the same scenario as me.
Comment 17 Peter Vreman 2017-10-18 08:35:14 EDT
I also see the issue now on Sat 6.2.12, before on Sat6.2.10 i have not seen it.
When i subscribe to an ActKey that has release 7.2 set the subscription-manager does not set it correct and the following yum commands fail
Comment 18 Rodrigo A B Freire 2017-10-18 08:37:38 EDT
(In reply to Peter Vreman from comment #17)
> I also see the issue now on Sat 6.2.12, before on Sat6.2.10 i have not seen
> it.
> When i subscribe to an ActKey that has release 7.2 set the
> subscription-manager does not set it correct and the following yum commands
> fail

Hallo herr Vreman;

For what is worth: They are baremetal systems, right?
Comment 19 Peter Vreman 2017-10-18 08:43:54 EDT
Yes, the systems were i have seen it are bare-metal systems. I did not try yet on a VM.

But i wanted to confirm that now with 6.2.12 i also see issues. In contrast to my message from 2017-09-15 that was based on experience with with 6.2.9 and 6.2.10.
Comment 20 Rodrigo A B Freire 2017-10-18 08:45:15 EDT
(In reply to Peter Vreman from comment #19)
> Yes, the systems were i have seen it are bare-metal systems. I did not try
> yet on a VM.
> 
> But i wanted to confirm that now with 6.2.12 i also see issues. In contrast
> to my message from 2017-09-15 that was based on experience with with 6.2.9
> and 6.2.10.

Vielen danke. So it seems that we have found a pattern then.
Let's see what Barnaby finds from here.

My best regards,

- RF.
Comment 21 Peter Vreman 2017-10-18 09:00:06 EDT
Confirmed that it is working for a VM. I only have the issue with the physical server
Comment 22 Rodrigo A B Freire 2017-10-18 09:04:58 EDT
Added tracker: https://access.redhat.com/solutions/3178281
Comment 23 Peter Vreman 2017-10-19 04:07:44 EDT
If it is candlepin related, for me it worked in Sat6.2.10 with:

/var/log/yum.log:Jun 23 06:36:59 Updated: candlepin-0.9.54.21-1.el7.noarch
/var/log/yum.log:Jun 23 06:37:19 Updated: candlepin-selinux-0.9.54.21-1.el7.noarch

And it fails now in Sat6.2.12 with:

/var/log/yum.log:Oct 09 08:12:35 Updated: candlepin-0.9.54.23-1.el7.noarch
/var/log/yum.log:Oct 09 08:12:53 Updated: candlepin-selinux-0.9.54.23-1.el7.noarch

On the client i use RHEL7.2-EUS
Comment 25 Rodrigo A B Freire 2017-10-26 05:54:30 EDT
Set keyword 'Regression', as per Comment 23.
Comment 32 Nagoor Shaik 2017-11-09 12:12:37 EST
Workaround until this bugzilla is fixed 

To set a release of 7.3 using bootstrap.py run following command

 # python bootstrap.py -l admin -s satellite.example.com -o 'Example' -L 'DC'  -a default-key  -g RHEL7 -S '--release=7.3'

-- nagoor
Comment 38 Rodrigo A B Freire 2017-12-05 12:58:20 EST
Fix available in Upstream tracker.

Porting back to Satellite.
Comment 39 Barnaby Court 2017-12-07 11:29:40 EST
Fixed upstream in candlepin-0.9.54.26-1
Comment 43 asamad 2018-02-07 16:01:01 EST
is it possible to get a hotfix for 6.2.13
Comment 44 Lukas Pramuk 2018-02-09 07:36:46 EST
VERIFIED.

@satellite-6.3.0-23.0.el7sat.noarch (Snap 35)
candlepin-2.1.14-1.el7.noarch

by the following manual reproducer:

1. Have a physical RHEL7 host (minor version doesn't matter, used RHEL7.3)

2. Enable and sync RH repo "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.2"

3. You can use the DOV or a CV with just this one repo published

4. Create AK and assign it with the DOV or the CV and change "Release Version" to "7.2"

5. Use the AK for the physical host to register

6. At the host check the result:


REPRO @6.2.13:

# subscription-manager repos --list
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://<SAT_FQDN>/pulp/repos/Default_Organization/Library/content/dist/rhel/
           server/7/$releasever/$basearch/os
Enabled:   1

# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
https://<SAT_FQDN>/pulp/repos/Default_Organization/Library/content/dist/rhel/server/7/7Server/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article 

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

https://<SAT_FQDN>/pulp/repos/Default_Organization/Library/content/dist/rhel/server/7/7Server/x86_64/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
repo id                                              repo name                                                    status
rhel-7-server-rpms/7Server/x86_64                    Red Hat Enterprise Linux 7 Server (RPMs)                     0
repolist: 0


VS.

FIX @6.3.0:

# subscription-manager repos --list
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://<SAT_FQDN>/pulp/repos/Default_Organization/Library/content/dist/rhel/server/7/7.2/$basearch/os
Enabled:   1

>>> correct, repo URL has 7.2 in it

# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms                                                                               | 2.0 kB  00:00:00     
(1/3): rhel-7-server-rpms/x86_64/group                                                           | 631 kB  00:00:00     
(2/3): rhel-7-server-rpms/x86_64/updateinfo                                                      | 1.3 MB  00:00:00     
(3/3): rhel-7-server-rpms/x86_64/primary                                                         |  16 MB  00:00:00     
rhel-7-server-rpms                                                                                          11412/11412
repo id                                           repo name                                                       status
!rhel-7-server-rpms/x86_64                        Red Hat Enterprise Linux 7 Server (RPMs)                        11,412
repolist: 11,412

>>> AK enforced release version is truly transferred to the physical host (though it is whatever minor version, mine is 7.3)
Comment 45 pm-sat@redhat.com 2018-02-21 11:54:17 EST
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/RHSA-2018:0336

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