Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1354665 - subscription-manager list --available --matches="CONTENT" is not finding matches on valid Repo ID or Name
Summary: subscription-manager list --available --matches="CONTENT" is not finding matc...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.9.54
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: candlepin-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-11 22:15 UTC by John Sefler
Modified: 2016-07-14 19:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-14 19:15:07 UTC


Attachments (Terms of Use)

Description John Sefler 2016-07-11 22:15:50 UTC
Description of problem:

There is a --matches option in the subscription-manager list module that will search several fields on available/consumed subscriptions/pools.  My understanding is that two of the fields that candlepin will search for a match are the content set Names and Labels/ID.

Testing of this feature appears to be working against candlepin-2 with TESTDATA deployed, but testing against the current version in stage does not appear to be working.  Need advice on what to expect from currently active candlepin versions.


Version-Release number of selected component (if applicable):
[root@jsefler-rhel7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.51.15-1  <======== OFFENDING STAGE VERSION
subscription management rules: 5.15.1
subscription-manager: 1.17.8-1.el7
python-rhsm: 1.17.5-1.el7


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel7 ~]# subscription-manager register --serverurl=subscription.rhsm.stage.redhat.com:443/subscription --username=stage_auto_testuser1 --auto-attach
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: 609b8eba-8ddd-46d7-a62e-965e9f3203e4 

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@jsefler-rhel7 ~]# subscription-manager repos --list-enabled
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-sap-for-rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux for SAP (RHEL 7 Server) (RPMs)
Repo URL:  https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/sap/os
Enabled:   1

Repo ID:   rhel-7-server-rpms
Repo Name: Red Hat Enterprise Linux 7 Server (RPMs)
Repo URL:  https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/os
Enabled:   1


[root@jsefler-rhel7 ~]# subscription-manager list --consumed --matches="rhel-7-server-rpms"
No consumed subscription pools were found matching the expression "rhel-7-server-rpms".

BANG! Would have expected that to return the currently consumed subscription that provided the entitlement that repo id "rhel-7-server-rpms" came from.


[root@jsefler-rhel7 ~]# subscription-manager list --consumed --matches="Red Hat Enterprise Linux 7 Server (RPMs)"
No consumed subscription pools were found matching the expression "Red Hat Enterprise Linux 7 Server (RPMs)".

BANG! Would have expected that to return the currently consumed subscription that provided the entitlement that repo name "Red Hat Enterprise Linux 7 Server (RPMs)" came from.


[root@jsefler-rhel7 ~]# subscription-manager remove --all
1 subscription removed at the server.
1 local certificate has been deleted.


[root@jsefler-rhel7 ~]# subscription-manager list --available --matches="rhel-7-server-rpms"
No available subscription pools were found matching the expression "rhel-7-server-rpms".

BANG! Would have expected that to return a currently available subscription that provides a product with a content set that matches repo id "rhel-7-server-rpm".


[root@jsefler-rhel7 ~]# subscription-manager list --available --matches="Red Hat Enterprise Linux 7 Server (RPMs)"
No available subscription pools were found matching the expression "Red Hat Enterprise Linux 7 Server (RPMs)".

BANG! Would have expected that to return a currently available subscription that provides a product with a content set that matches repo name "Red Hat Enterprise Linux 7 Server (RPMs)".


Actual results:
  above

Expected results:
  expected subscription-manager list --consumed --matches="<REPO_ID>" to work
  expected subscription-manager list --consumed --matches="<REPO_NAME>" to work
  expected subscription-manager list --available --matches="<REPO_ID>" to work
  expected subscription-manager list --available --matches="<REPO_NAME>" to work



Additional info:


[root@jsefler-rhel7 ~]# tail -f /var/log/rhsm/rhsm.log

2016-07-11 18:05:57,474 [DEBUG] subscription-manager:22635 @connection.py:573 - Making request: GET /subscription/owners/7964055/pools?consumer=609b8eba-8ddd-46d7-a62e-965e9f3203e4&matches=rhel-7-server-rpms
2016-07-11 18:05:59,076 [DEBUG] subscription-manager:22635 @connection.py:602 - Response: status=200, requestUuid=f6e30d4c-f6e1-4297-9dae-1d3f428c2701
2016-07-11 18:05:59,078 [DEBUG] subscription-manager:22635 @managerlib.py:540 - Filtering 0 total pools
2016-07-11 18:05:59,078 [DEBUG] subscription-manager:22635 @managerlib.py:546 -         Removed 0 incompatible pools
2016-07-11 18:05:59,078 [DEBUG] subscription-manager:22635 @managerlib.py:579 -         0 pools to display, 0 filtered out




2016-07-11 18:06:26,856 [DEBUG] subscription-manager:22678 @connection.py:573 - Making request: GET /subscription/owners/7964055/pools?consumer=609b8eba-8ddd-46d7-a62e-965e9f3203e4&matches=Red+Hat+Enterprise+Linux+7+Server+%28RPMs%29
2016-07-11 18:06:34,396 [DEBUG] subscription-manager:22678 @connection.py:602 - Response: status=200, requestUuid=4165efe1-1366-4f8f-b946-8fb0edfa007c
2016-07-11 18:06:34,397 [DEBUG] subscription-manager:22678 @managerlib.py:540 - Filtering 0 total pools
2016-07-11 18:06:34,397 [DEBUG] subscription-manager:22678 @managerlib.py:546 -         Removed 0 incompatible pools
2016-07-11 18:06:34,397 [DEBUG] subscription-manager:22678 @managerlib.py:579 -         0 pools to display, 0 filtered out

Comment 1 vritant 2016-07-14 19:15:07 UTC
This is currently not supported in candlepin 0.9.X . 
This was probably introduced in candlepin-2.0.4-1 ( db5801ea )


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