Bug 1415633

Summary: When just partially subscribed instance based subscription by GUI, it will auto subscribe to fully to cover cpu sockets
Product: Red Hat Satellite Reporter: yuefliu <yuefliu>
Component: CandlepinAssignee: Barnaby Court <bcourt>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.6CC: bbuckingham, bcourt, bkearney, hsun, shihliu, yuefliu
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-18 17:28:01 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:

Description yuefliu 2017-01-23 10:05:01 UTC
Description of problem:
set cpu.cpu_socket(s) to 8 on rhel6.9 kvm host, then open subscription-manager-gui to select 2 quantity instance based subscription to attach, then run '#subscription-manager refresh' by CLI and check the subscription status, 
it will show total 8 quantity instance subscriptions have been fully subscribed.

At the same time it subscribes some other subscriptions by auto, like 'Unlimited Guests' and 'CloudForms (10-pack)'.



Version-Release number of selected component (if applicable):
subscription-manager-1.18.7-1.el6.x86_64
virt-who-0.18-2.el6.noarch
Satellite6.2.6_20161219.0


How reproducible:
always

Steps to Reproduce:
1. register rhel6.9 kvm host to Satellite6.2.6 server (10.73.3.145).
# subscription-manager register --username=admin --password=admin

2. set cpu.cpu_socket(s) to 8 on the host and update facts.
# echo '{"cpu.cpu_socket(s)":"8"}' > /etc/rhsm/facts/custom.facts
# subscription-manager facts --update
# subscription-manager facts --list |grep cpu.cpu_socket
cpu.cpu_socket(s): 8

3. open GUI to attach instance based subscription and just select 2 quantity to attach.
4 run '#subscription-manager refresh'

5. check subscription consumed status by CLI or GUI.
# subscription-manager list --co
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Resilient Storage for Unlimited Guests
Provides:            Red Hat Enterprise Linux High Availability (for RHEL Server)
                     Red Hat Enterprise Linux Resilient Storage (for RHEL Server)
SKU:                 RH00060
Contract:            10752429
Account:             5584289
Serial:              2935991048564496469
Pool ID:             8ac9831159c58c610159c8dd4a8f019e
Provides Management: No
Active:              True
Quantity Used:       4
Service Level:       Layered
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Stackable
Starts:              02/29/2016
Ends:                02/27/2017
System Type:         Physical

Subscription Name:   CloudForms (10-pack)
Provides:            Red Hat Beta
                     Oracle Java (for RHEL Server)
                     Red Hat CloudForms
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat CloudForms Beta
                     Red Hat Software Collections Beta (for RHEL Server)
SKU:                 MCT2358
Contract:            10752428
Account:             5584289
Serial:              6621715302837633407
Pool ID:             8ac9831159c58c610159c8dd4c570224
Provides Management: Yes
Active:              True
Quantity Used:       1
Service Level:       Premium
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              02/29/2016
Ends:                02/27/2017
System Type:         Physical

Subscription Name:   Red Hat Enterprise Linux Server, Premium (Physical or Virtual Nodes)
Provides:            Red Hat Beta
                     Red Hat EUCJP Support (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Enterprise Linux High Availability (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Atomic Host Beta
                     Oracle Java (for RHEL Server)
                     Red Hat Container Images
                     Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update Support
                     Red Hat Container Images Beta
                     Red Hat Developer Toolset (for RHEL Server)
                     Red Hat Enterprise Linux Server - Extended Update Support
                     Red Hat Enterprise Linux Resilient Storage (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended Update Support
                     Red Hat Software Collections (for RHEL Server)
                     Oracle Java (for RHEL Server) - Extended Update Support
                     Red Hat S-JIS Support (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Server
                     Red Hat Software Collections Beta (for RHEL Server)
SKU:                 RH00003
Contract:            10752424
Account:             5584289
Serial:              7774835243992033470
Pool ID:             8ac9831159c58c610159c8dd4c0a01fa
Provides Management: No
Active:              True
Quantity Used:       2
Service Level:       Premium
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Instance Based
Starts:              02/29/2016
Ends:                02/27/2017
System Type:         Physical

Subscription Name:   Red Hat Enterprise Linux Server, Premium (Physical or Virtual Nodes)
Provides:            Red Hat Beta
                     Red Hat EUCJP Support (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Enterprise Linux High Availability (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Atomic Host Beta
                     Oracle Java (for RHEL Server)
                     Red Hat Container Images
                     Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update Support
                     Red Hat Container Images Beta
                     Red Hat Developer Toolset (for RHEL Server)
                     Red Hat Enterprise Linux Server - Extended Update Support
                     Red Hat Enterprise Linux Resilient Storage (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended Update Support
                     Red Hat Software Collections (for RHEL Server)
                     Oracle Java (for RHEL Server) - Extended Update Support
                     Red Hat S-JIS Support (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Server
                     Red Hat Software Collections Beta (for RHEL Server)
SKU:                 RH00003
Contract:            10752424
Account:             5584289
Serial:              1769449598578337419
Pool ID:             8ac9831159c58c610159c8dd4c0a01fa
Provides Management: No
Active:              True
Quantity Used:       6
Service Level:       Premium
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Instance Based
Starts:              02/29/2016
Ends:                02/27/2017
System Type:         Physical



Actual results:
It auto subscribed another instance subscription with 6 quantity to cover all the 8 cpu sockets, and auto subscriped the "Unlimited" and "CloudForms" subscriptions.

Expected results:
It should show just one instance based subscriptions with 2 quantity and status details should be "Only supports 2 of 8 sockets".

Additional info:

Comment 3 Barnaby Court 2017-01-30 20:24:29 UTC
Was auto-attach disabled for the system? Based on the descriptions it is likely that rhsmcertd or other actions triggered an auto-attach on the system in the background. This will result in other subscriptions being attached unless action is taken to prevent it.

Comment 4 yuefliu 2017-02-03 02:54:29 UTC
Verified the bug on the latest rhel6.9_20170201.0 system against satellite6.2.6.

1. With auto-attach disabled
No the bug, instance based subscription can be attached normally by gui and no any other extra subscriptions being attached.

2. With auto-attach enabled
Also no the bug reproduce, instance based subscription also can be attached normally by gui to partially cover cpu sockets, just with some other extra subscriptions being attached.

Comment 5 Bryan Kearney 2017-05-18 17:28:01 UTC
Closing this out per comment 4.