Bug 494929

Summary: Can't have 2 distributions with same label in different orgs
Product: [Community] Spacewalk Reporter: Mike McCune <mmccune>
Component: WebUIAssignee: Justin Sherrill <jsherril>
Status: CLOSED CURRENTRELEASE QA Contact: Mike McCune <mmccune>
Severity: medium Docs Contact:
Priority: low    
Version: 0.5CC: bperkins, cperry
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 494930 (view as bug list) Environment:
Last Closed: 2009-09-10 12:05:51 UTC Type: ---
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:    
Bug Blocks: 456554    

Description Mike McCune 2009-04-08 18:30:36 UTC
If you setup a distribution in org 1:

f10-i386

then create another org, and in org 2 create another distro:

f10-i386

you get this when attempting to use either distro during a kickstart:

Caused by: org.hibernate.NonUniqueResultException: query did not return a unique result: 2
	at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:820)
	at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811)
	at com.redhat.rhn.domain.kickstart.KickstartFactory.lookupKickstartTreeByLabel(KickstartFactory.java:527)
	at com.redhat.rhn.frontend.action.common.DownloadFile.handleKickstartDownload(DownloadFile.java:175)
	at com.redhat.rhn.frontend.action.common.DownloadFile.execute(DownloadFile.java:95)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)


Need to fix lookupKickstartTreeByLabel to require org or restrict creation of distros to be unique to the Satellite.

Comment 1 Justin Sherrill 2009-07-31 16:22:53 UTC
Fixed with regard to this bug: https://bugzilla.redhat.com/show_bug.cgi?id=494930

Comment 2 Miroslav Suchý 2009-09-10 12:05:51 UTC
Spacewalk 0.6 released