Bug 746035
Summary: | autosubscribe should NOT consider existing future entitlements when determining what pools and quantity should be autosubscribed | ||
---|---|---|---|
Product: | [Community] Candlepin | Reporter: | John Sefler <jsefler> |
Component: | candlepin | Assignee: | Bryan Kearney <bkearney> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | John Sefler <jsefler> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 0.5 | CC: | alikins, bkearney, skallesh, spandey |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Solaris | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-07-17 13:04:17 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: | |||
Bug Depends On: | |||
Bug Blocks: | 682238 |
Description
John Sefler
2011-10-13 17:46:42 UTC
HERE IS A MULTI-ENTITLEMENT CASE WITH TESTDATA.... [root@jsefler-onprem-62server ~]# date Thu Oct 13 13:13:00 EDT 2011 [root@jsefler-onprem-62server ~]# ls /etc/pki/product/100000000000002.pem /etc/pki/product/100000000000002.pem [root@jsefler-onprem-62server ~]# subscription-manager facts --list | grep cpu.socket cpu.cpu_socket(s): 4 lscpu.cpu_socket(s): 4 [root@jsefler-onprem-62server ~]# subscription-manager register --username testuser1 --password password --org admin The system has been registered with id: 42d42105-49ff-49b0-8dc5-8fb6b96f0b4e [root@jsefler-onprem-62server ~]# subscription-manager list --avail --ondate 2013-01-01| grep awesomeos-x86_64 -A4 -B1 | grep Yes -B4 -A1 ProductName: Awesome OS for x86_64 ProductId: awesomeos-x86_64 PoolId: 8a90f8c632f985e40132f9877c9d053c Quantity: 15 Multi-Entitlement: Yes Expires: 09/30/2013 [root@jsefler-onprem-62server ~]# subscription-manager subscribe --pool=8a90f8c632f985e40132f9877c9d053c --quantity=1 Successfully subscribed the system to Pool 8a90f8c632f985e40132f9877c9d053c [root@jsefler-onprem-62server ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Product Subscriptions +-------------------------------------------+ ProductName: Awesome OS for x86_64 Bits ContractNumber: 31 AccountNumber: 12331131231 SerialNumber: 2986802716899926028 Active: True QuantityUsed: 1 Begins: 09/30/2012 Expires: 09/30/2013 [root@jsefler-onprem-62server ~]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ ProductName: Awesome OS for x86_64 Bits Version: 3.11 Arch: x86_64 Status: Future Subscription Starts: 09/30/2012 Expires: 09/30/2013 [root@jsefler-onprem-62server ~]# subscription-manager facts --list | grep valid system.entitlements_valid: False TECHNICALLY AT THIS POINT WE ARE "PARTIALLY SUBSCRIBED" USING A "FUTURE SUBSCRIPTION" THAT WILL COVER 1 SOCKET OF OUR 4 SOCKET MACHINE. MOREOVER WE ARE NOT VALID/COMPLIANT TODAY. ALL OF THIS IS CORRECT. NOW LET'S ATTEMPT TO AUTOSUBSCRIBE AND GET COMPLIANT TODAY! [root@jsefler-onprem-62server ~]# subscription-manager subscribe --auto Installed Product Current Status: ProductName: Awesome OS for x86_64 Bits Status: Subscribed [root@jsefler-onprem-62server ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Product Subscriptions +-------------------------------------------+ ProductName: Awesome OS for x86_64 Bits ContractNumber: 30 AccountNumber: 12331131231 SerialNumber: 5442050938821748098 Active: True QuantityUsed: 3 Begins: 10/11/2011 Expires: 10/10/2012 ProductName: Awesome OS for x86_64 Bits ContractNumber: 31 AccountNumber: 12331131231 SerialNumber: 2986802716899926028 Active: True QuantityUsed: 1 Begins: 09/30/2012 Expires: 09/30/2013 [root@jsefler-onprem-62server ~]# subscription-manager facts --list | grep valid system.entitlements_valid: True ^^^ BANG!!! AUTOSUBSCRIBE SUCCESSFULLY SUBSCRIBED TO THE REMAINING QUANTITY (3) TO MEET THE SOCKET REQUIREMENTS. HOWEVER. WE SHOULD NOT BE VALID/COMPLIANT SINCE ONE OF THE COVERING SUBSCRIPTIONS IS IN THE FUTURE! INSTEAD, AUTOSUBSCRIBE SHOULD HAVE SUBSCRIBED TO A QUANTITY OF (4) TO SATISFY COMPLIANCE TODAY. THE FUTURE SUBSCRIPTION SHOULD NOT HAVE BEEN FACTORED IN BY AUTOSUBSCRIBE. Root cause of this looks to be entitlements being created with current date as the start date instead of the start date of the pool. patch out for review: commit fdcd64f5a75fcdbf81dd394e3e45c8c51a16ddee Author: Adrian Likins <alikins> Date: Fri Oct 14 13:39:12 2011 -0400 746035: set entitlement start dates to start date of pool Previously, they were set to "now", which meant subscribing to pools that started in the future got the wrong entitlement start date. Which meant that any checks of this "is this entitlement valid _now_" would be wrong. For this particular bug, that meant autosubscribe would consider a product entitled even though it is only entitled for the future. Also, the change is in candlepin, not subscription-manager,so this could get pushed back. commit fa957a9ededfcf2feabd2a3f94f87d8ac9e0149f Author: Adrian Likins <alikins> Date: Fri Oct 14 13:39:12 2011 -0400 746035: set entitlement start dates to start date of pool Previously, they were set to "now", which meant subscribing to pools that started in the future got the wrong entitlement start date. Which meant that any checks of this "is this entitlement valid _now_" would be wrong. For this particular bug, that meant autosubscribe would consider a product entitled even though it is only entitled for the future. Marking all community bugs modified or beyong as closed. |