Edit and externalNodes broken when migrating 2.5.4 -> 3.0.1

Problem:
We try to provision a new foreman server to migrate to. We did set it up by importing a backup from an existing foreman 2.5.4 server and then upgrade it to 3.0.1. Most things are working fine so far but the edit and externalNodes pages are not working.
In the log the following errors show up:
*** externalNodes ***

2021-11-11T17:07:54 [I|app|d331d254] Started GET "/foreman_puppet/hosts/pdns-ext-1.example.com/externalNodes?name=pdns-ext-1.example.com" for 10.65.9.6 at 2021-11-11 17:07:54 +0100
2021-11-11T17:07:54 [I|app|d331d254] Processing by HostsController#externalNodes as HTML
2021-11-11T17:07:54 [I|app|d331d254]   Parameters: {"name"=>"pdns-ext-1.example.com", "id"=>"pdns-ext-1.example.com"}
2021-11-11T17:07:54 [W|app|d331d254] No SSL cert with CN supplied - request from 10.65.9.6
2021-11-11T17:07:54 [W|app|d331d254] No SSL cert with CN supplied - request from 10.65.9.6
2021-11-11T17:07:54 [W|app|d331d254] Failed to generate external nodes for pdns-ext-1.example.com
2021-11-11T17:07:54 [I|app|d331d254] Backtrace for 'Failed to generate external nodes for pdns-ext-1.example.com' error (TypeError): no implicit conversion of nil into Array
 d331d254 | /usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/relation/delegation.rb:87:in `+'
 d331d254 | /usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/relation/delegation.rb:87:in `+'
 d331d254 | /usr/share/gems/gems/foreman_puppet-1.0.4/app/services/foreman_puppet/host_info_providers/config_groups_info.rb:7:in `host_info'
 d331d254 | /usr/share/foreman/app/models/concerns/host_info_extensions.rb:27:in `block in info'
 d331d254 | /usr/share/foreman/app/models/concerns/host_info_extensions.rb:25:in `each'
 d331d254 | /usr/share/foreman/app/models/concerns/host_info_extensions.rb:25:in `info'
 d331d254 | /usr/share/gems/gems/foreman_puppet-1.0.4/app/controllers/concerns/foreman_puppet/extensions/hosts_controller_extensions.rb:100:in `block in externalNodes'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/mime_responds.rb:205:in `respond_to'
 d331d254 | /usr/share/gems/gems/foreman_puppet-1.0.4/app/controllers/concerns/foreman_puppet/extensions/hosts_controller_extensions.rb:96:in `externalNodes'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/base.rb:195:in `process_action'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/rendering.rb:30:in `process_action'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
 d331d254 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 d331d254 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 d331d254 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 d331d254 | /usr/share/gems/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 d331d254 | /usr/share/gems/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:139:in `run_callbacks'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/callbacks.rb:41:in `process_action'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/rescue.rb:22:in `process_action'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `block in instrument'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `instrument'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
 d331d254 | /usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/base.rb:136:in `process'
 d331d254 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/rendering.rb:39:in `process'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal.rb:190:in `dispatch'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal.rb:254:in `dispatch'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:33:in `serve'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:49:in `block in serve'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in `each'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in `serve'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:834:in `call'
 d331d254 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/engine.rb:527:in `call'
 d331d254 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in `public_send'
 d331d254 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in `method_missing'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/mapper.rb:48:in `serve'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:49:in `block in serve'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in `each'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in `serve'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:834:in `call'
 d331d254 | /usr/share/gems/gems/apipie-dsl-2.4.0/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
 d331d254 | /usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/static_dispatcher.rb:66:in `call'
 d331d254 | /usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/extractor/recorder.rb:137:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in `call'
 d331d254 | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
 d331d254 | /usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 d331d254 | /usr/share/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/conditional_get.rb:27:in `call'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
 d331d254 | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/cookies.rb:648:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:101:in `run_callbacks'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
 d331d254 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/rack/logger.rb:37:in `call_app'
 d331d254 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/rack/logger.rb:28:in `call'
 d331d254 | /usr/share/gems/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 d331d254 | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/request_id.rb:27:in `call'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
 d331d254 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/executor.rb:14:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in `call'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
 d331d254 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
 d331d254 | /usr/share/gems/gems/secure_headers-6.3.0/lib/secure_headers/middleware.rb:11:in `call'
 d331d254 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/engine.rb:527:in `call'
 d331d254 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in `public_send'
 d331d254 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in `method_missing'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:74:in `block in call'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `each'
 d331d254 | /usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `call'
 d331d254 | /usr/share/gems/gems/puma-5.3.2/lib/puma/configuration.rb:249:in `call'
 d331d254 | /usr/share/gems/gems/puma-5.3.2/lib/puma/request.rb:77:in `block in handle_request'
 d331d254 | /usr/share/gems/gems/puma-5.3.2/lib/puma/thread_pool.rb:338:in `with_force_shutdown'
 d331d254 | /usr/share/gems/gems/puma-5.3.2/lib/puma/request.rb:76:in `handle_request'
 d331d254 | /usr/share/gems/gems/puma-5.3.2/lib/puma/server.rb:438:in `process_client'
 d331d254 | /usr/share/gems/gems/puma-5.3.2/lib/puma/thread_pool.rb:145:in `block in spawn_thread'
 d331d254 | /usr/share/gems/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2021-11-11T17:07:54 [I|app|d331d254]   Rendering text template
