Bug 1441117 - [RFE] Provide some means to indicate extra products that should be considered as `installed` via a custom fact that will be considered in addition to the installed products list.
Summary: [RFE] Provide some means to indicate extra products that should be considered...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Candlepin
Version: Nightly
Hardware: x86_64
OS: Linux
medium
medium vote
Target Milestone: Unspecified
Assignee: candlepin-bugs
QA Contact: jcallaha
URL:
Whiteboard:
: 1322653 (view as bug list)
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2017-04-11 09:05 UTC by Klaas Demter
Modified: 2019-08-12 15:59 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-03 12:05:48 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Klaas Demter 2017-04-11 09:05:04 UTC
Environment:
Katello 3.3 with candlepin-0.9.54.10-1.el7.noarch installing RHEL 7.3 with subscription-manager-1.17.15-1.el7.x86_64

Description of problem:
I want to attach rhscl to all my servers on install even though the default install doesn't include any packages from the rhscl repository. This doesn't work for me, candlepin doesn't transform the temporary unmapped guest subscription into a real subscription that is provided through the hypervisor. This does however work fine if I install a package from rhscl.

The same behaviour happens when I attach a license and migrate the host to another hypervisor. After running virt-who and subscription-manager refresh, the rhscl license gets removed when no package is installed.


Version-Release number of selected component (if applicable):
candlepin-0.9.54.10-1.el7.noarch


How reproducible:
Case1: Install a server and attach a temporary unmapped guest license of a product that has no packages installed and see it disappear after virt-who reports the server.
Case2: Attach a hypervisor based license of a product that has no packages installed and see it disappear after migrating to another hypervisor.


Actual results:
License is removed

Expected results:
License remains attached and is replaced with correct hypervisor based license


Additional info:
I suspect this is an edge-case of the auto-heal process inside candlepin but I'm not sure where all the magic happens and I am unable to find documentation on how this process really works.

Comment 1 Klaas Demter 2017-04-11 09:09:58 UTC
(output of subscription-manager list --consumed for rhscl license)
After install:
Subscription Name:   Software Collections and Developer Toolset
Provides:            Red Hat Software Collections Beta (for RHEL Workstation)
                     Red Hat Developer Toolset (for RHEL Server)
                     Red Hat Developer Toolset (for RHEL Workstation)
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat Software Collections (for RHEL Client)
                     Red Hat Software Collections (for RHEL Workstation)
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Software Collections Beta (for RHEL Client)
SKU:                 MCT2883
Contract:            10000000
Account:             888888
Serial:              999999999999999999
Pool ID:             11111111111111111111111111111111
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Layered
Service Type:        L1-L3
Status Details:      Guest has not been reported on any host and is using a temporary unmapped guest subscription.
Subscription Type:   Standard (Temporary)
Starts:              04/18/2016
Ends:                04/11/2017
System Type:         Virtual


changes to this once its reported on a hypervisor:
Subscription Name:   Software Collections and Developer Toolset
Provides:            Red Hat Software Collections Beta (for RHEL Workstation)
                     Red Hat Developer Toolset (for RHEL Server)
                     Red Hat Developer Toolset (for RHEL Workstation)
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat Software Collections (for RHEL Client)
                     Red Hat Software Collections (for RHEL Workstation)
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Software Collections Beta (for RHEL Client)
SKU:                 MCT2883
Contract:            10000000
Account:             888888
Serial:              999999999999999999
Pool ID:             11111111111111111111111111111111
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Layered
Service Type:        L1-L3
Status Details:      Guest has not been reported on any host and is using a temporary unmapped guest subscription.
Subscription Type:   
Starts:              04/18/2016
Ends:                04/11/2017
System Type:         Virtual

after that I can either wait until subscription-manager refreshes on its own or run it manually:
# subscription-manager refresh
2 local certificates have been deleted.
All local data refreshed

Software Collections are removed

on the system I can re-attach the right software collections afterwards:
# subscription-manager attach --pool 12121212121212121212121212121212
Successfully attached a subscription for: Software Collections and Developer Toolset
Subscription Name:   Software Collections and Developer Toolset
Provides:            Red Hat Software Collections Beta (for RHEL Workstation)
                     Red Hat Developer Toolset (for RHEL Server)
                     Red Hat Developer Toolset (for RHEL Workstation)
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat Software Collections (for RHEL Client)
                     Red Hat Software Collections (for RHEL Workstation)
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Software Collections Beta (for RHEL Client)
SKU:                 MCT2883
Contract:            10000000
Account:             888888
Serial:              999999999999999999
Pool ID:             12121212121212121212121212121212
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Layered
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              04/18/2016
Ends:                04/18/2017
System Type:         Virtual

Comment 2 Barnaby Court 2017-04-11 13:30:51 UTC
The challenge is that auto-attach is looking at the installed products list (based on the product certificates that are installed). Since nothing has been installed from the SCL there are no installed product certificates referencing it. Because of that it will not appear in the installed products list for the system. When Candlepin runs the auto-attach the SCL is not listed as something it should be attempting to find an entitlement for. 

The request here makes sense but I might phrase it as: "Provide some means to indicate extra products that should be considered as `installed` via a custom fact that will be considered in addition to the installed products list."

Klaas, would the above be considered appropriate from your perspective?

Comment 3 Klaas Demter 2017-04-11 13:54:13 UTC
Hi,
I think the transition from temporary subscription to permanent is working differently than I expected. I thought it looks at the subscriptions currently in system and then tries to find the appropriate ones to replace them with :)

If it works like an auto-attach each time then you're absolutely right, should I refile this against subscription-manager?

Comment 4 Klaas Demter 2017-04-11 15:30:56 UTC
as a workaround I can simply put the cert into /etc/pki/product/201.pem ?
Can I do this in my kickstart and it will even install the rhscl license with auto-attach automatically?

Comment 5 Klaas Demter 2017-04-11 15:57:03 UTC
a more general question -- where is that cert coming from? Would it make sense to do a package for software collections that is included in the 7server repo that one could install to enable software collections?

Comment 6 Barnaby Court 2017-04-11 18:30:48 UTC
Regarding Comment 3, yes the transition from temporary to regular subscription is an auto-attach. However, it takes place on the server side and subscription-manager is not really involved so this BZ is in the correct place. The temporary guest subscriptions can be conglomerations of content and don't have a 1:1 mapping with other types of entitlements available so performing a direct exchange is not possible. 

For Comment 4, yes, you can add the 201.pem into /etc/pki/product-defaults as a workaround to get the RHSCL entitlements attached without having installed an RPM from the RHSCL repositories. 

For Comment 5, The when yum installs RPMs, the productid plugin looks for a product certificate in the yum metadata and if one is present it installs it into /etc/pki/product/. Likewise, when RPMs are removed, if there is no content remaining from a particular repo, that product id certificate is removed.

Comment 7 Rich Jerrido 2018-09-06 15:42:27 UTC
*** Bug 1322653 has been marked as a duplicate of this bug. ***

Comment 8 Bryan Kearney 2019-05-02 19:06:58 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 9 Bryan Kearney 2019-06-03 12:05:48 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.


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