Bug 1193671

Summary: 24 hour guest subscription should be hidden from user
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: Content ManagementAssignee: Tom McKay <tomckay>
Status: CLOSED ERRATA QA Contact: Li Bin Liu <liliu>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: bkearney, jmontleo, sgao, sthirugn
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9422
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:26:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom McKay 2015-02-17 21:00:41 UTC
Built in both katello-koji and brew:

candlepin-common-1.0.21-1.el6
candlepin-common-1.0.21-1.el7
candlepin-0.9.42-1.el7
candlepin-0.9.42-1.el6
gutterball-1.0.11-1.el6
gutterball-1.0.11-1.el7


These builds introduce a fairly major new feature to ease the pain of
virt-who users struggling with guests that can't subscribe after
creation because virt-who hasn't reported their host yet.

Now, when a manifest is imported (upgrading customers will have to
re-import their manifest to use this feature), a temporary pool for
"unmapped guests" will be created. This pool can only be used by guests
whose host is not known, and are less than 24 hours old. They can then
get a 24 hour entitlement from this pool giving virt-who time to report,
at which point the guest will be automatically moved to a suitable
subscription.

Katello action is required due to these new pools that will be
appearing. They effectively should be hidden, and excluded from any
dashboard style totals. This can be done by including this query
parameter in the API call to list pools:

GET
https://localhost:8443/candlepin/owners/test/pools?attribute=unmapped_guests_only:!true

This should be done for 6.1 to avoid customer confusion.

Comment 1 Tom McKay 2015-02-17 21:00:42 UTC
Created from redmine issue http://projects.theforeman.org/issues/9422

Comment 2 Bryan Kearney 2015-03-03 21:05:09 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9422 has been closed
-------------
Thomas McKay
Applied in changeset commit:katello|749c15a3128480592f9e2d6d639bc17802cc6038.

Comment 5 gaoshang 2015-04-07 02:50:44 UTC
This bug has been verified and passed, thanks!

1, Install latest satellite, import manifest with 24Hour subscription
2, In host, make sure virt-who is stoped
3, Register guest to satellite, check 24Hour subscription is available and can be attached.
	# subscription-manager subscribe --pool=8a90c5e64c6903d9014c690fcc1305ce
	Successfully attached a subscription for: Red Hat Enterprise Linux for SAP applications, Premium (8 sockets) (Up to 4 guests)

	# subscription-manager list --consumed
	+-------------------------------------------+
	   Consumed Subscriptions
	+-------------------------------------------+
	Subscription Name:   Red Hat Enterprise Linux for SAP applications, Premium (8 sockets) (Up to 4 guests)
	Provides:            Oracle Java (for RHEL Server)
		             Red Hat Enterprise Linux for SAP
		             Red Hat Enterprise Linux Server
		             Red Hat Beta
	SKU:                 RH0274447
	Contract:            10697951
	Account:             5501040
	Serial:              3754399522345018838
	Pool ID:             8a90c5e64c6903d9014c690fcc1305ce
	Provides Management: No
	Active:              True
	Quantity Used:       1
	Service Level:       PREMIUM
	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:              12/31/2014
	Ends:                03/31/2015
	System Type:         Virtual

4, Unsubscribe guest, register host to satellite, start virt-who service, check 24Hour subscription is not available

5, In Step 3, change both Satellite server and guest time to 24 Hours later(or just wait 24 hours), check 24 Hour subscription expired, and restart rhsmcertd service and wait minutes, check expired 24 Hour subscription has been removed

Comment 6 Bryan Kearney 2015-08-11 13:37:25 UTC
This bug is slated to be released with Satellite 6.1.

Comment 7 errata-xmlrpc 2015-08-12 05:26:18 UTC
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-2015:1592