2021-11-11T17:07:54 [I|app|d331d254]   Rendered text template (Duration: 0.0ms | Allocations: 2)
2021-11-11T17:07:54 [I|app|d331d254] Completed 412 Precondition Failed in 37ms (Views: 1.1ms | ActiveRecord: 8.4ms | Allocations: 8413)

*** edit ***

2021-11-11T17:05:50 [I|app|155ede30] Started GET "/hosts/pdns-int-1.example.com/edit" for 10.65.9.6 at 2021-11-11 17:05:50 +0100
2021-11-11T17:05:50 [I|app|155ede30] Processing by HostsController#edit as HTML
2021-11-11T17:05:50 [I|app|155ede30]   Parameters: {"id"=>"pdns-int-1.example.com"}
2021-11-11T17:05:50 [I|app|155ede30]   Rendering hosts/edit.html.erb within layouts/application
2021-11-11T17:05:50 [I|app|155ede30]   Rendered hosts/_progress.html.erb (Duration: 1.5ms | Allocations: 227)
2021-11-11T17:05:50 [I|app|155ede30]   Rendered /usr/share/gems/gems/foreman_puppet-1.0.4/app/views/hosts/foreman_puppet/_form_main_tab_fields.html.erb (Duration: 13.9ms | Allocations: 2653)
2021-11-11T17:05:50 [I|app|155ede30]   Rendered /usr/share/gems/gems/foreman_puppet-1.0.4/app/views/foreman_puppet/config_groups/_config_groups_selection.html.erb (Duration: 14.8ms | Allocations: 2342)
2021-11-11T17:05:50 [I|app|155ede30]   Rendered /usr/share/gems/gems/foreman_puppet-1.0.4/app/views/hosts/_form_puppet_enc_tab.html.erb (Duration: 19.1ms | Allocations: 3424)
2021-11-11T17:05:50 [I|app|155ede30]   Rendered hosts/_form.html.erb (Duration: 115.9ms | Allocations: 22404)
2021-11-11T17:05:50 [I|app|155ede30]   Rendered hosts/edit.html.erb within layouts/application (Duration: 119.8ms | Allocations: 23441)
2021-11-11T17:05:50 [W|app|155ede30] no implicit conversion of nil into Array
2021-11-11T17:05:50 [I|app|155ede30] Backtrace for 'no implicit conversion of nil into Array' error (ActionView::Template::Error): no implicit conversion of nil into Array
 155ede30 | /usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/relation/delegation.rb:87:in `-'
 155ede30 | /usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/relation/delegation.rb:87:in `-'
 155ede30 | /usr/share/gems/gems/foreman_puppet-1.0.4/app/views/foreman_puppet/config_groups/_config_groups_selection.html.erb:8:in `__usr_share_gems_gems_foreman_puppet_______app_views_foreman_puppet_config_groups__config_groups_selection_html_erb__4475205716760667486_143460'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/base.rb:274:in `_run'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:185:in `block in render'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:182:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:385:in `instrument_render_template'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:183:in `render'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/partial_renderer.rb:357:in `block in render_partial'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `block in instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/abstract_renderer.rb:87:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/partial_renderer.rb:346:in `render_partial'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/partial_renderer.rb:317:in `render'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/renderer.rb:65:in `render_partial_to_object'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/renderer.rb:53:in `render_partial'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/helpers/rendering_helper.rb:38:in `render'
 155ede30 | /usr/share/gems/gems/foreman_puppet-1.0.4/app/views/hosts/_form_puppet_enc_tab.html.erb:10:in `__usr_share_gems_gems_foreman_puppet_______app_views_hosts__form_puppet_enc_tab_html_erb__3410772918579843824_143440'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/base.rb:274:in `_run'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:185:in `block in render'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:182:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:385:in `instrument_render_template'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:183:in `render'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/partial_renderer.rb:357:in `block in render_partial'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `block in instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/abstract_renderer.rb:87:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/partial_renderer.rb:346:in `render_partial'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/partial_renderer.rb:317:in `render'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/renderer.rb:65:in `render_partial_to_object'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/renderer.rb:53:in `render_partial'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/helpers/rendering_helper.rb:38:in `render'
 155ede30 | /usr/share/foreman/app/helpers/pagelets_helper.rb:43:in `render_pagelet'
 155ede30 | /usr/share/foreman/app/helpers/pagelets_helper.rb:26:in `block in render_tab_content_for'
 155ede30 | /usr/share/foreman/app/helpers/pagelets_helper.rb:23:in `each'
 155ede30 | /usr/share/foreman/app/helpers/pagelets_helper.rb:23:in `render_tab_content_for'
 155ede30 | /usr/share/foreman/app/views/hosts/_form.html.erb:90:in `block (2 levels) in _app_views_hosts__form_html_erb__1227372250702509649_143340'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/helpers/capture_helper.rb:45:in `block in capture'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/helpers/capture_helper.rb:209:in `with_output_buffer'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/helpers/capture_helper.rb:45:in `capture'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/helpers/form_helper.rb:452:in `form_for'
 155ede30 | /usr/share/foreman/app/helpers/form_helper.rb:287:in `form_for'
 155ede30 | /usr/share/foreman/app/views/hosts/_form.html.erb:7:in `block in _app_views_hosts__form_html_erb__1227372250702509649_143340'
 155ede30 | /usr/share/foreman/app/models/taxonomy.rb:80:in `block (2 levels) in as_taxonomy'
 155ede30 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:195:in `as_location'
 155ede30 | /usr/share/foreman/app/models/taxonomy.rb:79:in `block in as_taxonomy'
 155ede30 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:154:in `as_org'
 155ede30 | /usr/share/foreman/app/models/taxonomy.rb:78:in `as_taxonomy'
 155ede30 | /usr/share/foreman/app/views/hosts/_form.html.erb:6:in `_app_views_hosts__form_html_erb__1227372250702509649_143340'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/base.rb:274:in `_run'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:185:in `block in render'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:182:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:385:in `instrument_render_template'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:183:in `render'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/partial_renderer.rb:357:in `block in render_partial'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `block in instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/abstract_renderer.rb:87:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/partial_renderer.rb:346:in `render_partial'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/partial_renderer.rb:317:in `render'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/renderer.rb:65:in `render_partial_to_object'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/renderer.rb:27:in `render_to_object'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/renderer.rb:22:in `render'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/helpers/rendering_helper.rb:34:in `block in render'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/base.rb:304:in `in_rendering_context'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/helpers/rendering_helper.rb:30:in `render'
 155ede30 | /usr/share/foreman/app/views/hosts/edit.html.erb:16:in `_app_views_hosts_edit_html_erb___1924232417906555375_143320'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/base.rb:274:in `_run'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:185:in `block in render'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:182:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:385:in `instrument_render_template'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/template.rb:183:in `render'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/template_renderer.rb:58:in `block (2 levels) in render_template'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `block in instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/abstract_renderer.rb:87:in `instrument'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/template_renderer.rb:57:in `block in render_template'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/template_renderer.rb:65:in `render_with_layout'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/template_renderer.rb:56:in `render_template'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/template_renderer.rb:13:in `render'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/renderer/renderer.rb:29:in `render_to_object'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/rendering.rb:117:in `block in _render_template'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/base.rb:304:in `in_rendering_context'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/rendering.rb:116:in `_render_template'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/streaming.rb:218:in `_render_template'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/rendering.rb:103:in `render_to_body'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/rendering.rb:52:in `render_to_body'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/renderers.rb:142:in `render_to_body'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/rendering.rb:25:in `render'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/rendering.rb:36:in `render'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/core_ext/benchmark.rb:14:in `block in ms'
 155ede30 | /usr/share/ruby/benchmark.rb:308:in `realtime'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/core_ext/benchmark.rb:14:in `ms'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
 155ede30 | /usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:43:in `render'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/implicit_render.rb:35:in `default_render'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/basic_implicit_render.rb:6:in `block in send_action'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/basic_implicit_render.rb:6:in `tap'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/base.rb:195:in `process_action'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/rendering.rb:30:in `process_action'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
 155ede30 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 155ede30 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 155ede30 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 155ede30 | /usr/share/gems/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 155ede30 | /usr/share/gems/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:139:in `run_callbacks'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/callbacks.rb:41:in `process_action'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/rescue.rb:22:in `process_action'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `block in instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `instrument'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
 155ede30 | /usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/base.rb:136:in `process'
 155ede30 | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/rendering.rb:39:in `process'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal.rb:190:in `dispatch'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal.rb:254:in `dispatch'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:33:in `serve'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:49:in `block in serve'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in `each'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in `serve'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:834:in `call'
 155ede30 | /usr/share/gems/gems/apipie-dsl-2.4.0/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
 155ede30 | /usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/static_dispatcher.rb:66:in `call'
 155ede30 | /usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/extractor/recorder.rb:137:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in `call'
 155ede30 | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
 155ede30 | /usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 155ede30 | /usr/share/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/conditional_get.rb:27:in `call'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
 155ede30 | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/cookies.rb:648:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:101:in `run_callbacks'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
 155ede30 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/rack/logger.rb:37:in `call_app'
 155ede30 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/rack/logger.rb:28:in `call'
 155ede30 | /usr/share/gems/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 155ede30 | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/request_id.rb:27:in `call'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
 155ede30 | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/executor.rb:14:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in `call'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
 155ede30 | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
 155ede30 | /usr/share/gems/gems/secure_headers-6.3.0/lib/secure_headers/middleware.rb:11:in `call'
 155ede30 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/engine.rb:527:in `call'
 155ede30 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in `public_send'
 155ede30 | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in `method_missing'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:74:in `block in call'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `each'
 155ede30 | /usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `call'
 155ede30 | /usr/share/gems/gems/puma-5.3.2/lib/puma/configuration.rb:249:in `call'
 155ede30 | /usr/share/gems/gems/puma-5.3.2/lib/puma/request.rb:77:in `block in handle_request'
 155ede30 | /usr/share/gems/gems/puma-5.3.2/lib/puma/thread_pool.rb:338:in `with_force_shutdown'
 155ede30 | /usr/share/gems/gems/puma-5.3.2/lib/puma/request.rb:76:in `handle_request'
 155ede30 | /usr/share/gems/gems/puma-5.3.2/lib/puma/server.rb:438:in `process_client'
 155ede30 | /usr/share/gems/gems/puma-5.3.2/lib/puma/thread_pool.rb:145:in `block in spawn_thread'
 155ede30 | /usr/share/gems/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2021-11-11T17:05:50 [I|app|155ede30]   Rendering common/500.html.erb within layouts/application
