Bug 1257607 - Discovered hosts UI does not allow setting Organization/Location when provisioning
Discovered hosts UI does not allow setting Organization/Location when provisi...
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Discovery Plugin (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: GA
: --
Assigned To: Lukas Zapletal
: Triaged
Depends On:
Blocks: 1338516
  Show dependency treegraph
Reported: 2015-08-27 08:42 EDT by Barak Korren
Modified: 2017-08-29 06:15 EDT (History)
6 users (show)

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

Attachments (Terms of Use)
Unable to change org/loc via mass action (127.86 KB, image/png)
2015-08-31 06:59 EDT, Barak Korren
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 4426 None None None 2016-04-22 11:39 EDT

  None (edit)
Description Barak Korren 2015-08-27 08:42:45 EDT
Description of problem:
The discovered hosts UI includes "Assign Location" and "Assign Organization" actions but there is no way to preform those actions from the API. 

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

How reproducible:

Steps to Reproduce:
1. Setup Satellite with multiple organizations and locations 
2. Setup the discovery plugin
3. Let some hosts be discovered
4. Try to assign organizations and locations from the API

Actual results:
There is no API for assigning organizations and locations

Expected results:
There should be API for this...
Comment 1 Bryan Kearney 2015-08-28 13:36:44 EDT
Created redmine issue http://projects.theforeman.org/issues/11605 from this bug
Comment 2 Lukas Zapletal 2015-08-31 06:01:45 EDT
WORKAROUND: It is possible to change org/loc of existing discovered hosts using mass assignement action. Select one or more hosts, click on Select action and use Assign org/loc button to do this.
Comment 3 Barak Korren 2015-08-31 06:59:27 EDT
Created attachment 1068596 [details]
Unable to change org/loc via mass action

There is a problem with this - the mass action window shows the list of hosts again instead of allowing to select the org/loc. (See attached screenshot)
Comment 4 Lukas Zapletal 2015-08-31 10:31:16 EDT
Thanks, reported and fixed as in https://bugzilla.redhat.com/show_bug.cgi?id=1258521

The patch is small, you can apply it onto your instance if you dont want to wait for z-stream update.

Or you can use "foreman-rake console" if API won't work.
Comment 6 Lukas Zapletal 2016-03-03 04:46:37 EST
Unfortunately, this is a technical limitation of reusing Edit Host form in Discovery. This can't be easily fixed, my initial attempt stalled and we need to implement proper solution - brand new provisioning form for discovered hosts.
Comment 7 Bryan Kearney 2016-06-15 12:08:08 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/4426 has been closed
Comment 12 orabin 2017-08-10 02:30:58 EDT
Version Tested: Satellite-6.3 Snap 10

The selection of organization and location works with the wizard.
Choosing hostgroup, organization and location then clicking quick or create will work as expected.
However, I found a bug with one case:
1) Click provision on a discovered host
2) Choose organization and location that are not the default and leave the hostgroup empty
3) Click create host
4) fill in hostgroup and submit

Expected result: Success save or validation erro

Actual result: Host not found

Moved bug back to assigned but it's also possible to open a new bug and mark this one as verified.
Adding need more information so assignee will decide how to proceed.
Comment 13 Lukas Zapletal 2017-08-29 06:15:12 EDT
Ok I prefer separate bug for this, created upstream issue for that:


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