Bug 1199078 - expired guest 24 hour subscription not removed on auto-attach
Summary: expired guest 24 hour subscription not removed on auto-attach
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Alex Wood
QA Contact: Li Bin Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-05 12:49 UTC by Tom McKay
Modified: 2019-04-01 20:26 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:28:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Description Tom McKay 2015-03-05 12:49:38 UTC
candlepin-0.9.45-1.el7.noarch
candlepin-common-1.0.22-1.el7.noarch
candlepin-tomcat-0.9.45-1.el7.noarch

After 24 hours have passed, the 24 hour guest subscription remains even after an auto-attach is run on that content host, even though another subscription was attached by candlepin to make it green. (ie. after auto-attach there is both the 24 temporary _and_ a physical) The status remains yellow due to the (expired) 24 sub.

I expect that the 24 hour sub should be removed from the consumer after the period has expired. It is confusing to see it remaining.

Comment 2 Alex Wood 2015-03-06 18:55:47 UTC
Up for review at https://github.com/candlepin/candlepin/pull/838

Comment 4 gaoshang 2015-03-30 05:47:16 UTC
This bug has been verified and passed, please check following steps, thanks!

1, Install latest Satellite 6.1 and import 24Hour subscription

2, Register guest and subscribe 24Hour subscription
	# 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
3, Change both Satellite server and guest time to 24 Hours later(or just wait 24 hours)

    # date -s 20150401
    Wed Apr  1 00:00:00 CST 2015

4, Check 24 Hour subscription expired
    [root@unused ~]# 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:              False
    Quantity Used:       1
    Service Level:       PREMIUM
    Service Type:        L1-L3
    Status Details:      Subscription is expired
    Subscription Type:   Standard (Temporary)
    Starts:              12/31/2014
    Ends:                03/31/2015
    System Type:         Virtual

5, Restart rhsmcertd service and wait minutes, check expired 24 Hour subscription has been removed(system auto-subscribed here).

# service rhsmcertd restart
Redirecting to /bin/systemctl restart  rhsmcertd.service

[root@unused ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Employee Subscription
Provides:            Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux Workstation
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Enterprise Linux High Availability (for RHEL Server)
                     Red Hat Enterprise Linux Resilient Storage (for RHEL Server)
SKU:                 SYS0395
Contract:            
Account:             5501040
Serial:              3147590346414504541
Pool ID:             8a90c5e64c6903d9014c690fc22f03de
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       None
Service Type:        Self-Support
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              12/31/2014
Ends:                12/31/2015
System Type:         Physical

6, System status in Satellite web ui should be consistent with cmd

Comment 5 Bryan Kearney 2015-08-11 13:31:33 UTC
This bug is slated to be released with Satellite 6.1.

Comment 6 errata-xmlrpc 2015-08-12 05:28:58 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


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