2021-11-11T17:05:50 [I|app|155ede30]   Rendered common/500.html.erb within layouts/application (Duration: 3.8ms | Allocations: 740)
2021-11-11T17:05:50 [I|app|155ede30]   Rendered layouts/_application_content.html.erb (Duration: 1.9ms | Allocations: 319)
2021-11-11T17:05:50 [I|app|155ede30]   Rendering layouts/base.html.erb
2021-11-11T17:05:50 [I|app|155ede30]   Rendered layouts/base.html.erb (Duration: 9.3ms | Allocations: 2189)
2021-11-11T17:05:50 [I|app|155ede30] Completed 500 Internal Server Error in 211ms (Views: 18.1ms | ActiveRecord: 22.2ms | Allocations: 42667)

Expected outcome:
/foreman_puppet/hosts/FQDN/externalNodes and
/hosts/FQDN/edit do not produce an error

Foreman and Proxy versions:
Foreman version: 3.0.1

Foreman and Proxy plugin versions:
Plugins:

  • foreman_default_hostgroup 6.0.0
  • foreman_puppet 1.0.4
  • puppetdb_foreman 5.0.0

Distribution and version:
Rocky Linux release 8.4 (Green Obsidian)

Other relevant data:

FWIW I’m having exactly the same problem regarding the ENC. We have the foreman_puppet and puppetdb_foreman plugins in common. Running under Centos 8 Streams. Upgraded via dnf.

