Bug 735863

Summary: Distributions with the same name in two orgs causes "internal server error" on the default dist URL path
Product: Red Hat Satellite 5 Reporter: Steven Hardy <shardy>
Component: WebUIAssignee: Tomas Lestach <tlestach>
Status: CLOSED DEFERRED QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 541CC: cperry
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-29 20:11:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 462714    
Attachments:
Description Flags
/var/log/tomcat5/catalina.out extract demontrating stack trace none

Description Steven Hardy 2011-09-05 19:14:13 UTC
Created attachment 521543 [details]
/var/log/tomcat5/catalina.out extract demontrating stack trace

Description of problem:

If you have a single org satellite, you can access the distributions via the following path:
http://satellite_vm.example.com/ks/dist/distroname

However if you add an additional org, which also contains a distro with the same name (e.g distroname), then this path generates "Internal Server Error" and a backtrace in /var/log/tomcat5/catalina.out log

If you access via the non-ambiguous path below things work again, but the problem is that customers don't expect changes/additions to the "new" org to break the "old" one.
http://satellite_vm.example.com/ks/org/1/dist/distroname

It would be better if this failure was handled more gracefully, by doing one of the following:
- The ambiguous path always points to the default org
- Display a more informative error message than "internal server error"
- Enforce distribution-name-uniqueness across orgs (e.g by a orgid prefix like with activation keys?)

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

How reproducible:
Always

Steps to Reproduce:
1.Create a distribution
2.Create a second org
3.Create a distribution with the same label as in step (1)
4.Request content from the distribution via the http://satellite_vm.example.com/ks/dist/distroname URL
5.Observe "internal server error" and backtrace in tomcat logs

Actual results:
Adding a distribution with the same name in both orgs causes errors

Expected results:
Adding a distribution in two orgs should not cause errors

Additional info:

Example of catalina.out stack trace attached