Bug 1318743

Summary: Provisioning a host using 'default content view' may use the incorrect kickstart tree
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: WebUIAssignee: Partha Aji <paji>
WebUI sub component: Katello QA Contact: Sachin Ghai <sghai>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: bbuckingham, mmccune, omaciel, sghai
Version: 6.2.0Keywords: Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/14257
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.22-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:28:47 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:
Bug Depends On:    
Bug Blocks: 1321771, 1323795, 1327055    
Attachments:
Description Flags
atomic host install failed when same org conatins rhel ks
none
UI allows to choose media from dropdown based on syced contents in default CV
none
atomic install works file even after having ostree installer and rhel installer in same repo none

Description Justin Sherrill 2016-03-17 16:13:53 UTC
Description of problem:

If a user has synced multiple kickstart trees of the same os family, version, and arch and then tries to provision a host using that os family, version and arch it is not certain which tree will be used via our automatic detection.

For example:

RHEL Server 7.1 x86_64
RHEL Workstation 7.1 x86_64
RHEL Atomic 7.1 x86_64


The easiest way around this is to require a media to be selected if the user selects the default content view.

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

How reproducible:
Always

Steps to Reproduce:
1.  Sync at least two of the above Kickstart trees, version and arch must be the same
2.  Try to provision a host making sure to select 'Library', 'Default Organization View', a content source of the satellite's hostname.


Actual results:
After selecting a os version and arch a URL will be presented on the operating systems tab pointing to one of the 2 or 3 kickstarts.  There is no way for the user to select which one.  Its also possible when the user clicks the button it will 'select' a different url


Expected results:
No static url is generated and the user can select from available install media


Additional info:

Comment 2 Partha Aji 2016-03-17 20:22:38 UTC
Created redmine issue http://projects.theforeman.org/issues/14257 from this bug

Comment 3 Sachin Ghai 2016-03-22 12:58:54 UTC
This issue is affecting provisioning of atomic host7.2 when another yum based distro of same os (rhel7.2) along with ks files is synced.

Provisioning of atomic host failed with error:

ImportError: can not import OSTree 


Please see the attached screenshot where anacaonda installer throws this error while provisioning atomic host. This needs to be fixed on priority.

Comment 4 Sachin Ghai 2016-03-22 13:15:25 UTC
Created attachment 1139071 [details]
atomic host install failed when same org conatins rhel ks

Comment 7 Mike McCune 2016-04-22 03:03:03 UTC
Note that the upstream PR is 2 commits, not one

Comment 9 Sachin Ghai 2016-04-25 09:10:27 UTC
Verified with sat6.2 beta snap9.2

Now webUI shows two combo box for "Media Selection". 
- sycned content
- all media

I can select the server/workstation media as per the attached screenshot.

Comment 10 Sachin Ghai 2016-04-25 09:11:50 UTC
Created attachment 1150319 [details]
UI allows to choose media from dropdown based on syced contents in default CV

Comment 11 Sachin Ghai 2016-04-25 09:13:56 UTC
Based on comment3, I tried provisioning of atomic having installer ostree for 7.2 in same org where rhel7.2 is synced. I can provision atomic host with association of content-source without any issue.

Comment 12 Sachin Ghai 2016-04-25 09:22:50 UTC
Created attachment 1150321 [details]
atomic install works file even after having ostree installer and rhel installer in same repo

Comment 13 Sachin Ghai 2016-04-25 09:30:05 UTC
I successfully provisioned workstation by selecting workstation media. I don't  see any issue with provisioning even though same org has multiple ks of same OS( atomic 7.2, RHEL workstation 7.2, RHEL Server 7.2) in same org.

However, new host form doesn't get submitted successfully first time, UI highlights "Operating System" tab with red border but without any error. But that's a different error.

Comment 14 Sachin Ghai 2016-04-25 09:48:32 UTC
Bz filed for issue pointed in comment13. https://bugzilla.redhat.com/show_bug.cgi?id=1330012

Comment 15 Bryan Kearney 2016-07-27 11:28:47 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.

https://access.redhat.com/errata/RHBA-2016:1501