Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1397367 - On provisioning a discovered host the media doesn't automatically populated
Summary: On provisioning a discovered host the media doesn't automatically populated
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Discovery Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Daniel Lobato Garcia
QA Contact: Nikhil Kathole
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-22 12:08 UTC by Sachin Ghai
Modified: 2019-09-26 15:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16750 0 None None None 2016-12-09 14:03:47 UTC

Description Sachin Ghai 2016-11-22 12:08:23 UTC
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 15:08:34 UTC
Upstream bug assigned to dlobatog

Comment 3 Bryan Kearney 2016-12-09 15:08:37 UTC
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 12:56:13 UTC
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 12:57:07 UTC
Created attachment 1322206 [details]
log in production.log file

Comment 6 Nikhil Kathole 2017-09-05 12:58:38 UTC
Created attachment 1322207 [details]
screenshot of UI

Comment 7 Satellite Program 2018-02-21 16:51:07 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/RHSA-2018:0336


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