Unable to change host content source after deleting smart proxy

Unable to change host content source after deleting a smart proxy with the katello plugin enabled.

Any pointers will be most appreicated!

What happened:

  1. Delete smart proxy with katello plugin enabled.
  2. Host record => Change host content source => Select a content source host.
  3. Got an error “Something went wrong while loading the Smart Proxy. See the logs for more information”.
  4. Foreman production.log shows something similar to:

2023-05-24T03:09:21 [I|app|3c0a18f5] Started GET “/katello/api/capsules/4” for 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.

Tracker: Bug #36431: Can't change host content source after deleting smart proxy - Katello - Foreman

Was about to link it - thanks Lucy!

Any suggestion to workaround the problem while this is getting looked at peeps?

You could unregister the host and then reregister it. I think that should be a viable workaround…

Thanks for the tip @jeremylenz.
I could unregister and register the host using the old content UI but when I tried to use the new “Change host content source” UI it failed with the same error.

This is not exactly a production system and I’m considering rebuilding. Is there any details you guys want me to collect before I blow it away?

I think we’re good, thanks anyway!

1 Like