Red Hat Bugzilla – Bug 1257607
Discovered hosts UI does not allow setting Organization/Location when provisioning
Last modified: 2017-08-29 06:15:12 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):
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
There is no API for assigning organizations and locations
There should be API for this...
Created redmine issue http://projects.theforeman.org/issues/11605 from this bug
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.
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)
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.
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.
Moving to POST since upstream bug http://projects.theforeman.org/issues/4426 has been closed
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.
Ok I prefer separate bug for this, created upstream issue for that: