Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1162058 - subscription-manager cmd doesn't recognize the org name while register a host
Summary: subscription-manager cmd doesn't recognize the org name while register a host
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Subscription Management
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: Unspecified
Assignee: Katello Bug Bin
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-10 07:18 UTC by Sachin Ghai
Modified: 2017-02-23 20:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-09 10:23:21 UTC


Attachments (Terms of Use)
unable to register a content-host via subscrition-manager (deleted)
2014-11-10 07:20 UTC, Sachin Ghai
no flags Details

Description Sachin Ghai 2014-11-10 07:18:04 UTC
Description of problem:
I created a org with utf8 characters and trying to register content host with subscription-manager cmd and it says:

Couldn't find Organization '﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑'.

[root@53424912 ~]# subscription-manager orgs 
Username: admin
Password: 
+-------------------------------------------+
          admin Organizations
+-------------------------------------------+

Name: ﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑
Key:  aa47e73c-aa27-41cc-a160-73953c19ef22

Name: Default Organization
Key:  Default_Organization

[root@53424912 ~]# subscription-manager register --activationkey qpbxmuhmCx --org '﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑' --force
Couldn't find Organization '﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑'.
[root@53424912 ~]# LANG='en_US.UTF-8' subscription-manager register --activationkey qpbxmuhmCx --org '﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑' --force
Couldn't find Organization '﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑'.


Initially, I thought the problem is only with utf8 char in org name. But later I tried to register same host with Default Organization and found same.

[root@53424912 ~]# subscription-manager register --activationkey qpbxmuhmCx --org "Default Organization" --force
Couldn't find Organization 'Default Organization'.


Version-Release number of selected component (if applicable):
Client:
====

[root@53424912 ~]# rpm -qa | grep subscription-manager
subscription-manager-1.9.11-1.el6.x86_64
[root@53424912 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)
[root@53424912 ~]# 

server:
======
* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.34-1.el6.noarch
* candlepin-common-1.0.10-1.el6.noarch
* candlepin-selinux-0.9.34-1.el6.noarch
* candlepin-tomcat6-0.9.34-1.el6.noarch
* elasticsearch-0.90.10-7.el6.noarch
* foreman-1.8.0-0.develop.201411061325git3a05c53.el6.noarch
* foreman-compute-1.8.0-0.develop.201411061325git3a05c53.el6.noarch
* foreman-gce-1.8.0-0.develop.201411061325git3a05c53.el6.noarch
* foreman-libvirt-1.8.0-0.develop.201411061325git3a05c53.el6.noarch
* foreman-ovirt-1.8.0-0.develop.201411061325git3a05c53.el6.noarch
* foreman-postgresql-1.8.0-0.develop.201411061325git3a05c53.el6.noarch
* foreman-proxy-1.8.0-0.develop.201411061038gitc422820.el6.noarch
* foreman-release-1.8.0-0.develop.201411061325git3a05c53.el6.noarch
* foreman-selinux-1.8.0-0.develop.201410280941git10de1c5.el6.noarch
* foreman-vmware-1.8.0-0.develop.201411061325git3a05c53.el6.noarch
* katello-2.1.0-1.201411061509gitb0b8f43.el6.noarch
* katello-certs-tools-2.0.1-1.el6.noarch
* katello-default-ca-1.0-1.noarch
* katello-installer-2.1.0-1.201411031727git3c50b79.el6.noarch
* katello-repos-2.1.1-1.el6.noarch
* katello-server-ca-1.0-1.noarch
* openldap-2.4.23-32.el6_4.1.x86_64
* pulp-docker-plugins-0.2.1-0.2.beta.el6.noarch
* pulp-katello-0.3-3.el6.noarch
* pulp-nodes-common-2.5.0-0.7.beta.el6.noarch
* pulp-nodes-parent-2.5.0-0.7.beta.el6.noarch
* pulp-puppet-plugins-2.5.0-0.7.beta.el6.noarch
* pulp-puppet-tools-2.5.0-0.7.beta.el6.noarch
* pulp-rpm-plugins-2.5.0-0.7.beta.el6.noarch
* pulp-selinux-2.5.0-0.7.beta.el6.noarch
* pulp-server-2.5.0-0.7.beta.el6.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.3.2-1.el6.noarch
* ruby193-rubygem-net-ldap-0.3.1-2.el6.noarch
* ruby193-rubygem-runcible-1.3.0-1.el6.noarch
* rubygem-hammer_cli-0.1.3-1.201410291418git07da5ed.el6.noarch
* rubygem-hammer_cli_foreman-0.1.3-1.201410151235gitbc8c449.el6.noarch
* rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410gitc96619d.git.0.37f3704.el6.noarch
* rubygem-hammer_cli_import-0.10.4-1.el6.noarch
* rubygem-hammer_cli_katello-0.0.6-1.201411061533git2a26916.git.0.8d3ded9.el6.noarch



