Actions
Bug #33917
closedLet hosts with incorrect IP discover
Difficulty:
Triaged:
Yes
Description
Some hosts errors out with IP address exception which we are unable to reproduce. To me it looks like some bug in Ruby and IPv6. Symptoms:
error (IPAddr::InvalidAddressError): invalid address .... /opt/rh/rh-ruby25/root/usr/share/ruby/ipaddr.rb:649:in `in6_addr' /opt/rh/rh-ruby25/root/usr/share/ruby/ipaddr.rb:586:in `initialize' /opt/rh/rh-ruby25/root/usr/share/ruby/ipaddr.rb:502:in `new' /opt/rh/rh-ruby25/root/usr/share/ruby/ipaddr.rb:502:in `mask!' /opt/rh/rh-ruby25/root/usr/share/ruby/ipaddr.rb:593:in `initialize' /usr/share/foreman/app/models/subnet.rb:161:in `new' /usr/share/foreman/app/models/subnet.rb:161:in `ipaddr' /usr/share/foreman/app/models/subnet.rb:157:in `contains?' /usr/share/foreman/app/models/subnet.rb:373:in `block in subnet_for' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.1/lib/active_record/relation/delegation.rb:87:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.1/lib/active_record/relation/delegation.rb:87:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.1/lib/active_record/relation/query_methods.rb:271:in `select' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.1/lib/active_record/relation/query_methods.rb:271:in `select' /usr/share/foreman/app/models/subnet.rb:373:in `subnet_for' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.1/lib/active_record/relation/delegation.rb:107:in `public_send' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.1/lib/active_record/relation/delegation.rb:107:in `block in method_missing' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.1/lib/active_record/relation.rb:407:in `block in scoping' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.1/lib/active_record/relation.rb:784:in `_scoping' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.1/lib/active_record/relation.rb:407:in `scoping' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.1/lib/active_record/relation/delegation.rb:107:in `method_missing' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/services/foreman_discovery/subnet_suggestion.rb:17:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/services/foreman_discovery/subnet_suggestion.rb:6:in `for' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/services/foreman_discovery/import_hooks/subnet_and_taxonomy.rb:24:in `set_subnets' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/services/foreman_discovery/import_hooks/subnet_and_taxonomy.rb:15:in `after_populate' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/services/foreman_discovery/import_hook_service.rb:20:in `block in after_populate' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/services/foreman_discovery/import_hook_service.rb:18:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/services/foreman_discovery/import_hook_service.rb:18:in `after_populate' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/models/host/discovered.rb:131:in `populate_discovery_fields_from_facts' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/models/host/discovered.rb:124:in `populate_fields_from_facts' /usr/share/foreman/app/models/host/base.rb:174:in `block in parse_facts' /usr/share/foreman/app/services/foreman/telemetry_helper.rb:27:in `telemetry_duration_histogram' /usr/share/foreman/app/models/host/base.rb:173:in `parse_facts' /usr/share/foreman/app/models/host/base.rb:159:in `import_facts' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/models/host/discovered.rb:105:in `import_facts' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/models/host/discovered.rb:95:in `import_host' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/controllers/api/v2/discovered_hosts_controller.rb:104:in `block in facts' /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:108:in `as' /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:114:in `as_anonymous_admin' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-16.1.4/app/controllers/api/v2/discovered_hosts_controller.rb:103:in `facts' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/abstract_controller/base.rb:195:in `process_action' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_controller/metal/rendering.rb:30:in `process_action' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
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/557 added
Updated by The Foreman Bot about 3 years ago
- Fixed in Releases Discovery Plugin 16.0 added
Updated by Anonymous about 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman_discovery|be83a1a18d54c9d2b4f8144d6cebafb5e844e072.
Actions