Project

General

Profile

Actions

Bug #35686

closed

Can't change Discovery Hostname facts in Settings Discovery tab

Added by Florian Faltermeier over 1 year ago. Updated over 1 year ago.

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

Description

Dear Community,

If I try to change the Hostname facts in the Settings/Discovery tab an error occurs.

foreman-rake --trace config
  • Invoke config (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute config
    rake aborted!
    ActiveRecord::SubclassNotFound: Invalid single-table inheritance type: Setting::Discovered is not a subclass of Setting
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/inheritance.rb:241:in `find_sti_class'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/inheritance.rb:215:in `discriminate_class_for_record'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/persistence.rb:257:in `instantiate'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/querying.rb:58:in `block (2 levels) in find_by_sql'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/result.rb:62:in `block in each'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/result.rb:62:in `each'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/result.rb:62:in `each'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/querying.rb:58:in `map'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/querying.rb:58:in `block in find_by_sql'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/querying.rb:56:in `find_by_sql'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation.rb:824:in `block in exec_queries'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation.rb:842:in `skip_query_cache_if_necessary'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation.rb:811:in `exec_queries'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation.rb:626:in `load'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation.rb:250:in `records'
    /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation/delegation.rb:88:in `each'
    /usr/share/foreman/lib/tasks/config.rake:117:in `run_all'
    /usr/share/foreman/lib/tasks/config.rake:79:in `run'
    /usr/share/foreman/lib/tasks/config.rake:167:in `block in <top (required)>'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `each'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:83:in `block in run'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
    /opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
    /opt/rh/rh-ruby27/root/usr/bin/rake:23:in `load'
    /opt/rh/rh-ruby27/root/usr/bin/rake:23:in `<main>'
    Tasks: TOP => config

Regards
Florian


Related issues 1 (0 open1 closed)

Is duplicate of Discovery - Bug #35551: Unable to add custom fact columns to Discovered HostsClosedEvgeni GolovActions
Actions #1

Updated by Ewoud Kohl van Wijngaarden over 1 year ago

  • Project changed from Foreman to Discovery
Actions #2

Updated by Ewoud Kohl van Wijngaarden over 1 year ago

  • Category set to Discovery plugin

This looks like a problem in the Discovery plugin. I wonder if https://github.com/theforeman/foreman_discovery/commit/52550d313c68aac1c1127075810254171358c70d was incomplete. 21.0.1 should be in the 3.3 repos, but can you share if you have 21.0.1 installed?

Actions #3

Updated by Ewoud Kohl van Wijngaarden over 1 year ago

  • Is duplicate of Bug #35551: Unable to add custom fact columns to Discovered Hosts added
Actions #4

Updated by Anonymous over 1 year ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF