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 1136056 - Unable to unregister with subscription-manager < 0.96 (RHEL 6.1, RHEL 5.7)
Summary: Unable to unregister with subscription-manager < 0.96 (RHEL 6.1, RHEL 5.7)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Martin Bacovsky
QA Contact: Tazim Kolhar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker
TreeView+ depends on / blocked
 
Reported: 2014-09-01 14:37 UTC by Martin Bacovsky
Modified: 2017-02-23 21:00 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:15:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 7322 0 None None None 2016-04-22 16:14:56 UTC
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Description Martin Bacovsky 2014-09-01 14:37:13 UTC
Description of problem:

System is unable to unregiter via older subcription-manager (probably < 0.96)

On RHEL 5.7:
# subscription-manager unregister
Traceback (most recent call last):
  File "/usr/lib64/python2.4/logging/handlers.py", line 71, in emit
    if self.shouldRollover(record):
  File "/usr/lib64/python2.4/logging/handlers.py", line 149, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format
    return fmt.format(record)
  File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.4/logging/__init__.py", line 272, in getMessage
    msg = str(self.msg)
AttributeError: RemoteServerException instance has no attribute 'args'
Remote server error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information.

On RHEL 6.1 the output was different, but the issue on the server was the same.

In server production.log

Error occurred while parsing request parameters.
Contents:



NoMethodError (undefined method `each' for nil:NilClass):
  lib/middleware/catch_json_parse_errors.rb:9:in `call'



From the investigation it seems that rhsm sends some whitespaces instead of empty body which causes parsing error. 



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 unregister


Actual results:
Traceback (see above)

Expected results:
Information that the system was unregistered

Additional info:

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

Comment 3 Mike McCune 2014-09-02 14:29:11 UTC

*** This bug has been marked as a duplicate of bug 1136071 ***

Comment 4 Mike McCune 2014-09-02 14:57:55 UTC
Was a bit too eager in my closing this as a dupe, both bugs do track different issues but are solved by the upstream PR

https://github.com/Katello/katello/pull/4632

Comment 5 Martin Bacovsky 2014-09-02 15:06:44 UTC
Just one small correction - the upstream PR (https://github.com/Katello/katello/pull/4632) fixes just this bug.

Comment 6 Bryan Kearney 2014-09-19 12:05:00 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7322 has been closed
-------------
Anonymous
Applied in changeset commit:katello|80c831922c417ff9b3c8e52e983dee12a5f64730.

Comment 7 Brad Buckingham 2014-09-22 13:25:41 UTC
Workaround: upgrade subscription-manager to newer version

Comment 8 Tazim Kolhar 2014-11-21 11:11:05 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 9 Bryan Kearney 2014-11-21 13:04:17 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7322 has been closed
-------------
Anonymous
Applied in changeset commit:katello|80c831922c417ff9b3c8e52e983dee12a5f64730.

Comment 12 Tazim Kolhar 2015-03-11 08:23:34 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 13 Bryan Kearney 2015-08-11 13:34:54 UTC
This bug is slated to be released with Satellite 6.1.

Comment 14 errata-xmlrpc 2015-08-12 05:15:51 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://access.redhat.com/errata/RHSA-2015:1592


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