Project

General

Profile

Actions

Bug #13084

closed

undefined method `find_by_ip' during validation of IP retrieved from compute resource

Added by Dominic Cleal over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Compute resources
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When creating a Rackspace CR-based host, the following error is thrown in orchestration:

 | NoMethodError: undefined method `find_by_ip' for #<Class:0x0000000adce650>
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.1.5/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
 | /home/dcleal/code/foreman/foreman/app/models/host.rb:15:in `method_missing'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration/compute.rb:285:in `validate_foreman_attr'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration/compute.rb:135:in `block in setComputeDetails'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration/compute.rb:122:in `each'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration/compute.rb:122:in `setComputeDetails'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:162:in `execute'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:107:in `block in process'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:99:in `each'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:99:in `process'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:35:in `on_save'

I suspect this may affect other CR types that retrieve IP addresses, such as EC2/OpenStack.

Those that retrieve MACs seem OK as the match_macs_to_nics method calls the same function, but passing in Nic::Base instead of Host.


Related issues 1 (0 open1 closed)

Related to Foreman - Refactor #10988: Remove 1.11 deprecationsClosedDaniel Lobato Garcia07/02/2015Actions
Actions

Also available in: Atom PDF