What Versions of Foreman / Katello to use for a production deployment

I would like to know what versions of Foreman and Katello would be considered production ready.
I have an install of foreman-2.1.3-1.el7.noarch with katello-3.16.1-1.el7.noarch and I’m having lots of issues with not being able to delete content-views / activation-keys either thru the gui or via hammer cli or via foreman ansible modules.

I see that 2.2.0 has been released is that considered production ? ie even numbered versions stable odd numbered versions development ?

And what version of Katello is considered production ready ? 3.16 ?

I have to deploy a new foreman/katello for our production environment as we are well behind and using old foreman Version 1.15.6 (I know don’t yell not my fault)

Any info would be appreciated.

Also any tips on how to manually remove activation-keys content views etc from the postgres db would be helpful .

Generally speaking, all releases are considered production ready, there is no even/odd notation as with other projects. So if you had issues with them, we should look into the individual issues (together with the @katello team).

As for the individual versions: Katello is officially only compatible with one Foreman release, so if you want Katello 3.16, you need Foreman 2.1. There is no final release of Katello 3.17 yet, which will be compatible with Foreman 2.2.

2 Likes

Thanks for the clarification.
So I have a few problems then that maybe someone can help with.
They are:

  1. activation-keys that I cant delete either in the gui or via hammer cli.
    I can see the key listed
    Content->Activation Keys->keyname
    but when I select the key so i can try to delete it I get the following error:
    Katello::Resources::Candlepin::CandlepinResource: 404 Not Found {“displayMessage”:“Runtime Error RESTEASY003210: Could not find resource for full path: https://localhost:8443/candlepin/activation_keys//content_overrides at org.jboss.resteasy.core.registry.SegmentNode.match:153”,“requestUuid”:“79a40496-1bff-4a95-a1c7-c823d43229f4”} (GET /candlepin/activation_keys//content_overrides)

and i cant do anything with it.
Looking at the error it looks like the keyname doesnt appear in the api GET /candlepin/activation_keys/ {missing here i think} /content_overrides

I just cant workout how to get rid of the activation-key.

I have also asked this same question in the element forum channel trying to get a quick response.

I also have issues with packages not showing up in a published content view on client machines.
but first things first how to delete the activation-keys that I cant delete.

Yeah, I think your guess is right and that internal request is missing the activationkey id.

Could you please try deleting the same key using the CLI? Something like hammer activation-key delete --name "The Name of the Key" --organization "Your Organization" should do it. Just to rule out it’s an issue with the WebUI.

If it still fails, it’d be nice to see the full error (and the surrounding request information) that is logged to /var/log/foreman/production.log.

This is the error returned by hammer:

[root@hostname ~]# hammer activation-key delete --name “ak-mhr-oel7-nonp”
–organization “mhr”
Could not delete the activation key:
Task 0aefa66f-3957-4e65-9842-c42f6dab096c: ArgumentError: activation key
id has to be specified

this is the production.log
‘’’
2020-11-04T21:24:41 [I|app|ca8c2549] Started GET
“/katello/api/organizations?search=name+%3D+%22mhr%22&per_page=1000&page=1”
for 127.0.0.1 at 2020-11-04 21:24:41 +1100
2020-11-04T21:24:41 [I|app|ca8c2549] Processing by
Katello::Api::V2::OrganizationsController#index as JSON
2020-11-04T21:24:41 [I|app|ca8c2549] Parameters: {“search”=>“name =
“mhr””, “per_page”=>“1000”, “page”=>“1”, “api_version”=>“v2”,
“organization”=>{}}
2020-11-04T21:24:41 [I|app|ca8c2549] Authorized user admin(Admin User)
2020-11-04T21:24:41 [I|app|ca8c2549] Rendering
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/views/katello/api/v2/organizations/index.json.rabl
within api/v2/layouts/index_layout
2020-11-04T21:24:41 [I|app|ca8c2549] Rendered
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/views/katello/api/v2/organizations/index.json.rabl
within api/v2/layouts/index_layout (Duration: 3.3ms | Allocations: 984)
2020-11-04T21:24:41 [I|app|ca8c2549] Completed 200 OK in 166ms (Views:
9.1ms | ActiveRecord: 28.1ms | Allocations: 17692)
2020-11-04T21:24:41 [I|app|e3fb33f7] Started GET
“/katello/api/organizations/3/activation_keys?name=ak-mhr-oel7-nonp&per_page=1000&page=1”
for 127.0.0.1 at 2020-11-04 21:24:41 +1100
2020-11-04T21:24:41 [I|app|e3fb33f7] Processing by
Katello::Api::V2::ActivationKeysController#index as JSON
2020-11-04T21:24:41 [I|app|e3fb33f7] Parameters:
{“name”=>“ak-mhr-oel7-nonp”, “per_page”=>“1000”, “page”=>“1”,
“api_version”=>“v2”, “organization_id”=>“3”, “activation_key”=>{}}
2020-11-04T21:24:42 [I|app|e3fb33f7] Authorized user admin(Admin User)
2020-11-04T21:24:42 [I|app|e3fb33f7] Rendering
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/views/katello/api/v2/activation_keys/index.json.rabl
within katello/api/v2/layouts/collection
2020-11-04T21:24:42 [I|app|e3fb33f7] Rendered
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/views/katello/api/v2/activation_keys/index.json.rabl
within katello/api/v2/layouts/collection (Duration: 73.3ms | Allocations:
18110)
2020-11-04T21:24:42 [I|app|e3fb33f7] Completed 200 OK in 208ms (Views:
43.0ms | ActiveRecord: 52.2ms | Allocations: 31134)
2020-11-04T21:24:42 [I|app|3552413e] Started DELETE
“/katello/api/activation_keys/13” for 127.0.0.1 at 2020-11-04 21:24:42 +1100
2020-11-04T21:24:42 [I|app|3552413e] Processing by
Katello::Api::V2::ActivationKeysController#destroy as JSON
2020-11-04T21:24:42 [I|app|3552413e] Parameters: {“api_version”=>“v2”,
“id”=>“13”, “activation_key”=>{}}
2020-11-04T21:24:42 [I|app|3552413e] Authorized user admin(Admin User)
2020-11-04T21:24:42 [I|bac|3552413e] Task {label:
Actions::Katello::ActivationKey::Destroy, id:
039e732b-19fe-48cd-8aea-be3f3c1b1ab3, execution_plan_id:
ac6596e4-9a0d-43c0-9fc5-43da7fbc6bcd} state changed: planning
2020-11-04T21:24:42 [I|bac|] Task {label:
Actions::Katello::ActivationKey::Destroy, id:
039e732b-19fe-48cd-8aea-be3f3c1b1ab3, execution_plan_id:
ac6596e4-9a0d-43c0-9fc5-43da7fbc6bcd} state changed: planned
2020-11-04T21:24:42 [I|bac|] Task {label:
Actions::Katello::ActivationKey::Destroy, id:
039e732b-19fe-48cd-8aea-be3f3c1b1ab3, execution_plan_id:
ac6596e4-9a0d-43c0-9fc5-43da7fbc6bcd} state changed: running
2020-11-04T21:24:42 [E|bac|] activation key id has to be specified
(ArgumentError)
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/katello/resources/candlepin/activation_key.rb:35:in
destroy' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/candlepin/activation_key/destroy.rb:9:in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:571:in
block (3 levels) in execute_run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in
pass' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/middleware/keep_session_id.rb:11:in block in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/middleware/keep_session_id.rb:23:in
with_session_id' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/middleware/keep_session_id.rb:11:in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in
pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:32:in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in
pass' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/middleware/propagate_candlepin_errors.rb:9:in block in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/middleware/propagate_candlepin_errors.rb:19:in
propagate_candlepin_errors' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/middleware/propagate_candlepin_errors.rb:9:in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in
pass' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/middleware/remote_action.rb:16:in block in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/middleware/remote_action.rb:40:in
block in as_remote_user' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/models/katello/concerns/user_extensions.rb:21:in cp_config’
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/middleware/remote_action.rb:27:in
as_cp_user' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/middleware/remote_action.rb:39:in as_remote_user’
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/lib/actions/middleware/remote_action.rb:16:in
run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in
pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/rails_executor_wrap.rb:14:in
block in run' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/execution_wrapper.rb:88:in wrap’
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/rails_executor_wrap.rb:13:in
run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in
pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action/progress.rb:31:in
with_progress_calculation' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action/progress.rb:17:in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in
pass' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_request_id.rb:15:in block in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_request_id.rb:49:in
restore_current_request_id' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_request_id.rb:15:in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in
pass' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_timezone.rb:15:in block in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_timezone.rb:44:in
restore_curent_timezone' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_timezone.rb:15:in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in
pass' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_user.rb:15:in block in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_user.rb:44:in
restore_curent_user' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_user.rb:15:in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in
pass' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in block in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_taxonomies.rb:45:in
restore_current_taxonomies' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in pass’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in
pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:32:in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/world.rb:31:in execute’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:570:in
block (2 levels) in execute_run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:569:in catch’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:569:in
block in execute_run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:472:in block in with_error_handling’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:472:in
catch' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:472:in with_error_handling’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:564:in
execute_run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:285:in execute’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:18:in
block (2 levels) in execute' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/execution_plan/steps/abstract.rb:167:in with_meta_calculation’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:17:in
block in execute' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:32:in open_action’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:16:in
execute' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/director.rb:68:in execute’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/executors/sidekiq/worker_jobs.rb:11:in
block (2 levels) in perform' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/executors.rb:18:in run_user_code’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/executors/sidekiq/worker_jobs.rb:9:in
block in perform' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/executors/sidekiq/worker_jobs.rb:25:in with_telemetry’
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/executors/sidekiq/worker_jobs.rb:8:in
perform' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/executors/sidekiq/serialization.rb:27:in perform’
[ sidekiq ]
[ concurrent-ruby ]
2020-11-04T21:24:43 [I|bac|] Task {label:
Actions::Katello::ActivationKey::Destroy, id:
039e732b-19fe-48cd-8aea-be3f3c1b1ab3, execution_plan_id:
ac6596e4-9a0d-43c0-9fc5-43da7fbc6bcd} state changed: paused result: error
2020-11-04T21:24:43 [E|app|] ForemanTasks::TaskError: Task
039e732b-19fe-48cd-8aea-be3f3c1b1ab3: ArgumentError: activation key id has
to be specified
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/lib/foreman_tasks.rb:59:in
block in sync_task' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/lib/foreman_tasks.rb:58:in tap’
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/lib/foreman_tasks.rb:58:in
sync_task' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-2.0.2/lib/foreman_tasks/triggers.rb:22:in sync_task’
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/controllers/katello/api/v2/activation_keys_controller.rb:81:in
destroy' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_controller/metal/basic_implicit_render.rb:6:in send_action’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/abstract_controller/base.rb:195:in
process_action' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_controller/metal/rendering.rb:30:in process_action’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/abstract_controller/callbacks.rb:42:in
block in process_action' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:112:in block in run_callbacks’
/usr/share/foreman/app/controllers/api/v2/base_controller.rb:163:in
disable_json_root' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:121:in block in run_callbacks’
/usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in
set_timezone' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:121:in block in run_callbacks’
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in
clear_thread' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:121:in block in run_callbacks’
/usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in
set_topbar_sweeper_controller' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:121:in block in run_callbacks’
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in
around' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:121:in block in run_callbacks’
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in
around' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:121:in block in run_callbacks’
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:139:in
run_callbacks' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/abstract_controller/callbacks.rb:41:in process_action’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_controller/metal/rescue.rb:22:in
process_action' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_controller/metal/instrumentation.rb:33:in block in process_action’
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/notifications.rb:180:in
block in instrument' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/notifications/instrumenter.rb:24:in instrument’
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/notifications.rb:180:in
instrument' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_controller/metal/instrumentation.rb:32:in process_action’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_controller/metal/params_wrapper.rb:245:in
process_action' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.1/lib/active_record/railties/controller_runtime.rb:27:in process_action’
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/app/controllers/katello/concerns/api/api_controller.rb:40:in
process_action' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/abstract_controller/base.rb:136:in process’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/rendering.rb:39:in
process' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_controller/metal.rb:190:in dispatch’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_controller/metal.rb:254:in
dispatch' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/route_set.rb:50:in dispatch’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/route_set.rb:33:in
serve' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/mapper.rb:18:in block in class:Constraints
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/mapper.rb:48:in
serve' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:49:in block in serve’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:32:in
each' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:32:in serve’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/route_set.rb:834:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.1/lib/rails/engine.rb:527:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.1/lib/rails/railtie.rb:190:in
public_send' /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.1/lib/rails/railtie.rb:190:in method_missing’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/mapper.rb:19:in
block in <class:Constraints>' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/mapper.rb:48:in serve’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:49:in
block in serve' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:32:in each’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:32:in
serve' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/route_set.rb:834:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/lib/katello/middleware/event_daemon.rb:10:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/static.rb:126:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/static.rb:126:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-dsl-2.2.2/lib/apipie_dsl/static_dispatcher.rb:67:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/static_dispatcher.rb:66:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/extractor/recorder.rb:137:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/static.rb:126:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/static.rb:126:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/static.rb:126:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/static.rb:126:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/static.rb:126:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/static.rb:126:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/static.rb:126:in
call' /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/middleware/checksum_in_headers.rb:27:in
call' /usr/share/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/tempfile_reaper.rb:15:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/etag.rb:27:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/conditional_get.rb:40:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/head.rb:12:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/http/content_security_policy.rb:18:in
call' /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/session/abstract/id.rb:266:in
context' /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/session/abstract/id.rb:260:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/cookies.rb:648:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/callbacks.rb:27:in block in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:101:in
run_callbacks' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/callbacks.rb:26:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/debug_exceptions.rb:32:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.1/lib/rails/rack/logger.rb:37:in call_app’
/opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.1/lib/rails/rack/logger.rb:28:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in call’
/usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/remote_ip.rb:81:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/request_id.rb:27:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.1.2/lib/katello/prevent_json_parsing.rb:12:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/method_override.rb:24:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/runtime.rb:22:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/executor.rb:14:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/static.rb:126:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/sendfile.rb:110:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/host_authorization.rb:76:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/secure_headers-6.3.0/lib/secure_headers/middleware.rb:11:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.1/lib/rails/engine.rb:527:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.1/lib/rails/railtie.rb:190:in public_send’
/opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.1/lib/rails/railtie.rb:190:in
method_missing' /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/urlmap.rb:74:in block in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/urlmap.rb:58:in
each' /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.2/lib/rack/urlmap.rb:58:in call’
/opt/theforeman/tfm/root/usr/share/gems/gems/puma-4.3.3/lib/puma/configuration.rb:228:in
call' /opt/theforeman/tfm/root/usr/share/gems/gems/puma-4.3.3/lib/puma/server.rb:682:in handle_request’
/opt/theforeman/tfm/root/usr/share/gems/gems/puma-4.3.3/lib/puma/server.rb:472:in
process_client' /opt/theforeman/tfm/root/usr/share/gems/gems/puma-4.3.3/lib/puma/server.rb:328:in block in run’
/opt/theforeman/tfm/root/usr/share/gems/gems/puma-4.3.3/lib/puma/thread_pool.rb:134:in
block in spawn_thread' /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in block in create_with_logging_context’
2020-11-04T21:24:43 [I|app|] Completed 500 Internal Server Error in 996ms
(Views: 0.3ms | ActiveRecord: 42.1ms | Allocations: 72464)
‘’’

How do you create the key, which options are set on it?

(I can’t reproduce the issue with an “empty” key)

Im using the foreman ansible module with simple play for activation keys using the following settings:

  • name: “ak-test-key-2”
    organization: “mhr”
    lifecycle_environment: “NONP”
    content_view: “cv-test1”
    subscriptions:
    • name: “OEL7”
    • name: “puppet6”
    • name: “subscription-manager”
    • name: “zabbix”
    • name: “elasticsearch”
      auto_attach: yes
      state: present

With this I can create the key and delete it using the ansible module and also delete it using the gui.
I seem to have a problem with an activation key that is associated to a content view that looks to have some missing bits in the database.

This is all I can put it down to.

So I guess I need to know how to remove the relevant database entries as the gui and ansible modules wont delete the offending content view which in turn wont let me delete the associated activation key that has reference to the bad content view.

circular dependencies.

Is there some tool that will go thru the relevant databases and either report or fix any entries with incorrect id’s or fields.

Its looking like im going to have to explore the database to see if i can find the missing links.

Okay, yeah, if that’s a data inconsistency, then it’s hard to repro.

I am not aware of any such tool. Maybe someone from @katello is?