Bug 1046158 - Attaching quantity=1 of SKU RH00073 on a 2 socket physical system yields "Only covers 0 of 2 sockets."
Summary: Attaching quantity=1 of SKU RH00073 on a 2 socket physical system yields "Onl...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.9
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Bryan Kearney
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-12-23 21:29 UTC by John Sefler
Modified: 2015-05-14 14:53 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-29 19:04:55 UTC
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2013-12-23 21:29:51 UTC
Description of problem:
Accessible on the Stage candlepin entitlement server from account rhel7beta is a RH00073 SKU with instance_multiplier=2 sockets=1.  In the subscription-manager list --available from a physical system with 2 sockets, the suggested attacxhment quantity is 4 (this is correct and expected).  However after attaching a quantity=2, the Status Details of the consumed subscriptions says "Only covers 0 of 2 sockets." (this is incorrect).  After attaching another quantity of 2, the Status Details is blank indicating full compliance (this is correct).

Version-Release number of selected component (if applicable):
[root@qeblade6 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown  <====  Is actually: 0.8.28.5
subscription-manager: 1.10.8-1.el7
python-rhsm: 1.10.8-1.el7


How reproducible:


Steps to Reproduce:
Starting from this system....
[root@qeblade6 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux 7 for HPC Compute Node High Touch Beta
Product ID:     234
Version:        7.0 HTB
Arch:           x86_64
Status:         Unknown
Status Details: 
Starts:         
Ends:           

[root@qeblade6 ~]# subscription-manager facts --list | grep virt.is_guest
virt.is_guest: False
[root@qeblade6 ~]# subscription-manager facts --list | egrep ^cpu.cpu_socket
cpu.cpu_socket(s): 2
[root@qeblade6 ~]# 

[root@qeblade6 ~]# subscription-manager register --username=rhel7beta --serverurl=subscription.rhn.stage.redhat.com:443/subscription --baseurl=https://cdn.rcm-qa.redhat.com --force
Password: 
The system has been registered with ID: a98529be-c668-44c0-aa59-56ba3bf442b2 
[root@qeblade6 ~]# subscription-manager list --avail | grep RH00073 -B3 -A10

Subscription Name: Red Hat Enterprise Linux Desktop Beta
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00073
Contract:          10299496
Pool ID:           8a99f9844228f57b0142334889e65cc4
Available:         935
Suggested:         4               <========  THIS IS CORRECT
Service Level:     Self-Support
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              11/06/2014
System Type:       Physical



Attaching the first half of the quantity needed to achieve compliance....

[root@qeblade6 ~]# subscription-manager attach --pool=8a99f9844228f57b0142334889e65cc4 --quantity=2
Successfully attached a subscription for: Red Hat Enterprise Linux Desktop Beta
[root@qeblade6 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Desktop Beta
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00073
Contract:          10299496
Account:           5363962
Serial:            2786886454320135555
Pool ID:           8a99f9844228f57b0142334889e65cc4
Active:            True
Quantity Used:     2
Service Level:     Self-Support
Service Type:      L1-L3
Status Details:    Only covers 0 of 2 sockets. <========  THIS IS *NOT* CORRECT
Starts:            11/07/2013
Ends:              11/06/2014
System Type:       Physical



Attaching the second half of the quantity needed to complete compliance....

[root@qeblade6 ~]# subscription-manager attach --pool=8a99f9844228f57b0142334889e65cc4 --quantity=2
Successfully attached a subscription for: Red Hat Enterprise Linux Desktop Beta
[root@qeblade6 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Desktop Beta
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00073
Contract:          10299496
Account:           5363962
Serial:            2786886454320135555
Pool ID:           8a99f9844228f57b0142334889e65cc4
Active:            True
Quantity Used:     2
Service Level:     Self-Support
Service Type:      L1-L3
Status Details:                           <========  THIS IS CORRECT
Starts:            11/07/2013
Ends:              11/06/2014
System Type:       Physical

Subscription Name: Red Hat Enterprise Linux Desktop Beta
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00073
Contract:          10299496
Account:           5363962
Serial:            3944855335139993402
Pool ID:           8a99f9844228f57b0142334889e65cc4
Active:            True
Quantity Used:     2
Service Level:     Self-Support
Service Type:      L1-L3
Status Details:                           <========  THIS IS CORRECT
Starts:            11/07/2013
Ends:              11/06/2014
System Type:       Physical



Expected results:
After Attaching the first quantity=2, the Status Details of the consumed entitlement should have been:  Only covers 1 of 2 sockets.






Additional Info:
Here is the pool's json data showing all the product Attributes:

[root@qeblade6 ~]# curl -u rhel7beta:**** -stderr /dev/null -k https://subscription.rhn.stage.redhat.com/subscription/pools/8a99f9844228f57b0142334889e65cc4 |python -mjson.tool
{
    "accountNumber": "5363962",
    "activeSubscription": true,
    "attributes": [],
    "calculatedAttributes": {},
    "consumed": 69,
    "contractNumber": "10299496",
    "created": "2013-11-07T15:57:41.000+0000",
    "derivedProductAttributes": [],
    "derivedProductId": null,
    "derivedProductName": null,
    "derivedProvidedProducts": [],
    "endDate": "2014-11-07T04:59:59.000+0000",
    "exported": 60,
    "href": "/pools/8a99f9844228f57b0142334889e65cc4",
    "id": "8a99f9844228f57b0142334889e65cc4",
    "orderNumber": null,
    "owner": {
        "displayName": "7074055",
        "href": "/owners/7074055",
        "id": "8a99f9844228f57b014233253b4e5af4",
        "key": "7074055"
    },
    "productAttributes": [
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cc5",
            "name": "option_code",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "1"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cc6",
            "name": "multi-entitlement",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "yes"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cc7",
            "name": "stacking_id",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "RH00073"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cc8",
            "name": "subtype",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "Self-Support"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cc9",
            "name": "sockets",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "1"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cca",
            "name": "support_level",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "Self-Support"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65ccb",
            "name": "host_limited",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "true"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65ccc",
            "name": "ph_product_name",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "RHEL Desktop"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65ccd",
            "name": "product_family",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "Red Hat Enterprise Linux"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cce",
            "name": "ph_category",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "Subscriptions"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65ccf",
            "name": "type",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "MKT"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cd0",
            "name": "instance_multiplier",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "2"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cd1",
            "name": "support_type",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "L1-L3"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cd2",
            "name": "virt_limit",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "1"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cd4",
            "name": "description",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "Red Hat Enterprise Linux"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cd3",
            "name": "name",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "Red Hat Enterprise Linux Desktop Beta"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cd5",
            "name": "arch",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "x86_64"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cd6",
            "name": "variant",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "Desktop"
        },
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cd7",
            "name": "ph_product_line",
            "productId": "RH00073",
            "updated": "2013-11-07T15:57:41.000+0000",
            "value": "RHEL"
        }
    ],
    "productId": "RH00073",
    "productName": "Red Hat Enterprise Linux Desktop Beta",
    "providedProducts": [
        {
            "created": "2013-11-07T15:57:41.000+0000",
            "id": "8a99f9844228f57b0142334889e65cd8",
            "productId": "226",
            "productName": "Red Hat Enterprise Linux 7 Public Beta",
            "updated": "2013-11-07T15:57:41.000+0000"
        }
    ],
    "quantity": 1000,
    "restrictedToUsername": null,
    "sourceConsumer": null,
    "sourceEntitlement": null,
    "sourceStackId": null,
    "startDate": "2013-11-07T05:00:00.000+0000",
    "subscriptionId": "3051989",
    "subscriptionSubKey": "master",
    "updated": "2013-12-23T21:20:07.000+0000"
}

Comment 1 Carter Kozak 2014-01-02 15:09:24 UTC
commit af21128d10630c4411dac89d489e9b4bb74bf8f5
Author: ckozak <ckozak>
Date:   Mon Dec 23 15:59:27 2013 -0500

    1046158: Fixed instance based compliance calculation
    
    Instance based calculation assumed that the
    instance_multiplier == sockets attribute.  This
    is not the case in some data on stage where
    sockets = 1, and instance_multiplier = 2

Comment 2 John Sefler 2014-02-24 17:34:13 UTC
I believe this is now deployed to stage as part of candlepin-0.9.3
Moving to ON_QA

Comment 3 John Sefler 2014-03-03 22:27:27 UTC
Verifying Version...
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown       <=========== candlepin-0.9.3 
subscription-manager: 1.10.14-3.el7
python-rhsm: 1.10.12-1.el7

[root@jsefler-7 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux 7 Server High Touch Beta
Product ID:     230
Version:        7.0 HTB
Arch:           x86_64
Status:         Unknown
Status Details: 
Starts:         
Ends:   

[root@jsefler-7 ~]# echo '{"cpu.cpu_socket(s)":"2", "virt.is_guest":"false"}' > /etc/rhsm/facts/override.facts
[root@jsefler-7 ~]# subscription-manager facts --list | grep virt.is_guest
virt.is_guest: false
[root@jsefler-7 ~]# subscription-manager facts --list | egrep ^cpu.cpu_socket
cpu.cpu_socket(s): 2

[root@jsefler-7 ~]# subscription-manager register --username=rhel7beta --serverurl=subscription.rhn.stage.redhat.com:443/subscription --baseurl=https://cdn.rcm-qa.redhat.com
Password: 
The system has been registered with ID: abf95866-f36b-40d9-b1fa-450d968444a7 
[root@jsefler-7 ~]# subscription-manager list --avail | grep RH00073 -B3 -A10

Subscription Name: Red Hat Enterprise Linux Desktop Beta
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00073
Contract:          10299496
Pool ID:           8a99f9844228f57b0142334889e65cc4
Available:         930
Suggested:         4              <========== THIS IS STILL CORRECT
Service Level:     Self-Support
Service Type:      L1-L3
Subscription Type: Instance Based
Ends:              11/06/2014
System Type:       Physical

[root@jsefler-7 ~]# subscription-manager attach --pool=8a99f9844228f57b0142334889e65cc4 --quantity=2
Successfully attached a subscription for: Red Hat Enterprise Linux Desktop Beta

[root@jsefler-7 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Desktop Beta
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00073
Contract:          10299496
Account:           5363962
Serial:            321840136618985481
Pool ID:           8a99f9844228f57b0142334889e65cc4
Active:            True
Quantity Used:     2
Service Level:     Self-Support
Service Type:      L1-L3
Status Details:    Only supports 1 of 2 sockets.   <======== VERIFIED
Subscription Type: Instance Based
Starts:            11/07/2013
Ends:              11/06/2014
System Type:       Physical

[root@jsefler-7 ~]# subscription-manager attach --pool=8a99f9844228f57b0142334889e65cc4 --quantity=2
Successfully attached a subscription for: Red Hat Enterprise Linux Desktop Beta

[root@jsefler-7 ~]# subscription-manager list --consumed+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Desktop Beta
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00073
Contract:          10299496
Account:           5363962
Serial:            321840136618985481
Pool ID:           8a99f9844228f57b0142334889e65cc4
Active:            True
Quantity Used:     2
Service Level:     Self-Support
Service Type:      L1-L3
Status Details:                             <========== THIS IS STILL CORRECT
Subscription Type: Instance Based
Starts:            11/07/2013
Ends:              11/06/2014
System Type:       Physical

Subscription Name: Red Hat Enterprise Linux Desktop Beta
Provides:          Red Hat Enterprise Linux 7 Public Beta
SKU:               RH00073
Contract:          10299496
Account:           5363962
Serial:            5680049208220774056
Pool ID:           8a99f9844228f57b0142334889e65cc4
Active:            True
Quantity Used:     2
Service Level:     Self-Support
Service Type:      L1-L3
Status Details:                             <========== THIS IS STILL CORRECT
Subscription Type: Instance Based
Starts:            11/07/2013
Ends:              11/06/2014
System Type:       Physical



VERIFIED:
After Attaching the first quantity=2, the Status Details of the consumed subscription correctly states:  Only supports 1 of 2 sockets.

Comment 5 Bryan Kearney 2014-09-29 19:04:55 UTC
These bugs were fixed during 7.0 but not moved to CLOSED. They have been delivered


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