Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1136071 - Unable to list available subscriptions with subscription-manager < 0.96
Summary: Unable to list available subscriptions with subscription-manager < 0.96
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Tazim Kolhar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-01 15:01 UTC by Martin Bacovsky
Modified: 2017-02-23 21:00 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 13:56:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 7321 0 None None None 2016-04-22 16:22:27 UTC

Description Martin Bacovsky 2014-09-01 15:01:07 UTC
Description of problem:

It is not possible to list available subscriptions with older subscription-manager (probably < 0.96), RHE L5.7 and RHEL 6.1 affected.

Currently the server hits https://bugzilla.redhat.com/show_bug.cgi?id=1136056 first, but when it is fixed I'm getting:

# subscription-manager list --available
Access denied

The problem is that subscription-manager is requesting wrong URL:

"GET /rhsm/pools?consumer=b9b7fd04-609c-4d5c-a382-bc0bdb5b1527 HTTP/1.1" 403 64 "-" "-"

Newer version of rhsm is requesting: 

"GET /rhsm/owners/Default_Organization/pools?consumer=412a6b2a-1627-4157-a378-de4c73f14022 HTTP/1.1" 200 60043 "-" "-"

(I was not ask for org during registration)

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

Satellite 6 6.0.4
Client: RHEL 5.7
subscription-manager-0.95.5.21-1.el5

How reproducible:
Always

Steps to Reproduce:
1. cold install 5.7 or 6.1
2. install bootstrap RPM from satellite server (http://sat6.example.com/pub/katello-ca-consumer-sat6.example.com-1.0-1.noarch.rpm)
3. subscription-manager register
4. subscription-manager list --available


Actual results:
Access denied

Expected results:
List of available subscriptions

Additional info:

Comment 1 Martin Bacovsky 2014-09-01 15:03:15 UTC
It is possible to subscribe the system using known pool id.

Comment 2 Martin Bacovsky 2014-09-01 15:13:37 UTC
Created redmine issue http://projects.theforeman.org/issues/7321 from this bug

Comment 4 Mike McCune 2014-09-02 14:29:11 UTC
*** Bug 1136056 has been marked as a duplicate of this bug. ***

Comment 5 Brad Buckingham 2014-09-22 13:24:51 UTC
Workaround: upgrade to newer subscription-manager

Comment 6 Justin Sherrill 2014-10-14 17:44:08 UTC
Works in nightly, moving to POST

Comment 7 Tazim Kolhar 2014-11-21 11:06:44 UTC
FAILEDQA:

*** This bug is verified in upstream. This fix should eventually land in future downstream builds ***

Version Tested:
# rpm -qa | grep foreman
ruby193-rubygem-foreman_hooks-0.3.7-2.el7.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410git163c264.git.0.988ca80.el7.noarch
ruby193-rubygem-foreman_abrt-0.0.4-1.el7.noarch
ruby193-rubygem-foreman_docker-0.2.0-2.el7.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2-1.el7.noarch
rubygem-hammer_cli_foreman-0.1.3-1.201411121216git9381fc5.el7.noarch
hp-dl380pgen8-02-vm-6.lab.bos.redhat.com-foreman-client-1.0-1.noarch
foreman-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-ovirt-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
ruby193-rubygem-foreman-tasks-0.6.9-1.el7.noarch
ruby193-rubygem-foreman_discovery-1.4.0-2.el7.noarch
foreman-postgresql-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-compute-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-gce-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-libvirt-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-vmware-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-selinux-1.8.0-0.develop.201410280941git10de1c5.el7.noarch
foreman-proxy-1.8.0-0.develop.201411121327gitab6edc2.el7.noarch
hp-dl380pgen8-02-vm-6.lab.bos.redhat.com-foreman-proxy-1.0-1.noarch
foreman-release-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch

# rpm -qa | grep subscription-manager
subscription-manager-0.95.11-1.el6.x86_64

# rpm -Uvh http://hp-dl380pgen8-02-vm-6.lab.bos.redhat.com/pub/katello-ca-consumer-hp-dl380pgen8-02-vm-6.lab.bos.redhat.com-1.0-1.noarch.rpm
Retrieving http://hp-dl380pgen8-02-vm-6.lab.bos.redhat.com/pub/katello-ca-consumer-hp-dl380pgen8-02-vm-6.lab.bos.redhat.com-1.0-1.noarch.rpm
Preparing...                ########################################### [100%]
   1:katello-ca-consumer-hp-########################################### [100%]

# subscription-manager register
Username: admin
Password: 
User 'admin' did not specify an organization ID and does not have a default organization.


# subscription-manager register --org="Default_Organization"
Usage: subscription-manager register [OPTIONS]

subscription-manager: error: no such option: --org

Comment 8 Justin Sherrill 2015-03-03 19:08:20 UTC
Tazim,

Notice the error:

subscription-manager: error: no such option: --org


This version of subscription manager does not support orgs or environments.  It relies on the Default Organization set for the user, and registers directly to Library.

In the current 6.1 build the user now has the default org set for him, but if not you can simply go to Administer > Users > click the user name > Organizations tab > select a default org from the drop down. You would then simply register:

subscription-manager register

without an org parameter.  Moving back on_QA.

-Justin

Comment 9 Tazim Kolhar 2015-03-11 08:59:00 UTC
VERIFIED :

# rpm -qa | grep foreman
foreman-compute-1.7.2.9-1.el6_6sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.6-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.2-1.el6_6sat.noarch
foreman-debug-1.7.2.9-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.5-1.el6_6sat.noarch
foreman-selinux-1.7.2.8-1.el6_6sat.noarch
foreman-ovirt-1.7.2.9-1.el6_6sat.noarch
foreman-libvirt-1.7.2.9-1.el6_6sat.noarch
ruby193-rubygem-foreman-redhat_access-0.0.9-1.el6_6sat.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-client-1.0-1.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch
rubygem-hammer_cli_foreman-0.1.4.6-1.el6_6sat.noarch
foreman-vmware-1.7.2.9-1.el6_6sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.8-1.el6_6sat.noarch
foreman-proxy-1.7.2.3-1.el6_6sat.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-proxy-1.0-2.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.3-1.el6_6sat.noarch
foreman-1.7.2.9-1.el6_6sat.noarch
foreman-gce-1.7.2.9-1.el6_6sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch
ruby193-rubygem-foreman-tasks-0.6.12.1-1.el6_6sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch
foreman-postgresql-1.7.2.9-1.el6_6sat.noarch
ruby193-rubygem-foreman_abrt-0.0.5-2.el6_6sat.noarch
ruby193-rubygem-foreman_docker-1.2.0.3-1.el6_6sat.noarch

$subscription-manager register --org="Default_Organization" --environment="Library" --force
Username: admin
Password: 
The system has been registered with ID: ddd5a814-284a-4702-9d9a-80beee1e627a 

$subscription-manager unregister
System has been unregistered.

Comment 10 Tazim Kolhar 2015-03-11 09:00:41 UTC
# subscription-manager list --available
No available subscription pools to list

Comment 11 Bryan Kearney 2015-08-11 13:20:00 UTC
This bug is slated to be released with Satellite 6.1.

Comment 12 Bryan Kearney 2015-08-12 13:56:11 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.


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