Bug 970644 - cannot get provider for orgs that contain "."
cannot get provider for orgs that contain "."
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.1
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: --
Assigned To: Eric Helms
Sachin Ghai
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-04 09:43 EDT by Chris Duryee
Modified: 2013-07-18 17:20 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-18 17:20:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Duryee 2013-06-04 09:43:46 EDT
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 09:59:37 EDT
Moving to Satellite 6, not a SAM specific bug.
Comment 2 Eric Helms 2013-06-04 11:20:15 EDT
The upstream fix is being tracked in this pull request - https://github.com/Katello/katello/pull/2420
Comment 3 Eric Helms 2013-06-06 08:33:46 EDT
commit 0e3e9800d22f2ac96096ff3368ecfcb62be14ed5
Author: Eric D Helms <ehelms@redhat.com>
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 17:58:40 EDT
Mass move to ON_QA
Comment 6 Sachin Ghai 2013-06-07 04:22:28 EDT
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 10:12:24 EDT
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 10:21:23 EDT
@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 12:33:58 EDT
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 01:57:06 EDT
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 17:20:07 EDT
mass move to CLOSED:CURRENTRELEASE since MDP1 has been released.

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