Bug 1141781
Summary: | End date of the subscription is not a appropriate when you attach a future subscription and then heal the system | ||
---|---|---|---|
Product: | [Community] Candlepin | Reporter: | Rehana <redakkan> |
Component: | candlepin | Assignee: | Chris "Ceiu" Rog <crog> |
Status: | CLOSED NOTABUG | QA Contact: | Katello QA List <katello-qa-list> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 0.9 | CC: | crog, redakkan |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-10-13 16:19:17 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: | 1014343 |
Description
Rehana
2014-09-15 12:45:49 UTC
I'm unable to reproduce the issue with the current test data/build. Are you still able to reproduce it? If so, can you also provide the exact subscriptions you're using so I can try to recreate the same initial state? Thanks -C Yes, I am able to reproduce the issue. Tested version of candlepin # subscription-manager version server type: Red Hat Subscription Management subscription management server: 0.9.32-1 subscription management rules: 5.11 subscription-manager: 1.13.3-1.el7 python-rhsm: 1.13.2.1-2.el7 Please find the subscription details along with the detailed steps below 1) Installed products i had on the test machine # subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Awesome OS Instance Server Bits Product ID: 32060 Version: 6.1 Arch: ALL Status: Not Subscribed Status Details: Not supported by a valid subscription. Starts: Ends: Product Name: Awesome OS Server Bits Product ID: 37060 Version: 6.1 Arch: ALL Status: Not Subscribed Status Details: Not supported by a valid subscription. Starts: Ends: 2) Test machine is having 10 sockets, Attaching "Partial subscription" # subscription-manager attach --pool ff80808148e479330148e479dc4c15d3 --quantity=2 Successfully attached a subscription for: Awesome OS Instance Based (Standard Support) [root@dell-per620-02 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Subscriptions +-------------------------------------------+ Subscription Name: Awesome OS Instance Based (Standard Support) Provides: Awesome OS Instance Server Bits SKU: awesomeos-instancebased Contract: 1 Account: 12331131231 Serial: 1809226156361107733 Pool ID: ff80808148e479330148e479dc4c15d3 Active: True Quantity Used: 2 Service Level: Standard Service Type: L1-L3 Status Details: Only supports 2 of 10 sockets. Subscription Type: Instance Based Starts: 10/05/2014 Ends: 10/05/2015 System Type: Physical 3.List installed , after attaching ^ the subscription # subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Awesome OS Instance Server Bits Product ID: 32060 Version: 6.1 Arch: ALL Status: Partially Subscribed Status Details: Only supports 2 of 10 sockets. Starts: 10/05/2014 Ends: 10/05/2015 Product Name: Awesome OS Server Bits Product ID: 37060 Version: 6.1 Arch: ALL Status: Not Subscribed Status Details: Not supported by a valid subscription. Starts: 4.listing Future subscrition # subscription-manager list --available --ondate=2016-06-06 Subscription Name: Awesome OS Super Hypervisor Provides: Awesome Hypervisor Bits SKU: awesomeos-super-hypervisor Contract: 1 Pool ID: ff80808148e479330148e479c9510d2b Available: 15 Suggested: 1 Service Level: Service Type: Subscription Type: Stackable Ends: 09/24/2016 System Type: Physical Subscription Name: Awesome OS Instance Based (Standard Support) Provides: Awesome OS Instance Server Bits SKU: awesomeos-instancebased Contract: 1 Pool ID: ff80808148e479330148e479db5f1559 Available: 30 Suggested: 10 Service Level: Standard Service Type: L1-L3 Subscription Type: Instance Based Ends: 09/24/2016 System Type: Physical 5. Attaching future subscription for "Instance based" product # subscription-manager attach --pool ff80808148e479330148e479db5f1559 Successfully attached a subscription for: Awesome OS Instance Based (Standard Support) 6.Consumed list # subscription-manager list --consumed +-------------------------------------------+ Consumed Subscriptions +-------------------------------------------+ Subscription Name: Awesome OS Instance Based (Standard Support) Provides: Awesome OS Instance Server Bits SKU: awesomeos-instancebased Contract: 1 Account: 12331131231 Serial: 1809226156361107733 Pool ID: ff80808148e479330148e479dc4c15d3 Active: True Quantity Used: 2 Service Level: Standard Service Type: L1-L3 Status Details: Only supports 2 of 10 sockets. Subscription Type: Instance Based Starts: 10/05/2014 Ends: 10/05/2015 System Type: Physical Subscription Name: Awesome OS Instance Based (Standard Support) Provides: Awesome OS Instance Server Bits SKU: awesomeos-instancebased Contract: 1 Account: 12331131231 Serial: 5035486301179352413 Pool ID: ff80808148e479330148e479db5f1559 Active: False Quantity Used: 8 Service Level: Standard Service Type: L1-L3 Status Details: Subscription Type: Instance Based Starts: 09/25/2015 Ends: 09/24/2016 System Type: Physical 7.Installed list after attaching the future subscription # subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Awesome OS Instance Server Bits Product ID: 32060 Version: 6.1 Arch: ALL Status: Partially Subscribed Status Details: Only supports 2 of 10 sockets. Starts: 10/05/2014 Ends: 09/24/2016 ==>> Notice now the end date is updated with future subscrption's "End date" Product Name: Awesome OS Server Bits Product ID: 37060 Version: 6.1 Arch: ALL Status: Not Subscribed Status Details: Not supported by a valid subscription. Starts: Ends: 8.Heal the system; Set "autoAttachInterval" to 3 min, restart rhsmcertd ; wait for the heal process to complete 9.Consumed list after "heal" # subscription-manager list --consumed +-------------------------------------------+ Consumed Subscriptions +-------------------------------------------+ Subscription Name: Awesome OS Instance Based (Standard Support) Provides: Awesome OS Instance Server Bits SKU: awesomeos-instancebased Contract: 1 Account: 12331131231 Serial: 1809226156361107733 Pool ID: ff80808148e479330148e479dc4c15d3 Active: True Quantity Used: 2 Service Level: Standard Service Type: L1-L3 Status Details: Subscription Type: Instance Based Starts: 10/05/2014 Ends: 10/05/2015 ==> Intialy attached partial subscription System Type: Physical Subscription Name: Awesome OS Instance Based (Standard Support) Provides: Awesome OS Instance Server Bits SKU: awesomeos-instancebased Contract: 1 Account: 12331131231 Serial: 5035486301179352413 Pool ID: ff80808148e479330148e479db5f1559 Active: False Quantity Used: 8 Service Level: Standard Service Type: L1-L3 Status Details: Subscription Type: Instance Based Starts: 09/25/2015 Ends: 09/24/2016 ==> Future subscription System Type: Physical Subscription Name: Awesome OS Instance Based (Standard Support) Provides: Awesome OS Instance Server Bits SKU: awesomeos-instancebased Contract: 0 Account: 12331131231 Serial: 3643148307552384103 Pool ID: ff80808148e479330148e479ddb01695 Active: True Quantity Used: 8 Service Level: Standard Service Type: L1-L3 Status Details: Subscription Type: Instance Based Starts: 10/05/2014 Ends: 10/05/2015 ==>Subscription attached by "heal" process System Type: Physical Subscription Name: Awesome OS Virtual Datacenter Provides: Awesome OS Server Bits SKU: awesomeos-virt-datacenter Contract: 1 Account: 12331131231 Serial: 7818449199451944969 Pool ID: ff80808148e479330148e479c7430c4f Active: True Quantity Used: 1 Service Level: Service Type: Status Details: Subscription Type: Standard Starts: 10/05/2014 Ends: 10/05/2015 ==>Subscription attached by "heal" process for the other installed product product System Type: Physical 10. List --installed # subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Awesome OS Instance Server Bits Product ID: 32060 Version: 6.1 Arch: ALL Status: Subscribed Status Details: Starts: 10/05/2014 Ends: 10/05/2015 ---->> End date is changed back to Active subscription's end date" , while future subscription is still present on the system Product Name: Awesome OS Server Bits Product ID: 37060 Version: 6.1 Arch: ALL Status: Subscribed Status Details: Starts: 10/05/2014 Ends: 10/05/2015 Okay, this one took a bit, but I was able to recreate it and figure out exactly what's going on. The behavior you're seeing is actually by design. A bit goofy, but it should make sense in a moment. When you do the initial two attaches (partial w/quantity 2 and future with auto-quantity), the display is for the end of the future date since you're only actually compliant for the two-three week overlap period between the two. When the auto-attach/healing process is run, it tries to use the minimum number of subscriptions possible to bring the system into compliance. In this scenario, that number is eight -- and that's where the confusion begins. Because it's only attaching eight more subscriptions, the system is only compliant for the duration of the original subscription; after that, the future subscription takes over which, itself, only has eight subscriptions. As such, the system is no longer compliant and the updated date reflects this. When the same sequence of commands is run, but the future subscription is attached with "--quantity 10," the auto healing resolves the same, but the date runs through the end of the future subscription, as the system is compliant throughout. |