Bug 1397367 - On provisioning a discovered host the media doesn't automatically populated
On provisioning a discovered host the media doesn't automatically populated
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Discovery Plugin (Show other bugs)
6.3.0
Unspecified Unspecified
unspecified Severity high (vote)
: Beta
: --
Assigned To: Daniel Lobato Garcia
Nikhil Kathole
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-22 07:08 EST by Sachin Ghai
Modified: 2018-02-21 11:51 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-02-21 11:51:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log in production.log file (10.16 KB, text/plain)
2017-09-05 08:57 EDT, Nikhil Kathole
no flags Details
screenshot of UI (80.62 KB, image/png)
2017-09-05 08:58 EDT, Nikhil Kathole
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 16750 None None None 2016-12-09 09:03 EST

  None (edit)
Description Sachin Ghai 2016-11-22 07:08:23 EST
Description of problem:
I was trying to test new FDI build for sat6.3. To test this I discovered pxe-less & pxe-based hosts on libvirt. Hosts were successfully discovered. 

However, when I tried to provision a discovered host manually by clicking on 'provision' button, I realized that media is not getting associated with the newly created host. Media field got disabled.

I created a CV with both custom rhel7 and Red Hat rhel73 and associated to different hostgroups. Later I tried to provision discovered host with both hostgroups and found same issue:


Moreover, when I selected the OS from new host page, I found below exception:

  2016-11-22 06:56:19 f072d5e0 [app] [I] Started POST "/os_selected_discovered_hosts" for 10.65.223.113 at 2016-11-22 06:56:19 -0500
2016-11-22 06:56:19 f072d5e0 [app] [I] Processing by HostsController#os_selected as */*
2016-11-22 06:56:19 f072d5e0 [app] [I]   Parameters: {"discovered_host"=>{"operatingsystem_id"=>"1", "organization_id"=>"1", "location_id"=>"2", "content_view_id"=>"3", "lifecycle_environment_id"=>"2", "content_source_id"=>"1", "architecture_id"=>"1", "hostgroup_id"=>"2", "medium_id"=>"", "kickstart_repository_id"=>""}}
2016-11-22 06:56:19 f072d5e0 [app] [D] Setting current user thread-local variable to admin
2016-11-22 06:56:19 f072d5e0 [app] [D] Setting current organization thread-local variable to Default Organization
2016-11-22 06:56:19 f072d5e0 [app] [D] Setting current location thread-local variable to none
2016-11-22 06:56:19 f072d5e0 [app] [D] Setting current organization thread-local variable to Default Organization
2016-11-22 06:56:19 f072d5e0 [app] [D] Setting current location thread-local variable to none
2016-11-22 06:56:19 f072d5e0 [app] [D] Setting current location thread-local variable to none
2016-11-22 06:56:19 f072d5e0 [app] [D] Setting current organization thread-local variable to Default Organization
2016-11-22 06:56:19 f072d5e0 [app] [W] Action failed
 | NoMethodError: undefined method `has_key?' for nil:NilClass
 | /usr/share/foreman/app/controllers/concerns/foreman/controller/parameters/keep_param.rb:11:in `block in keep_param'
 | /usr/share/foreman/app/controllers/concerns/foreman/controller/parameters/keep_param.rb:10:in `each'
 | /usr/share/foreman/app/controllers/concerns/foreman/controller/parameters/keep_param.rb:10:in `inject'
 | /usr/share/foreman/app/controllers/concerns/foreman/controller/parameters/keep_param.rb:10:in `keep_param'
 | /usr/share/foreman/app/controllers/concerns/foreman/controller/parameters/host.rb:34:in `host_params'
 | /usr/share/foreman/app/controllers/concerns/foreman/controller/host_details.rb:55:in `item_params'
 | /usr/share/foreman/app/controllers/concerns/foreman/controller/host_details.rb:48:in `block in assign_parameter'
 | /usr/share/foreman/app/models/taxonomy.rb:65:in `block (2 levels) in as_taxonomy'
 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:147:in `as_location'
 | /usr/share/foreman/app/models/taxonomy.rb:64:in `block in as_taxonomy'
 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:112:in `as_org'



And this error I'm keep on getting while provisioning a discovered host:

2016-11-22 06:54:41 f072d5e0 [app] [F] 
 | ActionController::RoutingError (No route matches [GET] "/javascripts/jquery.cookie.js"):
 |   lib/middleware/tagged_logging.rb:18:in `call'
 | 
 | 
2016-11-22 06:54:48 f072d5e0 [app] [I] Started GET "/discovered_hosts/mac5254009e26f9/edit?utf8=%E2%9C%93&host%5Bhostgroup_id%5D=2&host%5Borganization_id%5D=1&host%5Blocation_id%5D=2" for 10.65.223.113 at 2016-11-22 06:54:48 -0500
2016-11-22 06:54:48 f072d5e0 [app] [I] Processing by DiscoveredHostsController#edit as HTML
2016-11-22 06:54:48 f072d5e0 [app] [I]   Parameters: {"utf8"=>"✓", "host"=>{"hostgroup_id"=>"2", "organization_id"=>"1", "location_id"=>"2"}, "id"=>"mac5254009e26f9"}


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

satellite-cli-6.3.0-6.1.beta.el7sat.noarch
satellite-installer-6.3.0-3.el7sat.noarch
satellite-6.3.0-6.1.beta.el7sat.noarch

sat6.3 snap6

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
Media doesn't automatically populated when trying to provision a discovered host

Expected results:


Additional info:
Please note that medium is correctly populating if I provision a normal host. Issue appears only if when I provision discovered host.
Comment 2 Bryan Kearney 2016-12-09 10:08:34 EST
Upstream bug assigned to dlobatog@redhat.com
Comment 3 Bryan Kearney 2016-12-09 10:08:37 EST
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16750 has been resolved.
Comment 4 Nikhil Kathole 2017-09-05 08:56:13 EDT
VERIFIED

Version Tested:
Satellite-6.3 Snap 14

steps:
1. Discovered a host
2. Click provision
3. Select hostgroup
4. Navigate to Operating System tab (See attachments)
Comment 5 Nikhil Kathole 2017-09-05 08:57 EDT
Created attachment 1322206 [details]
log in production.log file
Comment 6 Nikhil Kathole 2017-09-05 08:58 EDT
Created attachment 1322207 [details]
screenshot of UI
Comment 7 pm-sat@redhat.com 2018-02-21 11:51:07 EST
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/RHSA-2018:0336

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