Project

General

Profile

Bug #21573

Importing facts in development breaks on code reload

Added by Ivan Necas about 3 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Facts
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

1. Import facts
2. Host::Base file, so that code realoding happens
3. import facts again

Error gets triggered:

NoMethodError: undefined method `new' for nil:NilClass
 | /home/inecas/Projects/ws/foreman-rex/foreman-rails5/app/models/host/base.rb:141:in `import_facts'
 | /home/inecas/Projects/ws/foreman-rex/foreman-rails5/app/models/host/managed.rb:298:in `import_facts'
 | /home/inecas/Projects/ws/foreman-rex/foreman-rails5/app/controllers/api/v2/hosts_controller.rb:288:in `facts'
 | /home/inecas/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/actionpack-5.0.6/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'

Related issues

Related to Foreman - Refactor #15409: Refactor (puppet) facts out of host classes.Closed
Related to Foreman - Bug #21654: Host discovery fails with undefined method `new` for nil:NIlClassClosed

History

#1 Updated by Ivan Necas about 3 years ago

  • Related to Refactor #15409: Refactor (puppet) facts out of host classes. added

#2 Updated by Lukas Zapletal over 2 years ago

  • Triaged set to No

Oh! That's why I sometimes see this error.

#3 Updated by Lukas Zapletal over 2 years ago

  • Related to Bug #21654: Host discovery fails with undefined method `new` for nil:NIlClass added

Also available in: Atom PDF