Bug 1383662

Summary: Extended Update Support subscriptions not auto-attached, EUS repositories not accessible
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: Subscription ManagementAssignee: Eric Helms <ehelms>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.2CC: bbuckingham, brubisch, rjerrido
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-13 19:39:17 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:
Bug Depends On:    
Bug Blocks: 1122832    

Description Peter Vreman 2016-10-11 11:46:45 UTC
Description of problem:
Having a EUS subscription then auto-attach does not assign it.
In the end the access to EUS channels will be absent.

This is a regression over 6.1 where the same process works.


[prod] root@li-lp-1800:~# sudo -u hoici hammer -c /opt/hoici/etc/sat6/hammer-hoici.yaml activation-key info --organization=Hilti --name=TestA
Name:                  TestA
ID:                    176
Description:
Host Limit:            Unlimited
Auto Attach:           true
Lifecycle Environment: Hostgroup
Content View:          hg-dev::IPS::Test-6.8-latest
Host Collections:

[prod] root@li-lp-1800:~# sudo -u hoici hammer -c /opt/hoici/etc/sat6/hammer-hoici.yaml activation-key subscriptions --organization=Hilti --name=TestA
---|----------------------------------------------------------------------------------|----------|----------|---------------------|---------------------|----------|
ID | NAME                                                                             | ATTACHED | QUANTITY | START DATE          | END DATE            | SUPPORT  |
---|----------------------------------------------------------------------------------|----------|----------|---------------------|---------------------|----------|
4  | Red Hat Enterprise Linux Server with Smart Management, Standard (Physical or ... |          |          | 2014/01/01 05:00:00 | 2017/01/01 04:59:59 | Standard |
3  | Extended Update Support                                                          |          |          | 2014/01/01 05:00:00 | 2017/01/01 04:59:59 | Layered  |
---|----------------------------------------------------------------------------------|----------|----------|---------------------|---------------------|----------|



[dev] hoiroot@li-ld-1538:~$ sudo subscription-manager register --org=Hilti --activationkey=TestA --force
The system with UUID eaa1e4f1-bf44-4376-aca7-58de1c4c22bf has been unregistered
The system has been registered with ID: 26483554-bda3-401d-8f99-23ae1711e25a

Installed Product Current Status:
Product Name: Red Hat Software Collections (for RHEL Server)
Status:       Subscribed

Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[dev] hoiroot@li-ld-1538:~$ sudo subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server with Smart Management, Standard (Physical or Virtual Nodes)
Provides:            Red Hat Beta
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Enterprise Linux Atomic Host Beta
                     Oracle Java (for RHEL Server)
                     Red Hat Container Images
                     Red Hat Container Images Beta
                     Red Hat Developer Toolset (for RHEL Server)
                     dotNET on RHEL (for RHEL Server)
                     dotNET on RHEL Beta (for RHEL Server)
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Software Collections Beta (for RHEL Server)
SKU:                 RH00009F3
Contract:            xxxxxxxxxxxxxxxxx
Account:             xxxxxxxxxxxxxxxxxxxxx
Serial:              xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Pool ID:             8a8388bf5790474101579053656a019a
Provides Management: Yes
Active:              True
Quantity Used:       1
Service Level:       Standard
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Instance Based
Starts:              01/01/2014
Ends:                01/01/2017
System Type:         Physical


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


How reproducible:


Steps to Reproduce:
1. Craete ContentView ViewA with EUS channels
2. Create ActKey TestA, associate with ViewA, keep rest defaults (auto-attach=yes)
2. Add Subscriptions: Standard and EUS to ActKey TestA
3. Register a client to the ActKey TestA
4. On client list consumed subscriptions
5. On client enable all repos

Actual results:
EUS is not assigned.


Expected results:
EUS is assigned.
EUS repos are working


Additional info:

Comment 1 Rich Jerrido 2016-10-11 14:00:24 UTC
The auto-attach algorithm looks at the systems installed products (as listed in /etc/pki/product{,-default} to see which products are currently installed and attaches the minimal number of subscriptions required to properly subscribe them. 

In your usage, I am going to assume that the system you are registered is freshly provisioned with RHEL Server. As such, /etc/pki/product{,-default} should have only the product certificate for RHEL (69.pem). To achieve your desired results, you have a couple of options :

Option 1
========

Create a single key as you've listed above, changing auto-attach from 'true' to 'false'. This changes the behavior from 'auto-attach from this list of subscriptions' to 'attach the specified quantities of ALL of the subscriptions on this key' The downside to this model is that if you have differing types of RHEL subscriptions with differing start/stop dates, this may not be as flexible. 


Option 2
========

Use multiple keys and present both at registration. 

- One key with the multiple RHEL subscriptions attached (and auto-attach = true)
- One key with the EUS subscription attached (and auto-attach = false)

This works well if you have lots of different RHEL subs but a single line item of EUS subs. 

Option 3
========

place the EUS product certificate (70.pem) in /etc/pki/product, and your key will work as designed. Ideally, you should be able to declare on your activation key, which products to be installed *prior* to registration, which is what https://bugzilla.redhat.com/show_bug.cgi?id=1322653 is open for, but using wget/curl to deploy the product certificate prior to registration would achieve your results.

Comment 2 Peter Vreman 2016-10-11 14:50:01 UTC
Thanks for the detailed explanation.

The BZ https://bugzilla.redhat.com/show_bug.cgi?id=1322653 describes exactly the situation with multiple use cases.

I can workaround the issue using 'Option 1', i already have a 1-1 relation between hostgroup and activation key, so i can control exactly what subscriptions are in each activation key based on a profile.

Case can be closed as duplicate of BZ1322653

Comment 3 Brad Buckingham 2016-10-13 19:39:17 UTC
Thanks Peter and Rich for the discussion.  I will close this one as a duplicate.

*** This bug has been marked as a duplicate of bug 1322653 ***