Can't remove content view

i got error:

PG::NotNullViolation: ERROR: null value in column “katello_content_view_version_id” violates not-null constraint DETAIL: Failing row contains (468, null, 2, ce23326d-7d88-412c-a235-291b126dd091, myuser, in progress, null, 2024-06-15 21:44:19.232984, 2024-06-15 21:44:19.232984, 3, null).

how to fix?

When do you get this error? What table is it attempting to modify? What version of Katello?

I want to remove unused Content View
version: katello-4.12.0-1.el8.noarch

Is there a task running against the CV…I am not sure from the error here which table this is referring to but the " in progress" value makes it look like a task…

It’s probably katello_content_view_histories table;

But when i type

select * from katello_content_view_histories where id = 482;

don’t show anything

Is possible to remove this manually?

Is this a persistent error on the same CV? If the CV still shows up on the UI/hammer, deleting from there would be the best way…

Is this a persistent error on the same CV? - YES

I can’t delete the gui because when I delete it I get this error

Would you be able to provide a stacktrace from the logs when the deletion fails? We could go into the console and delete the particular record in question and hopefully the CV deletion will go through after that.

2024-06-18T21:26:23 [I|app|6025b0a8] Started PUT "/katello/api/v2/content_views/16/remove" for XX.XX.XX.XX at 2024-06-18 21:26:23 +0200
2024-06-18T21:26:23 [I|app|6025b0a8] Processing by Katello::Api::V2::ContentViewsController#remove as JSON
2024-06-18T21:26:23 [I|app|6025b0a8]   Parameters: {"id"=>"16", "destroy_content_view"=>true, "api_version"=>"v2", "content_view"=>{"id"=>"16"}}
2024-06-18T21:26:23 [I|bac|6025b0a8] Task {label: , execution_plan_id: 218fed4d-1a64-4b7e-b8fc-2608db586edd} state changed: pending
2024-06-18T21:26:23 [I|bac|6025b0a8] Task {label: Actions::Katello::ContentView::Remove, id: 79381ebd-308e-40ff-aaf4-bcaf11166a1f, execution_plan_id: 218fed4d-1a64-4b7e-b8fc-2608db586edd} state changed: planning
2024-06-18T21:26:23 [W|app|6025b0a8] DEPRECATION WARNING: in_content_view_environment is deprecated and will be removed in Katello 4.8.  Please use in_content_view_environments instead.
2024-06-18T21:26:23 [W|app|6025b0a8] DEPRECATION WARNING: in_content_view_environment is deprecated and will be removed in Katello 4.8.  Please use in_content_view_environments instead.
2024-06-18T21:26:23 [W|app|6025b0a8] DEPRECATION WARNING: in_content_view_environment is deprecated and will be removed in Katello 4.8.  Please use in_content_view_environments instead.
2024-06-18T21:26:23 [W|app|6025b0a8] DEPRECATION WARNING: in_content_view_environment is deprecated and will be removed in Katello 4.8.  Please use in_content_view_environments instead.
2024-06-18T21:26:23 [W|app|6025b0a8] DEPRECATION WARNING: in_content_view_environment is deprecated and will be removed in Katello 4.8.  Please use in_content_view_environments instead.
2024-06-18T21:26:23 [W|app|6025b0a8] DEPRECATION WARNING: in_content_view_environment is deprecated and will be removed in Katello 4.8.  Please use in_content_view_environments instead.
2024-06-18T21:26:23 [W|app|6025b0a8] DEPRECATION WARNING: in_content_view_environment is deprecated and will be removed in Katello 4.8.  Please use in_content_view_environments instead.
2024-06-18T21:26:23 [W|app|6025b0a8] DEPRECATION WARNING: in_content_view_environment is deprecated and will be removed in Katello 4.8.  Please use in_content_view_environments instead.
2024-06-18T21:26:23 [E|bac|6025b0a8] PG::NotNullViolation: ERROR:  null value in column "katello_content_view_version_id" violates not-null constraint
 6025b0a8 | DETAIL:  Failing row contains (490, null, 2, 79381ebd-308e-40ff-aaf4-bcaf11166a1f, 61608085, in progress, null, 2024-06-18 19:26:23.396298, 2024-06-18 19:26:23.396298, 3, null).
 6025b0a8 |  (ActiveRecord::NotNullViolation)
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `block (2 levels) in exec_no_cache'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `block in exec_no_cache'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract_adapter.rb:695:in `block in log'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract_adapter.rb:687:in `log'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql_adapter.rb:670:in `exec_no_cache'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql_adapter.rb:649:in `execute_and_clear'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:55:in `exec_query'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `exec_insert'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:93:in `exec_insert'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/database_statements.rb:171:in `insert'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/query_cache.rb:22:in `insert'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/persistence.rb:375:in `_insert_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/persistence.rb:929:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/counter_cache.rb:166:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/locking/optimistic.rb:79:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/attribute_methods/dirty.rb:201:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/callbacks.rb:461:in `block in _create_record'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:98:in `run_callbacks'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:824:in `_run_create_callbacks'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/callbacks.rb:461:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/timestamp.rb:108:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/persistence.rb:900:in `create_or_update'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/callbacks.rb:457:in `block in create_or_update'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:106:in `run_callbacks'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:824:in `_run_save_callbacks'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/callbacks.rb:457:in `create_or_update'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/timestamp.rb:126:in `create_or_update'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/persistence.rb:507:in `save!'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/validations.rb:53:in `save!'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/transactions.rb:302:in `block in save!'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/database_statements.rb:318:in `transaction'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/transactions.rb:302:in `save!'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/suppressor.rb:48:in `save!'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/persistence.rb:55:in `create!'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/lib/actions/katello/content_view/remove.rb:42:in `block (2 levels) in plan'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/lib/actions/katello/content_view/remove.rb:41:in `each'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/lib/actions/katello/content_view/remove.rb:41:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:387:in `switch_flow'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:440:in `sequence'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/lib/actions/katello/content_view/remove.rb:29:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:532:in `block (3 levels) in execute_plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:36:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:36:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/load_setting_values.rb:15:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_request_id.rb:10:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_request_id.rb:34:in `with_current_request_id'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_request_id.rb:9:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_timezone.rb:10:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_timezone.rb:31:in `with_current_timezone'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_timezone.rb:9:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_taxonomies.rb:10:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_taxonomies.rb:30:in `with_current_taxonomies'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_taxonomies.rb:9:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:36:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_user.rb:10:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_user.rb:41:in `with_current_user'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_user.rb:9:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/world.rb:31:in `execute'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:531:in `block (2 levels) in execute_plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:387:in `switch_flow'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:435:in `concurrence'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:530:in `block in execute_plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `block in with_error_handling'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `catch'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `with_error_handling'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:529:in `execute_plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:303:in `execute'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/plan_step.rb:55:in `block in execute'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract.rb:167:in `with_meta_calculation'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/plan_step.rb:54:in `execute'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:289:in `block (2 levels) in plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:387:in `switch_flow'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:377:in `with_planning_scope'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:288:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/common/transaction.rb:17:in `block in rollback_on_error'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/transactions.rb:209:in `transaction'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/transaction_adapters/active_record.rb:6:in `transaction'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/common/transaction.rb:16:in `rollback_on_error'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/common/transaction.rb:6:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/world.rb:31:in `execute'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:287:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:219:in `block (2 levels) in plan_with_options'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/coordinator.rb:326:in `acquire'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:217:in `block in plan_with_options'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:216:in `tap'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:216:in `plan_with_options'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:212:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:180:in `trigger'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:20:in `trigger'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:26:in `block in trigger_task'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:46:in `block in rails_safe_trigger_task'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:45:in `rails_safe_trigger_task'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:24:in `trigger_task'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:51:in `async_task'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks/triggers.rb:18:in `async_task'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/controllers/katello/api/v2/content_views_controller.rb:183:in `remove'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/base.rb:228:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/rendering.rb:30:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 6025b0a8 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 6025b0a8 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 6025b0a8 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 6025b0a8 | /usr/share/gems/gems/audited-5.4.3/lib/audited/sweeper.rb:16:in `around'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 6025b0a8 | /usr/share/gems/gems/audited-5.4.3/lib/audited/sweeper.rb:16:in `around'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:137:in `run_callbacks'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/callbacks.rb:41:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/rescue.rb:22:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `block in instrument'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `instrument'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/controllers/katello/concerns/api/api_controller.rb:46:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/base.rb:165:in `process'
 6025b0a8 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/rendering.rb:39:in `process'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal.rb:190:in `dispatch'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal.rb:254:in `dispatch'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:33:in `serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/mapper.rb:49:in `serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:50:in `block in serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:32:in `each'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:32:in `serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:842:in `call'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/engine.rb:539:in `call'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/railtie.rb:207:in `public_send'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/railtie.rb:207:in `method_missing'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/mapper.rb:20:in `block in <class:Constraints>'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/mapper.rb:49:in `serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:50:in `block in serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:32:in `each'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:32:in `serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:842:in `call'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/lib/katello/middleware/organization_created_enforcer.rb:18:in `call'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/lib/katello/middleware/event_daemon.rb:10:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/apipie-dsl-2.6.2/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
 6025b0a8 | /usr/share/gems/gems/apipie-rails-1.3.0/lib/apipie/static_dispatcher.rb:74:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in `call'
 6025b0a8 | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
 6025b0a8 | /usr/share/gems/gems/apipie-rails-1.3.0/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/tempfile_reaper.rb:15:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/etag.rb:27:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/conditional_get.rb:40:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/head.rb:12:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/http/content_security_policy.rb:19:in `call'
 6025b0a8 | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/session/abstract/id.rb:266:in `context'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/session/abstract/id.rb:260:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/cookies.rb:697:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:98:in `run_callbacks'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/rack/logger.rb:37:in `call_app'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/rack/logger.rb:28:in `call'
 6025b0a8 | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 6025b0a8 | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
 6025b0a8 | /usr/share/gems/gems/request_store-1.6.0/lib/request_store/middleware.rb:19:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/request_id.rb:26:in `call'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/lib/katello/prevent_json_parsing.rb:12:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/method_override.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/runtime.rb:22:in `call'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/executor.rb:14:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/sendfile.rb:110:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/ssl.rb:77:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/host_authorization.rb:142:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-cors-1.1.1/lib/rack/cors.rb:100:in `call'
 6025b0a8 | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in `call'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/engine.rb:539:in `call'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/railtie.rb:207:in `public_send'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/railtie.rb:207:in `method_missing'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/urlmap.rb:74:in `block in call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/urlmap.rb:58:in `each'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/urlmap.rb:58:in `call'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/configuration.rb:272:in `call'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:100:in `block in handle_request'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:378:in `with_force_shutdown'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:99:in `handle_request'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:464:in `process_client'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:245:in `block in run'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:155:in `block in spawn_thread'
 6025b0a8 | [ concurrent-ruby ]
