Bug 970644

Summary: cannot get provider for orgs that contain "."
Product: Red Hat Satellite Reporter: Chris Duryee <cduryee>
Component: Content ManagementAssignee: Eric Helms <ehelms>
Status: CLOSED CURRENTRELEASE QA Contact: Sachin Ghai <sghai>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: bbuckingham, gkhachik, mmccune, omaciel, sghai, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-18 21:20:07 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 Chris Duryee 2013-06-04 13:43:46 UTC
Description of problem: If an org has a "." in the name, the providers cannot be fetched. I'm not sure if the issue is in katello or the katello-cli API bindings.


Version-Release number of selected component (if applicable): 
katello-cli-1.4.2-6.el6sat.noarch
katello-cli-common-1.4.2-6.el6sat.noarch
katello-headpin-1.4.2-8.el6sat.noarch
katello-headpin-all-1.4.2-8.el6sat.noarch

How reproducible: every time 

Steps to Reproduce:
1. katello -u admin -p <pass> shell
2. org create --name "foo.bar"
3. provider list --org "foo.bar"

Actual results: Resource not found


Expected results: list of providers


Additional info: This came up due to an org name with the word "dept." in the name, I think it will be a relatively common use case. Also, I tried it for environments with the same result.

Comment 1 sthirugn@redhat.com 2013-06-04 13:59:37 UTC
Moving to Satellite 6, not a SAM specific bug.

Comment 2 Eric Helms 2013-06-04 15:20:15 UTC
The upstream fix is being tracked in this pull request - https://github.com/Katello/katello/pull/2420

Comment 3 Eric Helms 2013-06-06 12:33:46 UTC
commit 0e3e9800d22f2ac96096ff3368ecfcb62be14ed5
Author: Eric D Helms <ehelms>
Date:   Tue Jun 4 11:15:09 2013 -0400

    970644 - Allows passing organization name with a dot in the path
    to providers API.
    
    The default Rails routing returns 404s when dynamic URL segements
    contain a dot. This fix adds a constraint to the providers list route
    to allow Rails to pass through the organization_id and allow the
    controller to handle processing. This is required if an organization
    with a dot in the name is created and a user wants to list the providers
    from that organization.

Comment 5 Brad Buckingham 2013-06-06 21:58:40 UTC
Mass move to ON_QA

Comment 6 Sachin Ghai 2013-06-07 08:22:28 UTC
Verified with following build:

* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.8.9-1.el6_4.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.9-1.el6_4.noarch
* candlepin-tomcat6-0.8.9-1.el6_4.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* foreman-1.1.10004-1.noarch
* foreman-installer-puppet-concat-0-2.d776701.git.0.21ef926.el6sat.noarch
* foreman-installer-puppet-dhcp-0-5.3a4a13c.el6sat.noarch
* foreman-installer-puppet-dns-0-7.fcae203.el6sat.noarch
* foreman-installer-puppet-foreman-0-6.568c5c4.el6sat.noarch
* foreman-installer-puppet-foreman_proxy-0-8.bd1e35d.el6sat.noarch
* foreman-installer-puppet-puppet-0-3.ab46748.el6sat.noarch
* foreman-installer-puppet-tftp-0-5.ea6c5e5.el6sat.noarch
* foreman-installer-puppet-xinetd-0-50a267b8.git.0.44aca6a.el6sat.noarch
* foreman-postgresql-1.1.10004-1.noarch
* foreman-proxy-1.1.10003-1.el6sat.noarch
* foreman-proxy-installer-1.0.1-8.f5ae2cd.el6sat.noarch
* katello-1.4.2-10.el6sat.noarch
* katello-all-1.4.2-10.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.2-7.el6sat.noarch
* katello-cli-common-1.4.2-7.el6sat.noarch
* katello-common-1.4.2-10.el6sat.noarch
* katello-configure-1.4.3-14.el6sat.noarch
* katello-configure-foreman-1.4.3-14.el6sat.noarch
* katello-foreman-all-1.4.2-10.el6sat.noarch
* katello-glue-candlepin-1.4.2-10.el6sat.noarch
* katello-glue-elasticsearch-1.4.2-10.el6sat.noarch
* katello-glue-pulp-1.4.2-10.el6sat.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.4.3-3.el6sat.noarch
* openldap-2.4.23-31.el6.x86_64
* pulp-rpm-plugins-2.1.1-1.el6sat.noarch
* pulp-selinux-2.1.1-1.el6sat.noarch
* pulp-server-2.1.1-1.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.2.2-1.el6sat.noarch
* ruby193-rubygem-net-ldap-0.3.1-2.el6sat.noarch
* signo-0.0.16-1.el6sat.noarch
* signo-katello-0.0.16-1.el6sat.noarch


katello> org create --name foo.bar
Successfully created org [ foo.bar ]

katello> provider create --name test --org foo.bar 
Successfully created provider [ test ]

katello> provider create --name test --org foo.bar 
Successfully created provider [ test ]
katello> provider list --org foo.bar
--------------------------------------------------------------------------------
                                 Provider List

ID Name    Type    URL                    Description 
--------------------------------------------------------------------------------
3  test    Custom  None                   None        
2  Red Hat Red Hat https://cdn.redhat.com None    


However, its not working for environment.

katello> environment list --org "foo.bar"
Resource not found on the server

katello> environment create --org "foo.bar" --name test --prior Library
Resource not found on the server

In additional info, its mentioned that "I tried it for environments with the same result."

So I tested with environment. and looks like its related to this bugzilla. However if you feel that we should open a new for this, I'll log new bz

Comment 7 Eric Helms 2013-06-07 14:12:24 UTC
This bug had the potential to exist in other places, but I scoped this bug specifically to the entity and steps specified. I would request that we mark this bug as verified, since it was verified as the bug currently stands. 

Would you mind opening a bug that encompasses this idea in general, and identifies all locations where this is an issue so that all of them can be fixed and matched to a verification workflow?

Comment 8 Garik Khachikyan 2013-06-07 14:21:23 UTC
@Eric: sorry, but I would disagree. 

Making orgs with "."s the next step our clients would do: is referring to environments. And I confirm: just got same symptoms on UI side too.

So please let's fix it and i don't think we need another round of ack-ing the flags, triaging and so for the new issue to be fixed with the current drop.

Comment 10 Og Maciel 2013-06-12 16:33:58 UTC
Sachin: could you mark this as VERIFIED and file a second BZ for the other areas where this may cause issues (i.e. environments for instance)?

Comment 11 Sachin Ghai 2013-06-13 05:57:06 UTC
Moving this bz to verified as per comments 6 and 7.
And logged a common defect for other affected areas.

https://bugzilla.redhat.com/show_bug.cgi?id=973907

Comment 12 Mike McCune 2013-07-18 21:20:07 UTC
mass move to CLOSED:CURRENTRELEASE since MDP1 has been released.