Project

General

Profile

Actions

Bug #36845

closed

"Lifecycle environment must be specified" error when editing a host

Added by George Langdin about 1 year ago. Updated 8 months ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Hosts
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Since upgrading from Katello 4.9.0 to 4.9.2 any attempt to edit a host will result in an error message implying that the lifecycle environment is not set.
This does not occur when creating a host - this is only when editing a host after it is created.
According to the GUI, the lifecycle environment is set so the error disagrees with what is displayed in the GUI.

@[root@rocky ~]# foreman-rake errors:fetch_log request_id=26b9b028
Foreman version: 3.7.0
Plugins:
- foreman-tasks 8.1.1
- foreman_bootdisk 21.0.4
- foreman_remote_execution 10.0.7
- katello 4.9.2

2023-10-19T16:22:16 [I|app|26b9b028] Started PATCH "/hosts/60" for 172.26.96.10 at 2023-10-19 16:22:16 +0000
2023-10-19T16:22:16 [I|app|26b9b028] Processing by HostsController#update as */*
2023-10-19T16:22:16 [I|app|26b9b028] Parameters: {"utf8"=>"✓", "authenticity_token"=>"kvRLKjtMsIKFDgsNBB68XBfTKTtadbiiplAWfyyzz6q/rPwibfMaowAiasShdgEPUzwu6hHAimHVg/R6qh4JYg==", "host"=>{"name"=>"ctlatlns2", "hostgroup_id"=>"25", "realm_id"=>"1", "managed"=>"true", "progress_report_id"=>"[FILTERED]", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "mac"=>"", "identifier"=>"bond0", "name"=>"ctlatlns2", "domain_id"=>"1", "subnet_id"=>"3", "ip"=>"10.250.160.249", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "mode"=>"balance-alb", "attached_devices"=>"em1,em2", "bond_options"=>"", "id"=>"220"}, "1"=>{"_destroy"=>"0", "mac"=>"6c:2b:59:a2:c4:1d", "identifier"=>"em1", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "ip6"=>"", "managed"=>"1", "primary"=>"0", "provision"=>"0", "execution"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"221"}, "2"=>{"_destroy"=>"0", "mac"=>"6c:2b:59:a2:c4:1e", "identifier"=>"em2", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "ip6"=>"", "managed"=>"1", "primary"=>"0", "provision"=>"0", "execution"=>"0", "tag"=>"", "attached_to"=>"", "id"=>"222"}}, "architecture_id"=>"1", "operatingsystem_id"=>"7", "medium_id"=>"", "content_facet_attributes"=>{"kickstart_repository_id"=>"362"}, "ptable_id"=>"202", "pxe_loader"=>"Grub2 UEFI SecureBoot", "disk"=>"", "is_owned_by"=>"4-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "media_selector"=>"synced_content", "id"=>"60"}
2023-10-19T16:22:16 [I|app|26b9b028] set_up_content_view_environment: cv_id=, env_id=
2023-10-19T16:22:16 [W|app|26b9b028] Lifecycle environment must be specified
2023-10-19T16:22:16 [I|app|26b9b028] Backtrace for 'Lifecycle environment must be specified' error (RuntimeError): Lifecycle environment must be specified
26b9b028 | /usr/share/gems/gems/katello-4.9.2/app/models/katello/host/content_facet.rb:100:in `assign_single_environment'
26b9b028 | /usr/share/gems/gems/katello-4.9.2/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb:13:in `set_up_content_view_environment'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:427:in `block in make_lambda'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:179:in `block (2 levels) in halting_and_conditional'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:180:in `block in halting_and_conditional'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:512:in `block in invoke_before'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:512:in `each'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:512:in `invoke_before'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:115:in `block in run_callbacks'
26b9b028 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
26b9b028 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
26b9b028 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
26b9b028 | /usr/share/gems/gems/audited-5.3.3/lib/audited/sweeper.rb:16:in `around'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
26b9b028 | /usr/share/gems/gems/audited-5.3.3/lib/audited/sweeper.rb:16:in `around'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:137:in `run_callbacks'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/abstract_controller/callbacks.rb:41:in `process_action'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/rescue.rb:22:in `process_action'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `block in instrument'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/notifications.rb:203:in `instrument'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
26b9b028 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/abstract_controller/base.rb:165:in `process'
26b9b028 | /usr/share/gems/gems/actionview-6.1.7.3/lib/action_view/rendering.rb:39:in `process'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal.rb:190:in `dispatch'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_controller/metal.rb:254:in `dispatch'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/routing/route_set.rb:33:in `serve'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/journey/router.rb:50:in `block in serve'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/journey/router.rb:32:in `each'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/journey/router.rb:32:in `serve'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/routing/route_set.rb:842:in `call'
26b9b028 | /usr/share/gems/gems/katello-4.9.2/lib/katello/middleware/organization_created_enforcer.rb:18:in `call'
26b9b028 | /usr/share/gems/gems/katello-4.9.2/lib/katello/middleware/event_daemon.rb:10:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
26b9b028 | /usr/share/gems/gems/apipie-dsl-2.5.0/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
26b9b028 | /usr/share/gems/gems/apipie-rails-1.1.0/lib/apipie/static_dispatcher.rb:68:in `call'
26b9b028 | /usr/share/gems/gems/apipie-rails-1.1.0/lib/apipie/extractor/recorder.rb:139:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/static.rb:24:in `call'
26b9b028 | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in `call'
26b9b028 | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
26b9b028 | /usr/share/gems/gems/apipie-rails-1.1.0/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/tempfile_reaper.rb:15:in `call'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/etag.rb:27:in `call'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/conditional_get.rb:40:in `call'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/head.rb:12:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/http/content_security_policy.rb:19:in `call'
26b9b028 | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/session/abstract/id.rb:266:in `context'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/session/abstract/id.rb:260:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/cookies.rb:697:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/callbacks.rb:98:in `run_callbacks'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
26b9b028 | /usr/share/gems/gems/railties-6.1.7.3/lib/rails/rack/logger.rb:37:in `call_app'
26b9b028 | /usr/share/gems/gems/railties-6.1.7.3/lib/rails/rack/logger.rb:28:in `call'
26b9b028 | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
26b9b028 | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
26b9b028 | /usr/share/gems/gems/request_store-1.5.1/lib/request_store/middleware.rb:19:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/request_id.rb:26:in `call'
26b9b028 | /usr/share/gems/gems/katello-4.9.2/lib/katello/prevent_json_parsing.rb:12:in `call'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/method_override.rb:24:in `call'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/runtime.rb:22:in `call'
26b9b028 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/executor.rb:14:in `call'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/sendfile.rb:110:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/ssl.rb:77:in `call'
26b9b028 | /usr/share/gems/gems/actionpack-6.1.7.3/lib/action_dispatch/middleware/host_authorization.rb:142:in `call'
26b9b028 | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in `call'
26b9b028 | /usr/share/gems/gems/railties-6.1.7.3/lib/rails/engine.rb:539:in `call'
26b9b028 | /usr/share/gems/gems/railties-6.1.7.3/lib/rails/railtie.rb:207:in `public_send'
26b9b028 | /usr/share/gems/gems/railties-6.1.7.3/lib/rails/railtie.rb:207:in `method_missing'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/urlmap.rb:74:in `block in call'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/urlmap.rb:58:in `each'
26b9b028 | /usr/share/gems/gems/rack-2.2.7/lib/rack/urlmap.rb:58:in `call'
26b9b028 | /usr/share/gems/gems/puma-6.2.2/lib/puma/configuration.rb:270:in `call'
26b9b028 | /usr/share/gems/gems/puma-6.2.2/lib/puma/request.rb:98:in `block in handle_request'
26b9b028 | /usr/share/gems/gems/puma-6.2.2/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
26b9b028 | /usr/share/gems/gems/puma-6.2.2/lib/puma/request.rb:97:in `handle_request'
26b9b028 | /usr/share/gems/gems/puma-6.2.2/lib/puma/server.rb:431:in `process_client'
26b9b028 | /usr/share/gems/gems/puma-6.2.2/lib/puma/server.rb:233:in `block in run'
26b9b028 | /usr/share/gems/gems/puma-6.2.2/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
26b9b028 | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2023-10-19T16:22:16 [I|app|26b9b028] Rendered common/500.html.erb (Duration: 2.2ms | Allocations: 871)
2023-10-19T16:22:16 [I|app|26b9b028] Completed 500 Internal Server Error in 16ms (Views: 3.1ms | ActiveRecord: 2.6ms | Allocations: 5300)@


Related issues 1 (0 open1 closed)

Is duplicate of Katello - Bug #36721: Discovery Provisioning fails as the sync media is getting diminished from the host page even though it's syncedClosedPartha AjiActions
Actions

Also available in: Atom PDF