Project

General

Profile

Actions

Bug #35664

open

undefined method `all_ansible_roles' for #<Hostgroup:0x000055af62caf668>

Added by Surowa please_edit_me over 1 year ago.

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

Description

This prevents us from retrieving the hostgroups via the GUI. It instantly displays this error upon clicking Configure --> Hostgroups
It is still possible to retrieve host groups via the API.

2022-10-24T11:09:27 [I|app|dc953209] Started GET "/hostgroups" for 10.10.243.23 at 2022-10-24 11:09:27 +0200
2022-10-24T11:09:27 [I|app|dc953209] Processing by HostgroupsController#index as HTML
2022-10-24T11:09:27 [I|app|dc953209] Rendering hostgroups/index.html.erb within layouts/application
2022-10-24T11:09:27 [I|app|dc953209] Rendered hostgroups/index.html.erb within layouts/application (Duration: 48.1ms | Allocations: 15496)
2022-10-24T11:09:27 [W|app|dc953209] undefined method `all_ansible_roles' for #<Hostgroup:0x000055af62caf668>
2022-10-24T11:09:27 [I|app|dc953209] Backtrace for 'undefined method `all_ansible_roles' for #<Hostgroup:0x000055af62caf668>' error (ActionView::Template::Error): undefined method `all_ansible_roles' for #<Hostgroup:0x000055af62caf668>
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activemodel-6.0.4.8/lib/active_model/attribute_methods.rb:432:in `method_missing'
dc953209 | /usr/share/foreman/app/views/hostgroups/index.html.erb:28:in `block in _faae38725f93a4dfb8300777eec629c9'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.4.8/lib/active_record/relation/delegation.rb:88:in `each'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.4.8/lib/active_record/relation/delegation.rb:88:in `each'
dc953209 | /usr/share/foreman/app/views/hostgroups/index.html.erb:15:in `_faae38725f93a4dfb8300777eec629c9'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/base.rb:274:in `_run'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/template.rb:185:in `block in render'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/notifications.rb:182:in `instrument'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/template.rb:385:in `instrument_render_template'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/template.rb:183:in `render'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in `render'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/renderer/template_renderer.rb:58:in `block (2 levels) in render_template'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/notifications.rb:180:in `block in instrument'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/notifications.rb:180:in `instrument'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/renderer/abstract_renderer.rb:87:in `instrument'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/renderer/template_renderer.rb:57:in `block in render_template'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/renderer/template_renderer.rb:65:in `render_with_layout'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/renderer/template_renderer.rb:56:in `render_template'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/renderer/template_renderer.rb:13:in `render'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/renderer/renderer.rb:29:in `render_to_object'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/rendering.rb:117:in `block in _render_template'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/base.rb:304:in `in_rendering_context'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/rendering.rb:116:in `_render_template'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/streaming.rb:218:in `_render_template'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/rendering.rb:103:in `render_to_body'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/rendering.rb:52:in `render_to_body'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/renderers.rb:142:in `render_to_body'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/abstract_controller/rendering.rb:25:in `render'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/rendering.rb:36:in `render'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/core_ext/benchmark.rb:14:in `block in ms'
dc953209 | /usr/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/core_ext/benchmark.rb:14:in `ms'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.4.8/lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/instrumentation.rb:43:in `render'
dc953209 | /usr/share/foreman/app/controllers/hostgroups_controller.rb:16:in `block (2 levels) in index'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/mime_responds.rb:214:in `respond_to'
dc953209 | /usr/share/foreman/app/controllers/hostgroups_controller.rb:13:in `index'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/abstract_controller/base.rb:195:in `process_action'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/rendering.rb:30:in `process_action'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
dc953209 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
dc953209 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
dc953209 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.10.0/lib/audited/sweeper.rb:14:in `around'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.10.0/lib/audited/sweeper.rb:14:in `around'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/callbacks.rb:139:in `run_callbacks'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/abstract_controller/callbacks.rb:41:in `process_action'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/rescue.rb:22:in `process_action'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/notifications.rb:180:in `block in instrument'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/notifications.rb:180:in `instrument'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.4.8/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/abstract_controller/base.rb:136:in `process'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.4.8/lib/action_view/rendering.rb:39:in `process'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal.rb:190:in `dispatch'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_controller/metal.rb:254:in `dispatch'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/routing/route_set.rb:33:in `serve'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/journey/router.rb:49:in `block in serve'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/journey/router.rb:32:in `each'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/journey/router.rb:32:in `serve'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/routing/route_set.rb:834:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-dsl-2.5.0/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.20/lib/apipie/static_dispatcher.rb:66:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.20/lib/apipie/extractor/recorder.rb:137:in `call'
dc953209 | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in `call'
dc953209 | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.20/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/tempfile_reaper.rb:15:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/etag.rb:27:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/conditional_get.rb:27:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/head.rb:12:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
dc953209 | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/session/abstract/id.rb:266:in `context'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/session/abstract/id.rb:260:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/cookies.rb:654:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/callbacks.rb:101:in `run_callbacks'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.4.8/lib/rails/rack/logger.rb:37:in `call_app'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.4.8/lib/rails/rack/logger.rb:28:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
dc953209 | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/request_id.rb:27:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/method_override.rb:24:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/runtime.rb:22:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.4.8/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/executor.rb:14:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/static.rb:126:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/sendfile.rb:110:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/ssl.rb:74:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.4.8/lib/action_dispatch/middleware/host_authorization.rb:97:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/secure_headers-6.3.3/lib/secure_headers/middleware.rb:11:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.4.8/lib/rails/engine.rb:527:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.4.8/lib/rails/railtie.rb:190:in `public_send'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.4.8/lib/rails/railtie.rb:190:in `method_missing'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/urlmap.rb:74:in `block in call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/urlmap.rb:58:in `each'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3.1/lib/rack/urlmap.rb:58:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.6.4/lib/puma/configuration.rb:252:in `call'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.6.4/lib/puma/request.rb:77:in `block in handle_request'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.6.4/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.6.4/lib/puma/request.rb:76:in `handle_request'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.6.4/lib/puma/server.rb:441:in `process_client'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/puma-5.6.4/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
dc953209 | /usr/share/foreman/vendor/ruby/2.5.0/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2022-10-24T11:09:27 [I|app|dc953209] Rendering common/500.html.erb within layouts/application
2022-10-24T11:09:27 [I|app|dc953209] Rendered common/500.html.erb within layouts/application (Duration: 5.5ms | Allocations: 5856)
2022-10-24T11:09:27 [I|app|dc953209] Rendered layouts/_application_content.html.erb (Duration: 4.5ms | Allocations: 5369)
2022-10-24T11:09:27 [I|app|dc953209] Rendering layouts/base.html.erb
2022-10-24T11:09:27 [I|app|dc953209] Rendered layouts/base.html.erb (Duration: 6.5ms | Allocations: 7031)
2022-10-24T11:09:27 [I|app|dc953209] Completed 500 Internal Server Error in 85ms (Views: 22.6ms | ActiveRecord: 6.1ms | Allocations: 45672)

Foreman version: 3.3.0
Plugins:
- foreman-tasks 3.0.5
- foreman_ansible 6.0.0
- foreman_puppet 4.0.1
- foreman_remote_execution 4.1.0
- puppetdb_foreman 5.0.0

No data to display

Actions

Also available in: Atom PDF