Bug 1008931

Summary: In the SAM Web UI, host can consumed 1 instance-base subscription when the subscription's instance-multiplier is 2
Product: [Retired] Subscription Asset Manager Reporter: Liushihui <shihliu>
Component: katelloAssignee: Tom McKay <tomckay>
Status: CLOSED WONTFIX QA Contact: SAM QE List <sam-qe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.3CC: gxing, liliu, qzhang, sgao, sthirugn, tomckay, wpoteat
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-15 15:38:07 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:
Bug Depends On:    
Bug Blocks: 971511    
Attachments:
Description Flags
SAM-error-instance-quantity.png none

Description Liushihui 2013-09-17 11:15:09 UTC
Description of problem:
After subscribe zero instance-base subscription(instance-multiplier is 2) in the SAM web UI, it will subscribe it successfuly, But the attached quantity is 1

Version-Release number of selected component (if applicable):
subscription-manager-1.8.22-1.el5
python-rhsm-1.8.17-1.el5
virt-who-0.7-9.el5
katello-headpin-1.4.3-13.el6sam_splice.noarch
candlepin-0.8.26-1.el6sam.noarch

How reproducible:
Always

Steps to Reproduce:
ENV:SAM host:10.66.13.97, username/password:admin/admin
Prepare the instance-base subscription in the SAM as the following:
	Name: Red Hat Enterprise Linux Server, Premium
	Number: 
	SKU: RH00003
	Contract: 10023540
	Account: 5226325
	Service Level: Premium
	Service Type: L1-L3
	Quantity: 20
	Quantity Used: 2
	Socket Limit: 2
	RAM Limit: 
	Core Limit: 
	Virt Only: False
	Subscription: 
	Stacking ID: RH00003
	Warning Period: 0
	Provides Management: False

1. Register host to SAM server
#subscription-manager register --username=admin --password=admin
2. Open the SAM web UI with url:https://SAMIP/sam
3. Click on System-->All in the menu, Then click the host's hostname on the left list, it will see the host's information on the right side.
4. Click "Subscription" tab, check on the subscription of"Red Hat Linux Server, Premium"(instance-base subscription , and the instance-multiplier is 2) , modify the quantity to zero, Then click on "Attach" button
5. Check the part of "System Current Subscription(s)"

Actual results:
Subscription successfully, it remind "Insufficient Subscriptions are Attached". And the attached quantity is 1, please see the screenshot in the attachment.

Expected results:
Subscribe the subscription successfully, the attached quantity should be 2. As Physical systems can only consume in increments of the instance multiplier

Additional info:
If subscribe the non instance-base subscription , After subscribe the zero subscription in the SAM web UI , it also subscribe successfully ,and the quantity is 1, it means After attach the quantity of zero subscription in the SAM web UI, It should consume default quanity subscription.

Comment 1 Liushihui 2013-09-17 11:18:34 UTC
Created attachment 798759 [details]
SAM-error-instance-quantity.png

Comment 2 William Poteat 2014-01-07 15:35:46 UTC
The above scenario was likely run against a guest machine. The instance multiplier does not come into play for guests, only hosts.

The issue that remiains now is that the UI is not presenting the correct quantity when the box is checked for the particular subscription.