Problem:
Unable to change host content source after deleting a smart proxy with the katello plugin enabled.
Any pointers will be most appreicated!
What happened:
- Delete smart proxy with katello plugin enabled.
- Host record => Change host content source => Select a content source host.
- Got an error “Something went wrong while loading the Smart Proxy. See the logs for more information”.
- Foreman production.log shows something similar to:
2023-05-24T03:09:21 [I|app|3c0a18f5] Started GET “/katello/api/capsules/4” for 10.225.5.88 at 2023-05-24 03:09:21 +0000
2023-05-24T03:09:21 [I|app|3c0a18f5] Processing by Katello::Api::V2::CapsulesController#show as JSON
2023-05-24T03:09:21 [I|app|3c0a18f5] Parameters: {“api_version”=>“v2”, “id”=>“4”}
2023-05-24T03:09:21 [I|app|3c0a18f5] ActiveRecord::RecordNotFound (ActiveRecord::RecordNotFound)
2023-05-24T03:09:21 [I|app|3c0a18f5] Rendered api/v2/errors/not_found.json.rabl within api/v2/layouts/error_layout (Duration: 3.0ms | Allocations: 2597)
2023-05-24T03:09:21 [I|app|3c0a18f5] Rendered layout api/v2/layouts/error_layout.json.erb (Duration: 4.3ms | Allocations: 5131)
2023-05-24T03:09:21 [I|app|3c0a18f5] Completed 404 Not Found in 58ms (Views: 4.9ms | ActiveRecord: 7.6ms | Allocations: 30636)
Expected outcome:
One should be able to reassign content source after one of the smart proxies is removed.
Foreman and Proxy versions:
- foreman-3.5.3-1.el8.noarch
- foreman-proxy-3.5.3-1.el8.noarch
Foreman and Proxy plugin versions:
- foreman-tasks: 7.1.1
- foreman_ansible: 10.4.1
- foreman_discovery: 22.0.2
- foreman_hooks: 0.3.17
- foreman_remote_execution: 8.2.0
- foreman_webhooks: 3.0.5
- katello: 4.7.5
Distribution and version:
CentOS Stream 8.