I do NOT have the edit problem however.

2021-11-11T15:42:22 [I|app|5f4b1bec] Started GET "/node/XXXHOST?format=yml" for 10.50.61.64 at 2021-11-11 15:42:22 -0500
2021-11-11T15:42:22 [I|app|5f4b1bec] Processing by HostsController#externalNodes as YML
2021-11-11T15:42:22 [I|app|5f4b1bec]   Parameters: {"name"=>"XXXHOST"}
2021-11-11T15:42:22 [W|app|5f4b1bec] Failed to generate external nodes for XXXHOST
2021-11-11T15:42:22 [I|app|5f4b1bec] Backtrace for 'Failed to generate external nodes for XXXHOST' error (TypeError): no implicit conversion of nil into Array
 5f4b1bec | /usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/relation/delegation.rb:87:in `+'
 5f4b1bec | /usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/relation/delegation.rb:87:in `+'
 5f4b1bec | /usr/share/gems/gems/foreman_puppet-1.0.4/app/services/foreman_puppet/host_info_providers/config_groups_info.rb:7:in `host_info'
 5f4b1bec | /usr/share/foreman/app/models/concerns/host_info_extensions.rb:27:in `block in info'
 5f4b1bec | /usr/share/foreman/app/models/concerns/host_info_extensions.rb:25:in `each'
 5f4b1bec | /usr/share/foreman/app/models/concerns/host_info_extensions.rb:25:in `info'
 5f4b1bec | /usr/share/gems/gems/foreman_puppet-1.0.4/app/controllers/concerns/foreman_puppet/extensions/hosts_controller_extensions.rb:100:in `block in externalNodes'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/mime_responds.rb:205:in `respond_to'
 5f4b1bec | /usr/share/gems/gems/foreman_puppet-1.0.4/app/controllers/concerns/foreman_puppet/extensions/hosts_controller_extensions.rb:96:in `externalNodes'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/base.rb:195:in `process_action'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/rendering.rb:30:in `process_action'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
 5f4b1bec | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 5f4b1bec | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 5f4b1bec | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 5f4b1bec | /usr/share/gems/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 5f4b1bec | /usr/share/gems/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:139:in `run_callbacks'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/callbacks.rb:41:in `process_action'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/rescue.rb:22:in `process_action'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `block in instrument'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in `instrument'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
 5f4b1bec | /usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/base.rb:136:in `process'
 5f4b1bec | /usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/rendering.rb:39:in `process'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal.rb:190:in `dispatch'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal.rb:254:in `dispatch'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:33:in `serve'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:49:in `block in serve'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in `each'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in `serve'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:834:in `call'
 5f4b1bec | /usr/share/gems/gems/apipie-dsl-2.4.0/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
 5f4b1bec | /usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/static_dispatcher.rb:66:in `call'
 5f4b1bec | /usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/extractor/recorder.rb:137:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in `call'
 5f4b1bec | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
 5f4b1bec | /usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 5f4b1bec | /usr/share/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/conditional_get.rb:27:in `call'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
 5f4b1bec | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/cookies.rb:648:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:101:in `run_callbacks'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
 5f4b1bec | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/rack/logger.rb:37:in `call_app'
 5f4b1bec | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/rack/logger.rb:28:in `call'
 5f4b1bec | /usr/share/gems/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 5f4b1bec | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/request_id.rb:27:in `call'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
 5f4b1bec | /usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/executor.rb:14:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in `call'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
 5f4b1bec | /usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
 5f4b1bec | /usr/share/gems/gems/secure_headers-6.3.0/lib/secure_headers/middleware.rb:11:in `call'
 5f4b1bec | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/engine.rb:527:in `call'
 5f4b1bec | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in `public_send'
 5f4b1bec | /usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in `method_missing'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:74:in `block in call'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `each'
 5f4b1bec | /usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `call'
 5f4b1bec | /usr/share/gems/gems/puma-5.3.2/lib/puma/configuration.rb:249:in `call'
 5f4b1bec | /usr/share/gems/gems/puma-5.3.2/lib/puma/request.rb:77:in `block in handle_request'
 5f4b1bec | /usr/share/gems/gems/puma-5.3.2/lib/puma/thread_pool.rb:338:in `with_force_shutdown'
 5f4b1bec | /usr/share/gems/gems/puma-5.3.2/lib/puma/request.rb:76:in `handle_request'
 5f4b1bec | /usr/share/gems/gems/puma-5.3.2/lib/puma/server.rb:438:in `process_client'
 5f4b1bec | /usr/share/gems/gems/puma-5.3.2/lib/puma/thread_pool.rb:145:in `block in spawn_thread'
 5f4b1bec | /usr/share/gems/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2021-11-11T15:42:22 [I|app|5f4b1bec]   Rendering text template
2021-11-11T15:42:22 [I|app|5f4b1bec]   Rendered text template (Duration: 0.0ms | Allocations: 1)
2021-11-11T15:42:22 [I|app|5f4b1bec] Completed 412 Precondition Failed in 30ms (Views: 0.4ms | ActiveRecord: 9.0ms | Allocations: 8433)

This has been fixed in https://github.com/theforeman/foreman_puppet/pull/209 but I’ve did not cherry-pick that into 1.x stable :man_facepalming:
I’m doing so now, unfortunatelly that leaves you only with manual editing now :frowning:
Sorry for that, the fix will be included in foreman 3.0.2 tho.

@ezr-ondrej
Hey thank you for the quick fix. I did apply the patch manually and it works.
:pray: :+1:

Thanks so much!! It worked like a charm! =)