Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1156627

Summary: subscription-manager list --consumed --servicelevel="" no longer matches null/absent support_level
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: dgoodwin, dlah, jsefler, skallesh, wpoteat
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.13.9-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 13:15:50 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: 1005618    

Description John Sefler 2014-10-24 20:10:24 UTC
Description of problem:
For consumed subscription pools that have no "support_level" among its productAttributes, a call to subscription-manager list --consumed --service="" used to successfully list the consumed subscriptions that had no service level,  Now the filtered list returned is empty.

I suspect that commit be815d04d1722dd8fd40a23c0a7847e97e689f89 is the culprit.


Version-Release number of selected component (if applicable):
[root@jsefler-os7 ~]# rpm -q subscription-manager
subscription-manager-1.13.6-1.git.0.7c3a315.el7.x86_64


How reproducible:


Steps to Reproduce:
With the TESTDATA deployed on a standalone candlepin server...
[root@jsefler-os7 ~]# subscription-manager register --serverurl=jsefler-os-candlepin.usersys.redhat.com:8443/candlepin
Username: testuser1
Password: 
Organization: admin
The system has been registered with ID: 003c7448-c7ed-4d85-8968-0719b83f4b1f 
[root@jsefler-os7 ~]# subscription-manager list --avail  | egrep "Pool ID:|Service Level:"
<snip>
Pool ID:           2c90af8b49435579014943590d8c1432
Service Level:     Super
Pool ID:           2c90af8b494355790149435914d717f3
Service Level:     None
Pool ID:           2c90af8b4943557901494359113a160e
Service Level:     Premium
Pool ID:           2c90af8b494355790149435902da0ee8   <==== ATTACH THIS
Service Level:     
[root@jsefler-os7 ~]# subscription-manager attach --pool 2c90af8b494355790149435902da0ee8
Successfully attached a subscription for: Awesome OS for All Arch (excpt for x86_64 content)
[root@jsefler-os7 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS for All Arch (excpt for x86_64 content)
Provides:          Awesome OS for All Arch (excpt for x86_64 content) Bits
SKU:               awesomeos-all-no-86_64-cont
Contract:          3
Account:           12331131231
Serial:            1975349673534194789
Pool ID:           2c90af8b494355790149435902da0ee8
Active:            True
Quantity Used:     1
Service Level:                 <======= NOTICE NO SUPPORT LEVEL AS EXPECTED
Service Type:      
Status Details:    
Subscription Type: Stackable
Starts:            10/23/2014
Ends:              10/23/2015
System Type:       Physical

[root@jsefler-os7 ~]# subscription-manager list --consumed --servicelevel=""
No consumed subscription pools matching the specified criteria were found.
[root@jsefler-os7 ~]# 


Actual results:
above

Expected results:
Expected pool 2c90af8b494355790149435902da0ee8 to be listed as consumed since the requested --servicelevel=""
I don't know any other way to request no servicelevel than an empty string



Additional info:
Proof that no support_level has been defined for this pool...
[root@jsefler-os7 ~]# curl --stderr /dev/null -k -u testuser1:**** https://jsefler-os-candlepin.usersys.redhat.com:8443/candlepin/pools/2c90af8b494355790149435902da0ee8 | python -m json/tool | grep "support_level" -A3
[root@jsefler-os7 ~]#

Comment 2 Devan Goodwin 2014-11-13 19:12:10 UTC
John was this specific to list --consumed? Did you use --servicelevel "" with list available?

Comment 3 Devan Goodwin 2014-11-13 20:34:13 UTC
Fixed in subscription-manager.git master 0d0da9b15e269b30c06cc91c62a3f84fc3070f1b.

Will appear in subscription-manager-1.13.9-1.

Comment 5 Shwetha Kallesh 2014-11-24 07:01:39 UTC
Marking verified!!

[root@dhcp35-236 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.35-1
subscription management rules: 5.11
subscription-manager: 1.13.9-1.el7
python-rhsm: 1.13.8-1.el7


[root@dhcp35-236 ~]#  subscription-manager list --avail  | egrep "Pool ID:|Service Level:"
Pool ID:           8ac681e44999fb11014999fc0ba90742
Service Level:     Super
Pool ID:           8ac681e44999fb11014999fc0cbf07a1
Service Level:     Premium
Pool ID:           8ac681e44999fb11014999fc21050ca4
Service Level:     
Pool ID:           8ac681e44999fb11014999fc1c310b86
Service Level:     Layered
Pool ID:           8ac681e44999fb11014999fc53bf18d1
Service Level:     None
Pool ID:           8ac681e44999fb110149c76013be0a46
Service Level:     
Pool ID:           8ac681e44999fb11014999fc0dcc07f0
Service Level:     Premium
Pool ID:           8ac681e44999fb11014999fc1e000c0a
Service Level:     
Pool ID:           8ac681e44999fb11014999fc0f0b0830
Service Level:     Premium
Pool ID:           8ac681e44999fb11014999fc27c00e38
Service Level:     
Pool ID:           8ac681e44999fb11014999fc330b10f6
Service Level:     
    
[root@dhcp35-236 ~]# subscription-manager attach --pool 8ac681e44999fb11014999fc330b10f6
Successfully attached a subscription for: Awesome OS for All Arch (just x86_64 content)
[root@dhcp35-236 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS for All Arch (just x86_64 content)
Provides:          Awesome OS for All Arch (just x86_64 content) Bits
SKU:               awesomeos-all-just-86_64-cont
Contract:          1
Account:           12331131231
Serial:            5134470603149226321
Pool ID:           8ac681e44999fb11014999fc330b10f6
Active:            True
Quantity Used:     4
Service Level:     
Service Type:      
Status Details:    
Subscription Type: Stackable
Starts:            11/10/2014
Ends:              11/10/2015
System Type:       Physical

[root@dhcp35-236 ~]# subscription-manager list --consumed --servicelevel=""
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS for All Arch (just x86_64 content)
Provides:          Awesome OS for All Arch (just x86_64 content) Bits
SKU:               awesomeos-all-just-86_64-cont
Contract:          1
Account:           12331131231
Serial:            5134470603149226321
Pool ID:           8ac681e44999fb11014999fc330b10f6
Active:            True
Quantity Used:     4
Service Level:     
Service Type:      
Status Details:    
Subscription Type: Stackable
Starts:            11/10/2014
Ends:              11/10/2015
System Type:       Physical

Comment 7 errata-xmlrpc 2015-03-05 13:15:50 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://rhn.redhat.com/errata/RHBA-2015-0502.html