Project

General

Profile

Bug #20970

Discovery via fact import is broken for rails 5

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
Discovery plugin
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
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

Related to Foreman - Tracker #15715: Rails 5.0 upgrade tasksResolved2016-07-18

Related to Foreman - Refactor #20952: Replace Hash-related methods called on AC::Parameters Closed2017-09-16

Associated revisions

Revision a1a1cac5 (diff)
Added by Tomer Brisker about 3 years ago

Fixes #20970 - Allow discovery via fact import in Rails 5

History

#1 Updated by Tomer Brisker about 3 years ago

#2 Updated by The Foreman Bot about 3 years ago

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

#3 Updated by Tomer Brisker about 3 years ago

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

#4 Updated by Anonymous about 3 years ago

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

Also available in: Atom PDF