RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1011961 - rct cat-cert should display "Unlimited" for Quantity instead of "-1"
Summary: rct cat-cert should display "Unlimited" for Quantity instead of "-1"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Carter Kozak
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel65
TreeView+ depends on / blocked
 
Reported: 2013-09-25 12:56 UTC by Rehana
Modified: 2013-11-21 21:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Display Unlimited instead of a -1 for quantity. Reason: The user would be shown a -1 when an entitlement had a quantity of unlimited, this was confusing to the user. Result (if any):
Clone Of:
Environment:
Last Closed: 2013-11-21 21:30:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1659 0 normal SHIPPED_LIVE subscription-manager and python-rhsm bug fix and enhancement update 2013-11-20 21:53:10 UTC

Description Rehana 2013-09-25 12:56:22 UTC
Description of problem:
Observed that the Quantity value was displayed as  "-1" instead of 'unlimited' in the entitlement cert

Version-Release number of selected component (if applicable):
subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.28-1
subscription-manager: 1.10.2-1.git.20.340ef28.el7
python-rhsm: 1.10.2-1.git.4.3048ab5.el7


How reproducible:
2/2

Steps to Reproduce:
1.Attach a subscription having "unlimited" available quantity in the machine
2.I have used datacenter sub-pool
3.[root@localhost ~]#  subscription-manager list --available | grep -A9 "dc-virt"
Subscription Name: Awesome OS Server Basic (dc-virt)
SKU:               awesomeos-server-basic-vdc
Pool ID:           8ac6a36241539ee4014153a221bd1437
Available:         10
Suggested:         1
Service Level:     Full-Service
Service Type:      Drive-Through
Multi-Entitlement: No
Ends:              09/25/2014
System Type:       Physical
--
Subscription Name: Awesome OS Server Basic (dc-virt)
SKU:               awesomeos-server-basic-vdc
Pool ID:           8ac6a36241539ee4014153a224ee14d0
Available:         5
Suggested:         1
Service Level:     Full-Service
Service Type:      Drive-Through
Multi-Entitlement: No
Ends:              09/25/2014
System Type:       Physical
--
Subscription Name: Awesome OS Server Basic (dc-virt)
SKU:               awesomeos-server-basic-vdc
Pool ID:           8ac6a36241539ee4014154a3748d164e
Available:         Unlimited
Suggested:         1
Service Level:     Full-Service
Service Type:      Drive-Through
Multi-Entitlement: No
Ends:              09/25/2014
System Type:       Virtual
[root@localhost ~]# subscription-manager attach --pool 8ac6a36241539ee4014154a3748d164e
Successfully attached a subscription for: Awesome OS Server Basic (dc-virt)
[root@localhost ~]# cd /etc/pki/entitlement/
[root@localhost entitlement]# rct cc 390180850599649234.pem | more

+-------------------------------------------+
	Entitlement Certificate
+-------------------------------------------+

Certificate:
	Path: 390180850599649234.pem
	Version: 1.0
	Serial: 390180850599649234
	Start Date: 2013-09-25 00:00:00+00:00
	End Date: 2014-09-25 00:00:00+00:00
	Pool ID: Not Available

Subject:
	CN: 8ac6a36241539ee4014155246c031679

Issuer:
	C: US
	CN: 10.70.35.226
	L: Raleigh

Product:
	ID: 37060
	Name: Awesome OS Server Bits
	Version: 6.1
	Arch: ALL
	Tags: 
	Brand Type: 

Order:
	Name: Awesome OS Server Basic (dc-virt)
	Number: order-8675309
	SKU: awesomeos-server-basic-vdc
	Contract: 0
	Account: 12331131231
	Service Level: Full-Service
	Service Type: Drive-Through
	Quantity: -1  ------> Quantity value in Negative digit
	Quantity Used: 1
	Socket Limit: 2
	RAM Limit: 
	Core Limit: 
	Virt Only: 1
	Subscription: 


Actual results:
Observed that  the Quantity value was displayed as  "-1" instead of 'unlimited' in the entitlement cert

Expected results:
should be displayed as "Unlimited"

Additional info:

pool Details 
 curl -k -u admin:admin https://10.70.35.226:8443/candlepin/pools/8ac6a36241539ee4014155246c031679 | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    86    0    86    0     0    225      0 --:--:-- --:--:-- --:--:--   225
{
    "displayMessage": "Pool with id 8ac6a36241539ee4014155246c031679 could not be found."
}
[root@localhost entitlement]# curl -k -u admin:admin https://10.70.35.226:8443/candlepin/pools/8ac6a36241539ee4014154a3748d164e | python -mjson.tool 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4318    0  4318    0     0  18874      0 --:--:-- --:--:-- --:--:-- 19022
{
    "accountNumber": "12331131231",
    "activeSubscription": true,
    "attributes": [
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e1650",
            "name": "requires_consumer_type",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "system"
        },
        {
            "created": "2013-09-25T10:21:40.365+0000",
            "id": "8ac6a36241539ee4014154a3748d164f",
            "name": "requires_host",
            "updated": "2013-09-25T10:21:40.365+0000",
            "value": "88d8b6ff-136a-4460-a829-f72ccaf7b684"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e1651",
            "name": "source_pool_id",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "8ac6a36241539ee4014153a2235e148c"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e1653",
            "name": "pool_derived",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "true"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e1652",
            "name": "virt_only",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "true"
        }
    ],
    "calculatedAttributes": {},
    "consumed": 2,
    "contractNumber": "0",
    "created": "2013-09-25T10:21:40.365+0000",
    "derivedProductAttributes": [],
    "derivedProductId": null,
    "derivedProductName": null,
    "derivedProvidedProducts": [],
    "endDate": "2014-09-25T00:00:00.000+0000",
    "exported": 0,
    "href": "/pools/8ac6a36241539ee4014154a3748d164e",
    "id": "8ac6a36241539ee4014154a3748d164e",
    "orderNumber": "order-8675309",
    "owner": {
        "displayName": "Admin Owner",
        "href": "/owners/admin",
        "id": "8ac6a36241539ee40141539f61f20026",
        "key": "admin"
    },
    "productAttributes": [
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e1654",
            "name": "support_type",
            "productId": "awesomeos-server-basic-vdc",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "Drive-Through"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e1655",
            "name": "sockets",
            "productId": "awesomeos-server-basic-vdc",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "2"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e1656",
            "name": "skip_subs",
            "productId": "awesomeos-server-basic-vdc",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "true"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e1657",
            "name": "arch",
            "productId": "awesomeos-server-basic-vdc",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "x86_64,x86,s390x,ppc64,ia64,arm"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e1658",
            "name": "cores",
            "productId": "awesomeos-server-basic-vdc",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "4"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e1659",
            "name": "support_level",
            "productId": "awesomeos-server-basic-vdc",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "Full-Service"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e165a",
            "name": "ram",
            "productId": "awesomeos-server-basic-vdc",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "2"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e165b",
            "name": "variant",
            "productId": "awesomeos-server-basic-vdc",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "ALL"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e165c",
            "name": "type",
            "productId": "awesomeos-server-basic-vdc",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "MKT"
        },
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e165d",
            "name": "version",
            "productId": "awesomeos-server-basic-vdc",
            "updated": "2013-09-25T10:21:40.366+0000",
            "value": "0.1"
        }
    ],
    "productId": "awesomeos-server-basic-vdc",
    "productName": "Awesome OS Server Basic (dc-virt)",
    "providedProducts": [
        {
            "created": "2013-09-25T10:21:40.366+0000",
            "id": "8ac6a36241539ee4014154a3748e165e",
            "productId": "37060",
            "productName": "Awesome OS Server Bits",
            "updated": "2013-09-25T10:21:40.366+0000"
        }
    ],
    "quantity": -1,
    "restrictedToUsername": null,
    "sourceConsumer": {
        "href": "/consumers/88d8b6ff-136a-4460-a829-f72ccaf7b684",
        "id": "8ac6a36241539ee40141549c8dd015f0",
        "name": "rehanatestmachine.usersys.redhat.com",
        "uuid": "88d8b6ff-136a-4460-a829-f72ccaf7b684"
    },
    "sourceEntitlement": {
        "href": "/entitlements/8ac6a36241539ee4014154a3748c164d",
        "id": "8ac6a36241539ee4014154a3748c164d"
    },
    "sourceStackId": null,
    "startDate": "2013-09-25T00:00:00.000+0000",
    "subscriptionId": "8ac6a36241539ee4014153a0e0670182",
    "subscriptionSubKey": null,
    "updated": "2013-09-25T12:42:32.323+0000"
}

