Project

General

Profile

Actions

Bug #37249

open

Foreman with Puppet Purged Error: unknown class ForemanPuppet::HostClass

Added by Ben Erickson 10 months ago. Updated 10 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Problem:
I have a single-server Foreman+Katello setup and have run the recommended commands (see below) to purge all puppet data as puppet is unused in my setup. The following error is firing every 30 minutes in production.log (full backtrace below):
```
2024-03-11T10:00:12 [W|app|] unknown class ForemanPuppet::HostClass, ignoring
2024-03-11T10:00:12 [I|app|] Backtrace for 'unknown class ForemanPuppet::HostClass, ignoring' error (NameError): uninitialized constant ForemanPuppet
```

Hypothesis: Class is instantiated for an object removed during puppet purge.

Expected outcome:
Class is no longer referenced and error no longer fires every 30 minutes.

Foreman and Proxy Plugin versions:
ansible-collection-theforeman-foreman-4.0.0-2.el8.noarch
candlepin-4.3.12-1.el8.noarch
candlepin-selinux-4.3.12-1.el8.noarch
foreman-3.9.1-1.el8.noarch
foreman-assets-3.9.1-1.el8.noarch
foreman-cli-3.9.1-1.el8.noarch
foreman-debug-3.9.1-1.el8.noarch
foreman-dynflow-sidekiq-3.9.1-1.el8.noarch
foreman-installer-3.9.1-1.el8.noarch
foreman-installer-katello-3.9.1-1.el8.noarch
foreman-installer-katello-3.9.1-1.el8.noarch
foreman-obsolete-packages-1.6-1.el8.noarch
foreman-postgresql-3.9.1-1.el8.noarch
foreman-proxy-3.9.1-1.el8.noarch
foreman-redis-3.9.1-1.el8.noarch
foreman-selinux-3.9.1-1.el8.noarch
foreman-service-3.9.1-1.el8.noarch
katello-4.11.1-1.el8.noarch
katello-certs-tools-2.9.0-2.el8.noarch
katello-client-bootstrap-1.7.9-2.el8.noarch
katello-common-4.11.1-1.el8.noarch
katello-debug-4.11.1-1.el8.noarch
katello-selinux-5.0.2-1.el8.noarch
nodejs-theforeman-builder-12.2.0-1.el8.noarch
nodejs-theforeman-vendor-12.2.0-1.el8.noarch
pulpcore-obsolete-packages-1.0-9.el8.noarch
pulpcore-selinux-2.0.1-1.el8.x86_64
puppet-agent-7.29.1-1.el8.x86_64
puppet-agent-oauth-0.5.10-1.el8.noarch
python3.11-pulpcore-3.39.11-1.el8.noarch
rubygem-foreman-tasks-9.0.1-1.fm3_9.el8.noarch
rubygem-foreman_ansible-13.0.3-1.fm3_9.el8.noarch
rubygem-foreman_maintain-1.4.3-1.el8.noarch
rubygem-foreman_remote_execution-12.0.5-1.fm3_9.el8.noarch
rubygem-foreman_webhooks-3.2.2-1.fm3_9.el8.noarch
rubygem-hammer_cli_foreman-3.9.0-1.el8.noarch
rubygem-hammer_cli_foreman_ansible-0.6.0-1.fm3_9.el8.noarch
rubygem-hammer_cli_foreman_remote_execution-0.3.0-1.fm3_9.el8.noarch
rubygem-hammer_cli_foreman_tasks-0.0.20-1.fm3_9.el8.noarch
rubygem-hammer_cli_foreman_webhooks-0.1.0-1.fm3_9.el8.noarch
rubygem-hammer_cli_katello-1.11.2-1.el8.noarch
rubygem-katello-4.11.1-1.el8.noarch
rubygem-pulpcore_client-3.39.2-1.el8.noarch

Distribution and version:

CentOS Stream 8 x86_64

Other relevant data:
Commands executed to purge puppet per instructions in https://docs.theforeman.org/3.9/Managing_Configurations_Puppet/index-katello.html#Disabling_Puppet_Integration_managing-configurations-puppet:
`foreman-maintain plugin purge-puppet`
`foreman-maintain plugin purge-puppet --remove-all-data`

There are no Recurring Tasks scheduled to take place every 30min in my installation, so whatever is firing is happening is on the backend. Might be tied to the "Out of sync interval" setting under the "General" tab which is currently set to 30 minutes.

