Bug 746264
| Summary: | “exception caught in subscription-manager” while using config remove | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | spandey |
| Component: | subscription-manager | Assignee: | Bryan Kearney <bkearney> |
| Status: | CLOSED ERRATA | QA Contact: | IDM QE LIST <seceng-idm-qe-list> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 5.7 | CC: | alikins, jmolet, jsefler, kbanerje, skallesh, spandey, wpoteat |
| Target Milestone: | beta | ||
| Target Release: | 5.8 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
No description necessary
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-02-21 06:42:09 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 715031 | ||
In the logs:
2011-10-14 12:23:53,625 [ERROR] @managercli.py:65 - exception caught in subscription-manager
2011-10-14 12:23:53,625 [ERROR] @managercli.py:66 - No section: '--server'
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 78, in <module>
sys.exit(abs(main() or 0))
File "/usr/sbin/subscription-manager", line 69, in main
return managercli.CLI().main()
File "/home/bkearney/code/subscription-manager/src/subscription_manager/managercli.py", line 1370, in main
cmd.main()
File "/home/bkearney/code/subscription-manager/src/subscription_manager/managercli.py", line 233, in main
self._do_command()
File "/home/bkearney/code/subscription-manager/src/subscription_manager/managercli.py", line 1126, in _do_command
self._validate_options()
File "/home/bkearney/code/subscription-manager/src/subscription_manager/managercli.py", line 1118, in _validate_options
for key, value in cfg.items(section):
File "/usr/lib/python2.7/site-packages/iniparse/compat.py", line 259, in items
raise NoSectionError(section)
NoSectionError: No section: '--server'
*** Bug 747024 has been marked as a duplicate of this bug. *** The following branch commits by alikins fix this bug... RHEL6.2 branch commit ed5f1172f33db33e97cbc5a6d3fe10ee97039557 by Adrian Likins master branch commit bc4d620ae1a475a15cd89dcbc20742e2d45a9d79 by Adrian Likins 747024: restore previous behaviour for unhandled exceptions As part of the change to handle unicode strings in error messages, handle exception was changed to just pass in handle_exceptions passed in msg. This changed behaviour for some error cases, so return that, but ignore msgs passed to systemExit that do not have string reprs. Verifying Version... [root@jsefler-onprem-62server ~]# rpm -q subscription-manager subscription-manager-0.96.17-1.el6.x86_64 [root@jsefler-onprem-62server ~]# subscription-manager config --help | grep remove List, set, or remove the configuration parameters in use by this machine. --remove=REMOVE remove configuration entry by section.name [root@jsefler-onprem-62server ~]# subscription-manager config --remove --server.hostname=10.65.193.160 No section: '--server' ^^^^^^^^^^^^^^^^^^^^^^ This is the correct expected result because option --remove takes a value and "--server" is the following value for which there is no section in rhsm.conf by that name. Changing the order of the options will correctly achieve the result spandey was looking for in comment 0... [root@jsefler-onprem-62server ~]# subscription-manager config --server.hostname=10.65.193.160 --remove Usage: subscription-manager config [OPTIONS] subscription-manager: error: --remove option requires an argument moving to VERIFIED
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
No description necessary
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. http://rhn.redhat.com/errata/RHBA-2012-0154.html |
Description of problem: Version-Release number of selected component (if applicable): How reproducible: 3/3 Prerequisites: Rhel6.2 client with following rpm subscription-manager-firstboot-0.96.15-1.el6.x86_64 . subscription-manager-gnome-0.96.15-1.el6.x86_64. subscription-manager-0.96.15-1.el6.x86_64 . Steps to Repro : Execute Following command on client console subscription-manager config --remove --server.hostname=10.65.193.160 Expected Result : Usage should display for config. Actual Result : [root@rhel62beta ~]# subscription-manager config --remove --server.hostname=10.65.193.160 exception caught in subscription-manager rhsm.log 2011-10-14 12:20:09,561 [INFO] @connection.py:350 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False 2011-10-14 12:20:09,563 [DEBUG] @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/ 2011-10-14 12:20:09,563 [DEBUG] @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-ca.pem' 2011-10-14 12:20:09,563 [DEBUG] @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem' 2011-10-14 12:20:09,564 [DEBUG] @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem' 2011-10-14 12:20:09,565 [WARNING] @connection.py:383 - Error fetching supported resources, this UEPConnection is likely not usable: 2011-10-14 12:20:09,565 [ERROR] @connection.py:385 - No such file or directory Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 376, in _load_supported_resources resources_list = self.conn.request_get("/") File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 252, in request_get return self._request("GET", method) File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 191, in _request context.load_cert(self.cert_file, keyfile=self.key_file) File "/usr/lib64/python2.6/site-packages/M2Crypto/SSL/Context.py", line 76, in load_cert m2.ssl_ctx_use_cert(self.ctx, certfile) SSLError: No such file or directory 2011-10-14 12:20:09,566 [INFO] @connection.py:362 - Connection Established: host: 10.65.193.160, port: 8443, handler: /candlepin 2011-10-14 12:20:09,566 [ERROR] @managercli.py:65 - exception caught in subscription-manager 2011-10-14 12:20:09,567 [ERROR] @managercli.py:66 - No section: '--server' Traceback (most recent call last): File "/usr/sbin/subscription-manager", line 78, in <module> sys.exit(abs(main() or 0)) File "/usr/sbin/subscription-manager", line 69, in main return managercli.CLI().main() File "/usr/share/rhsm/subscription_manager/managercli.py", line 1370, in main cmd.main() File "/usr/share/rhsm/subscription_manager/managercli.py", line 233, in main self._do_command() File "/usr/share/rhsm/subscription_manager/managercli.py", line 1126, in _do_command self._validate_options() File "/usr/share/rhsm/subscription_manager/managercli.py", line 1118, in _validate_options for key, value in cfg.items(section): File "/usr/lib/python2.6/site-packages/iniparse/compat.py", line 267, in items raise NoSectionError(section) NoSectionError: No section: '--server'