2024-06-18T21:26:23 [I|bac|6025b0a8] Task {label: Actions::Katello::ContentView::Remove, id: 79381ebd-308e-40ff-aaf4-bcaf11166a1f, execution_plan_id: 218fed4d-1a64-4b7e-b8fc-2608db586edd} state changed: stopped  result: error
2024-06-18T21:26:23 [E|app|6025b0a8] ActiveRecord::NotNullViolation: PG::NotNullViolation: ERROR:  null value in column "katello_content_view_version_id" violates not-null constraint
 6025b0a8 | DETAIL:  Failing row contains (490, null, 2, 79381ebd-308e-40ff-aaf4-bcaf11166a1f, 61608085, in progress, null, 2024-06-18 19:26:23.396298, 2024-06-18 19:26:23.396298, 3, null).
 6025b0a8 |
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `block (2 levels) in exec_no_cache'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `block in exec_no_cache'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract_adapter.rb:695:in `block in log'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract_adapter.rb:687:in `log'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql_adapter.rb:670:in `exec_no_cache'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql_adapter.rb:649:in `execute_and_clear'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:55:in `exec_query'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `exec_insert'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:93:in `exec_insert'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/database_statements.rb:171:in `insert'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/query_cache.rb:22:in `insert'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/persistence.rb:375:in `_insert_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/persistence.rb:929:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/counter_cache.rb:166:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/locking/optimistic.rb:79:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/attribute_methods/dirty.rb:201:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/callbacks.rb:461:in `block in _create_record'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:98:in `run_callbacks'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:824:in `_run_create_callbacks'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/callbacks.rb:461:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/timestamp.rb:108:in `_create_record'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/persistence.rb:900:in `create_or_update'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/callbacks.rb:457:in `block in create_or_update'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:106:in `run_callbacks'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:824:in `_run_save_callbacks'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/callbacks.rb:457:in `create_or_update'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/timestamp.rb:126:in `create_or_update'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/persistence.rb:507:in `save!'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/validations.rb:53:in `save!'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/transactions.rb:302:in `block in save!'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/database_statements.rb:318:in `transaction'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/transactions.rb:302:in `save!'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/suppressor.rb:48:in `save!'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/persistence.rb:55:in `create!'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/lib/actions/katello/content_view/remove.rb:42:in `block (2 levels) in plan'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/lib/actions/katello/content_view/remove.rb:41:in `each'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/lib/actions/katello/content_view/remove.rb:41:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:387:in `switch_flow'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:440:in `sequence'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/lib/actions/katello/content_view/remove.rb:29:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:532:in `block (3 levels) in execute_plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:36:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:36:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/load_setting_values.rb:15:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_request_id.rb:10:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_request_id.rb:34:in `with_current_request_id'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_request_id.rb:9:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_timezone.rb:10:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_timezone.rb:31:in `with_current_timezone'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_timezone.rb:9:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_taxonomies.rb:10:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_taxonomies.rb:30:in `with_current_taxonomies'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_taxonomies.rb:9:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:36:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_user.rb:10:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_user.rb:41:in `with_current_user'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_user.rb:9:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/world.rb:31:in `execute'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:531:in `block (2 levels) in execute_plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:387:in `switch_flow'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:435:in `concurrence'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:530:in `block in execute_plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `block in with_error_handling'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `catch'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:490:in `with_error_handling'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:529:in `execute_plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/action.rb:303:in `execute'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/plan_step.rb:55:in `block in execute'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/abstract.rb:167:in `with_meta_calculation'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan/steps/plan_step.rb:54:in `execute'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:289:in `block (2 levels) in plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:387:in `switch_flow'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:377:in `with_planning_scope'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:288:in `block in plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/common/transaction.rb:17:in `block in rollback_on_error'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/transactions.rb:209:in `transaction'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/transaction_adapters/active_record.rb:6:in `transaction'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/common/transaction.rb:16:in `rollback_on_error'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/common/transaction.rb:6:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:27:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:19:in `pass'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware.rb:44:in `plan_phase'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/stack.rb:23:in `call'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/middleware/world.rb:31:in `execute'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/execution_plan.rb:287:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:219:in `block (2 levels) in plan_with_options'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/coordinator.rb:326:in `acquire'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:217:in `block in plan_with_options'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:216:in `tap'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:216:in `plan_with_options'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:212:in `plan'
 6025b0a8 | /usr/share/gems/gems/dynflow-1.8.2/lib/dynflow/world.rb:180:in `trigger'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:20:in `trigger'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:26:in `block in trigger_task'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:46:in `block in rails_safe_trigger_task'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:45:in `rails_safe_trigger_task'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:24:in `trigger_task'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks.rb:51:in `async_task'
 6025b0a8 | /usr/share/gems/gems/foreman-tasks-9.1.1/lib/foreman_tasks/triggers.rb:18:in `async_task'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/controllers/katello/api/v2/content_views_controller.rb:183:in `remove'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/base.rb:228:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/rendering.rb:30:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 6025b0a8 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 6025b0a8 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 6025b0a8 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 6025b0a8 | /usr/share/gems/gems/audited-5.4.3/lib/audited/sweeper.rb:16:in `around'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 6025b0a8 | /usr/share/gems/gems/audited-5.4.3/lib/audited/sweeper.rb:16:in `around'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:137:in `run_callbacks'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/callbacks.rb:41:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/rescue.rb:22:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `block in instrument'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `instrument'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
 6025b0a8 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/app/controllers/katello/concerns/api/api_controller.rb:46:in `process_action'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/base.rb:165:in `process'
 6025b0a8 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/rendering.rb:39:in `process'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal.rb:190:in `dispatch'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal.rb:254:in `dispatch'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:33:in `serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/mapper.rb:49:in `serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:50:in `block in serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:32:in `each'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:32:in `serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:842:in `call'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/engine.rb:539:in `call'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/railtie.rb:207:in `public_send'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/railtie.rb:207:in `method_missing'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/mapper.rb:20:in `block in <class:Constraints>'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/mapper.rb:49:in `serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:50:in `block in serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:32:in `each'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:32:in `serve'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:842:in `call'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/lib/katello/middleware/organization_created_enforcer.rb:18:in `call'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/lib/katello/middleware/event_daemon.rb:10:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/apipie-dsl-2.6.2/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
 6025b0a8 | /usr/share/gems/gems/apipie-rails-1.3.0/lib/apipie/static_dispatcher.rb:74:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call'
 6025b0a8 | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in `call'
 6025b0a8 | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
 6025b0a8 | /usr/share/gems/gems/apipie-rails-1.3.0/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/tempfile_reaper.rb:15:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/etag.rb:27:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/conditional_get.rb:40:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/head.rb:12:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/http/content_security_policy.rb:19:in `call'
 6025b0a8 | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/session/abstract/id.rb:266:in `context'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/session/abstract/id.rb:260:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/cookies.rb:697:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:98:in `run_callbacks'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/rack/logger.rb:37:in `call_app'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/rack/logger.rb:28:in `call'
 6025b0a8 | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
 6025b0a8 | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
 6025b0a8 | /usr/share/gems/gems/request_store-1.6.0/lib/request_store/middleware.rb:19:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/request_id.rb:26:in `call'
 6025b0a8 | /usr/share/gems/gems/katello-4.12.0/lib/katello/prevent_json_parsing.rb:12:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/method_override.rb:24:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/runtime.rb:22:in `call'
 6025b0a8 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/executor.rb:14:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/sendfile.rb:110:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/ssl.rb:77:in `call'
 6025b0a8 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/host_authorization.rb:142:in `call'
 6025b0a8 | /usr/share/gems/gems/rack-cors-1.1.1/lib/rack/cors.rb:100:in `call'
 6025b0a8 | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in `call'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/engine.rb:539:in `call'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/railtie.rb:207:in `public_send'
 6025b0a8 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/railtie.rb:207:in `method_missing'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/urlmap.rb:74:in `block in call'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/urlmap.rb:58:in `each'
 6025b0a8 | /usr/share/gems/gems/rack-2.2.8/lib/rack/urlmap.rb:58:in `call'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/configuration.rb:272:in `call'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:100:in `block in handle_request'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:378:in `with_force_shutdown'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:99:in `handle_request'
 6025b0a8 | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:464:in `process_client'

this is log from /var/log/foreman/production.log when i try remove

Log from hammer
hammer content-view remove-from-environment --id 16 --lifecycle-environment Developer

Could not remove the content view from environment:
  PG::NotNullViolation: ERROR:  null value in column "katello_content_view_version_id" violates not-null constraint
  DETAIL:  Failing row contains (497, null, 16, 7ba5d0c7-babb-48c3-9661-ec9ccd3e325e, admin, in progress, null, 2024-06-19 06:59:28.490369, 2024-06-19 06:59:28.490369, 3, null).

I managed to publish new version and then deleted the entire content view.