Example error w/backtrace in /usr/share/foreman/log/production.log
```
2024-03-11T10:00:12 [W|app|] unknown class ForemanPuppet::HostClass, ignoring
2024-03-11T10:00:12 [I|app|] Backtrace for 'unknown class ForemanPuppet::HostClass, ignoring' error (NameError): uninitialized constant ForemanPuppet | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/inflector/methods.rb:285:in `const_get' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/inflector/methods.rb:285:in `block in constantize' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/inflector/methods.rb:283:in `each' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/inflector/methods.rb:283:in `inject' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/inflector/methods.rb:283:in `constantize' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/core_ext/string/inflections.rb:74:in `constantize' | /usr/share/foreman/app/models/filter.rb:86:in `get_resource_class' | /usr/share/foreman/app/models/filter.rb:118:in `resource_class' | /usr/share/foreman/app/models/filter.rb:125:in `granular?' | /usr/share/foreman/app/models/filter.rb:140:in `resource_taxable_by_location?' | /usr/share/foreman/app/models/filter.rb:182:in `build_taxonomy_search_string' | /usr/share/foreman/app/models/filter.rb:175:in `build_taxonomy_search' | /usr/share/foreman/app/models/filter.rb:168:in `inherit_taxonomies!' | /usr/share/foreman/app/models/filter.rb:162:in `enforce_inherited_taxonomies' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:427:in `block in make_lambda' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:603:in `catch' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:603:in `block in default_terminator' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:199:in `block in halting' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:512:in `block in invoke_before' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:512:in `each' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:512:in `invoke_before' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:115:in `block in run_callbacks' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/autosave_association.rb:385:in `around_save_collection_association' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:126:in `block in run_callbacks' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:137:in `run_callbacks' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:824:in `_run_save_callbacks' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/callbacks.rb:457:in `create_or_update' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/timestamp.rb:126:in `create_or_update' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/persistence.rb:474:in `save' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/validations.rb:47:in `save' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/transactions.rb:298:in `block in save' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/database_statements.rb:318:in `transaction' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/transactions.rb:350:in `with_transaction_returning_status' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/transactions.rb:298:in `save' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/suppressor.rb:44:in `save' | /usr/share/foreman/app/models/role.rb:289:in `block in sync_inheriting_filters' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/relation/batches.rb:71:in `block (2 levels) in find_each' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/relation/batches.rb:71:in `each' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/relation/batches.rb:71:in `block in find_each' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/relation/batches.rb:138:in `block in find_in_batches' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/relation/batches.rb:245:in `block in in_batches' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/relation/batches.rb:229:in `loop' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/relation/batches.rb:229:in `in_batches' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/relation/batches.rb:137:in `find_in_batches' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/relation/batches.rb:70:in `find_each' | /usr/share/foreman/app/models/role.rb:288:in `sync_inheriting_filters' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:427:in `block in make_lambda' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:516:in `block in invoke_after' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:516:in `each' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:516:in `invoke_after' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:131:in `block in run_callbacks' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:137:in `run_callbacks' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:824:in `_run_save_callbacks' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/callbacks.rb:457:in `create_or_update' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/timestamp.rb:126:in `create_or_update' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/persistence.rb:507:in `save!' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/validations.rb:53:in `save!' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/transactions.rb:302:in `block in save!' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/transactions.rb:350:in `with_transaction_returning_status' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/transactions.rb:302:in `save!' | /usr/share/gems/gems/activerecord-6.1.7.6/lib/active_record/suppressor.rb:48:in `save!' | /usr/share/foreman/app/models/role.rb:211:in `add_permissions!' | /usr/share/foreman/app/registries/foreman/plugin/rbac_support.rb:103:in `block (3 levels) in include_permissions_for_role' | /usr/share/foreman/app/models/concerns/authorizable.rb:103:in `skip_permission_check' | /usr/share/foreman/app/registries/foreman/plugin/rbac_support.rb:102:in `block (2 levels) in include_permissions_for_role' | /usr/share/gems/gems/audited-5.4.2/lib/audited/auditor.rb:448:in `without_auditing' | /usr/share/foreman/app/registries/foreman/plugin/rbac_support.rb:99:in `block in include_permissions_for_role' | /usr/share/foreman/app/models/role.rb:239:in `ignore_locking' | /usr/share/foreman/app/registries/foreman/plugin/rbac_support.rb:98:in `include_permissions_for_role' | /usr/share/foreman/app/registries/foreman/plugin/rbac_support.rb:36:in `block in add_permissions_to_default_roles' | /usr/share/foreman/app/registries/foreman/plugin/rbac_support.rb:32:in `each' | /usr/share/foreman/app/registries/foreman/plugin/rbac_support.rb:32:in `add_permissions_to_default_roles' | /usr/share/foreman/app/registries/foreman/plugin/rbac_registry.rb:75:in `block (2 levels) in setup_roles!' | /usr/share/gems/gems/audited-5.4.2/lib/audited/auditor.rb:448:in `without_auditing' | /usr/share/foreman/app/registries/foreman/plugin/rbac_registry.rb:59:in `block in setup_roles!' | /usr/share/gems/gems/audited-5.4.2/lib/audited/auditor.rb:448:in `without_auditing' | /usr/share/foreman/app/registries/foreman/plugin/rbac_registry.rb:58:in `setup_roles!' | /usr/share/foreman/app/registries/foreman/plugin/rbac_registry.rb:46:in `setup!' | /usr/share/foreman/app/registries/foreman/plugin.rb:310:in `finalize_setup!' | /usr/share/foreman/config/initializers/foreman.rb:28:in `block (2 levels) in <top (required)>' | /usr/share/foreman/config/initializers/foreman.rb:27:in `each' | /usr/share/foreman/config/initializers/foreman.rb:27:in `block in <top (required)>' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:68:in `block in execute_hook' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:51:in `each' | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks' | /usr/share/gems/gems/railties-6.1.7.6/lib/rails/application/finisher.rb:140:in `block in <module:Finisher>' | /usr/share/gems/gems/railties-6.1.7.6/lib/rails/initializable.rb:32:in `instance_exec' | /usr/share/gems/gems/railties-6.1.7.6/lib/rails/initializable.rb:32:in `run' | /usr/share/foreman/config/initializers/0_print_time_spent.rb:45:in `block in run' | /usr/share/foreman/config/initializers/0_print_time_spent.rb:17:in `benchmark' | /usr/share/foreman/config/initializers/0_print_time_spent.rb:45:in `run' | /usr/share/gems/gems/railties-6.1.7.6/lib/rails/initializable.rb:61:in `block in run_initializers' | /usr/share/ruby/tsort.rb:228:in `block in tsort_each' | /usr/share/ruby/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' | /usr/share/ruby/tsort.rb:431:in `each_strongly_connected_component_from' | /usr/share/ruby/tsort.rb:349:in `block in each_strongly_connected_component' | /usr/share/ruby/tsort.rb:347:in `each' | /usr/share/ruby/tsort.rb:347:in `call' | /usr/share/ruby/tsort.rb:347:in `each_strongly_connected_component' | /usr/share/ruby/tsort.rb:226:in `tsort_each' | /usr/share/ruby/tsort.rb:205:in `tsort_each' | /usr/share/gems/gems/railties-6.1.7.6/lib/rails/initializable.rb:60:in `run_initializers' | /usr/share/gems/gems/railties-6.1.7.6/lib/rails/application.rb:391:in `initialize!' | /usr/share/gems/gems/railties-6.1.7.6/lib/rails/railtie.rb:207:in `public_send' | /usr/share/gems/gems/railties-6.1.7.6/lib/rails/railtie.rb:207:in `method_missing' | /usr/share/foreman/config/environment.rb:5:in `<top (required)>' | /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require' | /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require' | /usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' | /usr/share/gems/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require' | /usr/share/gems/gems/railties-6.1.7.6/lib/rails/application.rb:367:in `require_environment!' | /usr/share/gems/gems/railties-6.1.7.6/lib/rails/application.rb:533:in `block in run_tasks_blocks' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:281:in `each' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:243:in `block in invoke_prerequisites' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:241:in `each' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:241:in `invoke_prerequisites' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:218:in `block in invoke_with_call_chain' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain' | /usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke' | /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task' | /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level' | /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `each' | /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level' | /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads' | /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level' | /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:83:in `block in run' | /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling' | /usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:80:in `run' | /usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>' | /usr/bin/rake:23:in `load' | /usr/bin/rake:23:in `<main>'
```


Files

issue.txt issue.txt 17.8 KB Ben Erickson, 03/13/2024 12:39 AM
Actions

Also available in: Atom PDF