Hide Forgot
Description of problem: Can't register with activation key containing international characters. Every attempt ends with "Network error". Version-Release number of selected component (if applicable): python-rhsm-0.99.5-1 subscription-manager-0.99.9-1 Steps to Reproduce: 1. create AK with some international characters 2. try register a machine using that AK Actual results: #subscription-manager register --org ACME_Corporation --name test --activationkey ak_na_testování Network error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information.
Created attachment 570338 [details] Proposed fix for python-rhsm Problem is in names of activation keys going to url unquoted.
Thanks for the patch! 1c105e6056 master 0.99.7+
Need some info here... Are we just testing the upload of an international character through subscription-manager to candlepin? The creation of an activation key in candlepin is actually blocked gracefully to not allow international characters.... [root@jsefler-r63-server ~]# curl --stderr /dev/null --insecure --user testuser1:password --request POST --data '{"name":"ak_na_testování"}' --header 'accept: application/json' --header 'content-type: application/json' https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/activation_keys | python -m simplejson/tool { "displayMessage": "Activation key names must be alphanumeric or the characters '-' or '_'. [ak_na_testov\u00e1n\u00ed]" } ^^^ NOTE: Candlepin is not allowing international characters in the activation key anyway.
John, Correct, the fix was in python-rhsm to ensure that the character is passed up to candlepin, where a better error can be sent back down.
Re-creation of defect... [root@rhsm-compat-rhel62 ~]# rpm -q subscription-manager subscription-manager-0.96.17-1.el6.x86_64 [root@rhsm-compat-rhel62 ~]# subscription-manager register --org admin --activationkey ak_na_testování Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html [root@rhsm-compat-rhel62 ~]# Verification of fix... [root@jsefler-r63-server ~]# rpm -q subscription-manager subscription-manager-0.99.14-1.el6.x86_64 [root@jsefler-r63-server ~]# subscription-manager register --org admin --activationkey ak_na_testování Activation key 'ak_na_testování' not found for organization 'admin'. [root@jsefler-r63-server ~]# subscription-manager register --org admin --activationkey "使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó" Activation key '使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó' not found for organization 'admin'. [root@jsefler-r63-server ~]# ^^^ VERIFIED: The international characters are successfully passed to candlepin, processed by candlepin, and returned from candlepin in the form of a graceful error message.
(In reply to comment #10) oops. I forgot the include the verified versions of python-rhsm; inserted below... > Re-creation of defect... > [root@rhsm-compat-rhel62 ~]# rpm -q subscription-manager > subscription-manager-0.96.17-1.el6.x86_64 [root@rhsm-compat-rhel62 ~]# rpm -q python-rhsm python-rhsm-0.96.15-1.el6.noarch > [root@rhsm-compat-rhel62 ~]# subscription-manager register --org admin > --activationkey ak_na_testování > Invalid username or password. To create a login, please visit > https://www.redhat.com/wapps/ugc/register.html > [root@rhsm-compat-rhel62 ~]# > > Verification of fix... > [root@jsefler-r63-server ~]# rpm -q subscription-manager > subscription-manager-0.99.14-1.el6.x86_64 [root@jsefler-r63-server ~]# rpm -q python-rhsm python-rhsm-0.99.8-1.el6.noarch > [root@jsefler-r63-server ~]# subscription-manager register --org admin > --activationkey ak_na_testování > Activation key 'ak_na_testování' not found for organization 'admin'. > [root@jsefler-r63-server ~]# subscription-manager register --org admin > --activationkey "使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó" > Activation key '使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó' not found for organization 'admin'. > [root@jsefler-r63-server ~]# > > > ^^^ VERIFIED: The international characters are successfully passed to > candlepin, processed by candlepin, and returned from candlepin in the form of a > graceful error message.
[root@brain ~]# rpm -q python-rhsm python-rhsm-0.99.8-1.el6.noarch [root@brain ~]# rpm -q subscription-manager subscription-manager-0.99.14-1.el6.x86_64 katello-headpin-all-0.1.145-1.el6.noarch [root@brain ~]# subscription-manager register --org ACME_Corporation --activationkey ak_na_testování The system has been registered with id: f53ef976-e641-4e68-bba2-48d1ec58824e [root@brain ~]# subscription-manager unregister System has been un-registered. [root@brain ~]# subscription-manager register --org ACME_Corporation --activationkey "使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó" The system has been registered with id: 0609126c-d347-4edb-9d25-3fc9827f66a5 VERIFIED
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-0805.html