Bug 836575
Summary: | 'ascii' codec error while assigning role to user | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Hayk Hovsepyan <hhovsepy> |
Component: | Hammer | Assignee: | Ivan Necas <inecas> |
Status: | CLOSED ERRATA | QA Contact: | Hayk Hovsepyan <hhovsepy> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.1 | CC: | asettle, bkearney, dmacpher, inecas, jrist, omaciel, snansi |
Target Milestone: | Unspecified | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
The command line interface for assigning a role to a username that contained special characters resulted in an decoding error. This is due to improper handling of JSON data to the CLI. This fix corrects the CLI handling to include and decode JSON correctly. Special characters are now display correctly without error.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2012-12-04 19:47:04 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Hayk Hovsepyan
2012-06-29 14:41:22 UTC
After looking deeper into the code, here is the real cause of the issue: Katello API is returning plain text informing about the status in plain text, but sending it with "Content-Type: application/json". For this reason katello client doesn't handle the response correctly (not converting it into unicode). The CLI handling was fixed in the upstream, in commit 8503392419b57b38cfa5fbc6bfc17d6c490f4c6e. However the main cause (wrong content-type) is still there as well. It affects only actions, that take plain response from the server and print it directly to the stdout. I can not reproduce this error, but will add the code anbout returning json to the backlog. [root@ktdev ~]# katello -u admin -p admin user create --username "Mané" --password "testing" --email "root@localhost" Successfully created user [ Mané ] [root@ktdev ~]# katello --username admin --password admin user assign_role --username Mané --role Administrator User 'Mané' assigned to role 'Administrator' [root@ktdev ~]# katello --username admin --password admin user unassign_role --username Mané --role Administrator User 'Mané' unassigned from role 'Administrator' Verified on revision: katello-certs-tools-1.1.8-1.el6cf.noarch katello-glue-pulp-1.1.12-9.el6cf.noarch katello-qpid-broker-key-pair-1.0-1.noarch katello-agent-1.1.2-1.el6cf.noarch katello-configure-1.1.9-4.el6cf.noarch katello-glue-candlepin-1.1.12-9.el6cf.noarch katello-candlepin-cert-key-pair-1.0-1.noarch katello-selinux-1.1.1-1.el6cf.noarch katello-common-1.1.12-9.el6cf.noarch katello-1.1.12-9.el6cf.noarch katello-qpid-client-key-pair-1.0-1.noarch katello-cli-common-1.1.8-5.el6cf.noarch katello-cli-1.1.8-5.el6cf.noarch pulp-selinux-server-1.1.12-1.el6cf.noarch katello-glue-pulp-1.1.12-9.el6cf.noarch pulp-common-1.1.12-1.el6cf.noarch python-isodate-0.4.4-4.pulp.el6.noarch pulp-1.1.12-1.el6cf.noarch m2crypto-0.21.1.pulp-7.el6.x86_64 python-oauth2-1.5.170-2.pulp.el6.noarch mod_wsgi-3.3-3.pulp.el6.x86_64 Now it works correctly and does not show any error. Tested by scenarios in description. 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/RHSA-2012-1543.html getting rid of 6.0.0 version since that doesn't exist |