Bug 880710

Summary: subscription-manager problems when organization label is different than name
Product: [Retired] Subscription Asset Manager Reporter: Tom McKay <tomckay>
Component: katelloAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Tazim Kolhar <tkolhar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.2CC: bbuckingham, bkearney, cwelton, jomara, omaciel, tkolhar
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Systems can properly register with all valid organization label and names.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 19:20:32 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:
Bug Depends On: 883123    
Bug Blocks: 816564    

Description Tom McKay 2012-11-27 16:16:42 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Tom McKay 2012-11-27 16:18:54 UTC
Problem was that subscription-manager was using organization name but katello was interpreting it as the label, so if they were different registration problems would result.

Comment 2 Jordan OMara 2012-11-27 21:44:20 UTC
https://github.com/Katello/katello/pull/1126

Comment 4 Tom McKay 2012-12-03 15:40:59 UTC
In latest compose

Comment 5 Og Maciel 2012-12-03 19:11:49 UTC
While the web ui is preventing me from creating multiple orgs with the same name and/or label, it does not resolve the bigger issue: let clients subscribe using either the org name or label:

# subscription-manager orgs --username admin --password admin
+-------------------------------------------+
          admin Organizations
+-------------------------------------------+

Name: 	Org Name
Key: 	foobar

Name: 	SAM QE
Key: 	SAM_QE

Name: 	ACME_Corporation
Key: 	ACME_Corporation

# subscription-manager register --username admin --password admin --org "SAM QE" --env DEV
The system has been registered with id: 125dbc8d-4423-487b-802c-db247136c2f7 
# subscription-manager clean
All local data removed
# subscription-manager register --username admin --password admin --org SAM_QE --env DEV
Couldn't find organization 'SAM_QE'


As you can see, I was able to subscribe my client using the org name but not the org label.

Comment 6 Brad Buckingham 2012-12-06 23:56:33 UTC
In order to address the issue raised in comment #5, I've created the following:
   https://github.com/Katello/katello/pull/1215

Comment 7 Tom McKay 2012-12-07 13:49:41 UTC
  Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: ffeedfb7cc1d0286889bada1a2e1f41f14c6df1c
      https://github.com/Katello/katello/commit/ffeedfb7cc1d0286889bada1a2e1f41f14c6df1c
  Author: Brad Buckingham <bbuckingham>
  Date:   2012-12-06 (Thu, 06 Dec 2012)

Comment 8 Lukas Zapletal 2012-12-07 14:31:07 UTC
One more fix

https://github.com/Katello/katello/pull/1216

plus optional one:

https://github.com/Katello/katello/pull/1217

Comment 9 Tom McKay 2012-12-07 14:35:28 UTC
  Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: ab1365274ea0168d67e4ccd85469ff7c3851cefa
      https://github.com/Katello/katello/commit/ab1365274ea0168d67e4ccd85469ff7c3851cefa
  Author: Brad Buckingham <bbuckingham>
  Date:   2012-12-07 (Fri, 07 Dec 2012)

  Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: ade7389c2cd52629bd5f4bc2d47dfefd21e499f5
      https://github.com/Katello/katello/commit/ade7389c2cd52629bd5f4bc2d47dfefd21e499f5
  Author: Lukas Zapletal <lzap+git>
  Date:   2012-12-07 (Fri, 07 Dec 2012)

Comment 11 Og Maciel 2012-12-11 22:37:58 UTC
Verified:

* candlepin-0.7.19-1.el6_3.noarch
* candlepin-tomcat6-0.7.19-1.el6_3.noarch
* elasticsearch-0.19.9-5.el6_3.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.2.1-1h.el6_3.noarch
* katello-cli-1.2.4-4h.el6_3.noarch
* katello-cli-common-1.2.4-4h.el6_3.noarch
* katello-common-1.2.6-6h.el6_3.noarch
* katello-configure-1.2.3-1h.el6_3.noarch
* katello-glue-candlepin-1.2.6-6h.el6_3.noarch
* katello-headpin-1.2.6-6h.el6_3.noarch
* katello-headpin-all-1.2.6-6h.el6_3.noarch
* katello-selinux-1.2.1-1h.el6_3.noarch
* thumbslug-0.0.27-1.el6_3.noarch
* thumbslug-selinux-0.0.27-1.el6_3.noarch

Howeverm there is a much more interesting issue tracked by https://bugzilla.redhat.com/show_bug.cgi?id=883123

Comment 12 Bryan Kearney 2012-12-12 21:17:40 UTC
*** Bug 883121 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2013-02-21 19:20:32 UTC
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-2013-0544.html