Comment 2 Carter Kozak 2013-09-26 19:53:18 UTC
commit 7554c869608a0276151993d34fee4ddb54185f7a
Author: ckozak <ckozak>
Date:   Wed Sep 25 09:56:52 2013 -0400

    1011961: -1 quantity is printed as unlimited

Comment 5 John Sefler 2013-10-03 23:31:50 UTC
Verifying Version....
[root@jsefler-6 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.28-1
subscription-manager: 1.9.8-1.el6
python-rhsm: 1.9.6-1.el6

[root@jsefler-6 ~]# subscription-manager list --available | grep Unlimited -B4
Subscription Name: Awesome OS with unlimited virtual guests
Provides:          Awesome OS Server Bits
SKU:               awesomeos-virt-unlimited
Pool ID:           8a9087404175311a01417531e17d0aca
Available:         Unlimited
--
Subscription Name: Awesome OS with unlimited virtual guests
Provides:          Awesome OS Server Bits
SKU:               awesomeos-virt-unlimited
Pool ID:           8a9087404175311a01417531e2430b2c
Available:         Unlimited
[root@jsefler-6 ~]# subscription-manager attach --pool 8a9087404175311a01417531e17d0aca --pool 8a9087404175311a01417531e2430b2c
Successfully attached a subscription for: Awesome OS with unlimited virtual guests
Successfully attached a subscription for: Awesome OS with unlimited virtual guests
[root@jsefler-6 ~]# ls /etc/pki/entitlement/*.pem | grep -v key
/etc/pki/entitlement/1726391033151455130.pem
/etc/pki/entitlement/3560040616902373949.pem
[root@jsefler-6 ~]# rct cat-cert /etc/pki/entitlement/1726391033151455130.pem | grep Order: -A18
Order:
	Name: Awesome OS with unlimited virtual guests
	Number: order-8675309
	SKU: awesomeos-virt-unlimited
	Contract: 0
	Account: 12331131231
	Service Level: 
	Service Type: 
	Quantity: Unlimited        <============= VERIFIED
	Quantity Used: 1
	Socket Limit: 
	RAM Limit: 
	Core Limit: 
	Virt Only: True
	Subscription: 
	Stacking ID: 
	Warning Period: 0
	Provides Management: False

[root@jsefler-6 ~]# rct cat-cert /etc/pki/entitlement/3560040616902373949.pem | grep Order: -A18
Order:
	Name: Awesome OS with unlimited virtual guests
	Number: order-8675309
	SKU: awesomeos-virt-unlimited
	Contract: 1
	Account: 12331131231
	Service Level: 
	Service Type: 
	Quantity: Unlimited        <============= VERIFIED
	Quantity Used: 1
	Socket Limit: 
	RAM Limit: 
	Core Limit: 
	Virt Only: True
	Subscription: 
	Stacking ID: 
	Warning Period: 0
	Provides Management: False

[root@jsefler-6 ~]# 


VERIFIED: rct cat-cert tool now reports the Order quantity from an entitlement granted from a pool with unlimited quantity as "Unlimited" instead of "-1".

Comment 6 errata-xmlrpc 2013-11-21 21:30:23 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.

http://rhn.redhat.com/errata/RHBA-2013-1659.html


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