Bug 1493711 - subscription-manager list --available --matches="foobar" is failing to filter pools
Summary: subscription-manager list --available --matches="foobar" is failing to filter...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Alex Wood
QA Contact: John Sefler
Depends On:
TreeView+ depends on / blocked
Reported: 2017-09-20 18:26 UTC by John Sefler
Modified: 2018-04-10 09:52 UTC (History)
4 users (show)

Fixed In Version: subscription-manager-1.20.2-1
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2018-04-10 09:52:05 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1705 0 None closed 1493711: Fix --matches option for the list command. 2020-11-16 19:50:51 UTC
Red Hat Product Errata RHBA-2018:0681 0 None None None 2018-04-10 09:52:27 UTC

Description John Sefler 2017-09-20 18:26:56 UTC
Description of problem:
The --matches option on subscription-manager list --available is failing to filter any pools.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. register to account with available subscription pools
2. run...
[root@jsefler-rhel7 ~]# subscription-manager list --available --matches="foobar"
    Available Subscriptions
Subscription Name:   Admin OS Server Bundled (2 Sockets, Standard Support)
Provides:            Awesome OS Server Bits
                     Clustering Bits
                     Load Balancing Bits
                     Shared Storage Bits
                     Large File Support Bits
                     Management Bits
                     Admin OS Premium Architecture Bits
                     Admin OS Developer Bits
SKU:                 adminos-server-2-socket-std
Contract:            1
Pool ID:             8a90860f5e9c2769015e9c28f81201b3
Provides Management: Yes
Available:           10
Suggested:           1
Service Level:       Standard
Service Type:        L1-L3
Subscription Type:   Standard
Ends:                09/18/2018
System Type:         Physical

Actual results:
  all of the available pools are listed without any regard for --matches

Expected results:
  No available subscription pools were found matching the expression "foobar".

Additional info:

[root@jsefler-rhel7 ~]# tail -f /var/log/rhsm/rhsm.log
2017-09-20 14:22:40,089 [DEBUG] subscription-manager:11974:MainThread @connection.py:515 - Making request: GET /candlepin/owners/admin/pools?consumer=5d02bfaf-4b49-4ebc-ac52-1ee2b6bf426e
2017-09-20 14:22:40,415 [INFO] subscription-manager:11974:MainThread @connection.py:556 - Response: status=200, requestUuid=4ca6ae04-ddf5-4e0d-b208-e2aadc85aa6f, request="GET /candlepin/owners/admin/pools?consumer=5d02bfaf-4b49-4ebc-ac52-1ee2b6bf426e"
2017-09-20 14:22:40,418 [DEBUG] subscription-manager:11974:MainThread @managerlib.py:544 - Filtering 0 total pools
2017-09-20 14:22:40,418 [DEBUG] subscription-manager:11974:MainThread @managerlib.py:550 - 	Removed 0 incompatible pools
2017-09-20 14:22:40,418 [DEBUG] subscription-manager:11974:MainThread @managerlib.py:583 - 	23 pools to display, -23 filtered out

Comment 2 John Sefler 2017-09-20 19:14:29 UTC
Using git bisect, I found the offending commit for this regression behavior was...

da72dfcbbb2c3a44393edb9e46e1583d05cc140a is the first bad commit
commit da72dfcbbb2c3a44393edb9e46e1583d05cc140a
Author: Alex Wood <awood@redhat.com>
Date:   Mon Jul 31 16:29:29 2017 -0400

    Add an entitlement service and use it in the CLI and DBus.

Comment 4 Shwetha Kallesh 2017-11-07 10:57:01 UTC

[root@hp-ms-01-c02 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.2.0-1
subscription management rules: 5.26
subscription-manager: 1.20.5-1.el7

[root@hp-ms-01-c02 ~]# subscription-manager list --available --matches="foobar"
No available subscription pools were found matching the expression "foobar".

Comment 7 errata-xmlrpc 2018-04-10 09:52:05 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.


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