How reproducible:
always

Steps to Reproduce:
1. create org with utf8 char
2. register a host using subscription-manager command with org created in step1
3.

Actual results:
[root@53424912 ~]# subscription-manager orgs 
Username: admin
Password: 
+-------------------------------------------+
          admin Organizations
+-------------------------------------------+

Name: ﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑
Key:  aa47e73c-aa27-41cc-a160-73953c19ef22

Name: Default Organization
Key:  Default_Organization

[root@53424912 ~]# subscription-manager register --activationkey qpbxmuhmCx --org '﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑' --force
Couldn't find Organization '﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑'.
[root@53424912 ~]# LANG='en_US.UTF-8' subscription-manager register --activationkey qpbxmuhmCx --org '﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑' --force
Couldn't find Organization '﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑'.

[root@53424912 ~]# subscription-manager register --username admin --password changeme --org "Default Organization" --force
Couldn't find Organization 'Default Organization'.


Expected results:
host should register

Additional info:

rhsm logs:
==========
[root@53424912 ~]# tail -f /var/log/rhsm/rhsm.log 
    installed_products=self.installed_mgr.format_for_server())
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 722, in registerConsumer
    return self.conn.request_post(url, params)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 544, in request_post
    return self._request("POST", method, params)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 469, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 511, in validateResponse
    raise RestlibException(response['status'], error_msg)
RestlibException: Couldn't find Organization '﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑'.

Comment 1 Sachin Ghai 2014-11-10 07:20:58 UTC
Created attachment 955688 [details]
unable to register a content-host via subscrition-manager

Comment 2 RHEL Product and Program Management 2014-11-10 07:32:52 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Sachin Ghai 2014-11-10 07:39:23 UTC
Later, I realized from help text of subscription-manager orgs cmd that now it accepts the Org_key instead of name.

[root@53424912 ~]# subscription-manager orgs --username admin --password changeme
+-------------------------------------------+
          admin Organizations
+-------------------------------------------+

Name: ﷐[U+B9346]﷑﷐[U+58AF8]﷑﷐[U+74C60]﷑﷐[U+10728C]﷑﷐[U+D7219]﷑﷐[U+7C927]﷑﷐[U+B9CB6]﷑﷐[U+E3676]﷑﷐[U+C5A5B]﷑ꙟ﷐[U+321D8]﷑﷐[U+E176A]﷑﷐[U+33856]﷑﷐[U+C0E3B]﷑﷐[U+C3908]﷑﷐[U+244EC]﷑﷐[U+66B8A]﷑﷐[U+2CF7C]﷑
Key:  aa47e73c-aa27-41cc-a160-73953c19ef22

Name: Default Organization
Key:  Default_Organization

[root@53424912 ~]# subscription-manager register --username admin --password changeme --org "Default_Organization"
The system has been registered with ID: b69cacf2-c058-4fdb-b85e-0bce3ad18038 

[root@53424912 ~]# subscription-manager register --username admin --password changeme --org "aa47e73c-aa27-41cc-a160-73953c19ef22" --force
The system with UUID b69cacf2-c058-4fdb-b85e-0bce3ad18038 has been unregistered
The system has been registered with ID: e13f1d58-f0cf-4d64-bbf7-0928d7298455 
[root@53424912 ~]# 


I'll close this bz as soon as I get the confirmation that its a intended change.

Comment 5 Bryan Kearney 2014-11-21 16:24:26 UTC
Sachin, did you get the information from the mailing list discussion.

Comment 6 Sachin Ghai 2015-01-09 10:23:21 UTC
From mailing list, I got to know that --org always expect "key". So based on that fact closing this bz. Thanks


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