Project

General

Profile

Actions

Bug #20970

closed

Discovery via fact import is broken for rails 5

Added by Tomer Brisker about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Discovery plugin
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Parsing facts fails in rails 5 due to the fact that the parameters are no longer a hash but rather `ActionController::Parameters`.
Full stacktrace:

ERF42-4717 [Foreman::Exception]: Invalid facts, must be a Hash
 | /home/tbrisker/gits/foreman_discovery/app/models/host/discovered.rb:37:in `import_host'
 | /home/tbrisker/gits/foreman_discovery/app/controllers/api/v2/discovered_hosts_controller.rb:100:in `block in facts'
 | /home/tbrisker/foreman/app/models/concerns/foreman/thread_session.rb:93:in `as'
 | /home/tbrisker/foreman/app/models/concerns/foreman/thread_session.rb:99:in `as_anonymous_admin'
 | /home/tbrisker/gits/foreman_discovery/app/controllers/api/v2/discovered_hosts_controller.rb:99:in `facts'
<snip>


Related issues 2 (0 open2 closed)

Related to Foreman - Tracker #15715: Rails 5.0 upgrade tasksResolved07/18/2016

Actions
Related to Foreman - Refactor #20952: Replace Hash-related methods called on AC::Parameters Closed09/16/2017Actions
Actions #1

Updated by Tomer Brisker about 7 years ago

Actions #2

Updated by The Foreman Bot about 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_discovery/pull/375 added
Actions #3

Updated by Tomer Brisker about 7 years ago

  • Related to Refactor #20952: Replace Hash-related methods called on AC::Parameters added
Actions #4

Updated by Anonymous about 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF