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:
Created redmine issue http://projects.theforeman.org/issues/7322 from this bug
*** This bug has been marked as a duplicate of bug 1136071 ***
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
Just one small correction - the upstream PR (https://github.com/Katello/katello/pull/4632) fixes just this bug.
Moving to POST since upstream bug http://projects.theforeman.org/issues/7322 has been closed ------------- Anonymous Applied in changeset commit:katello|80c831922c417ff9b3c8e52e983dee12a5f64730.
Workaround: upgrade subscription-manager to newer version
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
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.
This bug is slated to be released with Satellite 6.1.
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