Description of problem: Activation key page doesn't load when an Activation key got created without the candlepin pool id Version-Release number of selected component (if applicable): Satellite 6.2.14 How reproducible: - Always by manipulating database table. - Not sure yet on how this happened in production, but so far we saw this with one customer. Steps to Reproduce: 1. We are not exactly sure on how this happened at the customer environment. But they have been restarting katello-service often and have multiple scripts run by multiple engineers to perform satellite day to day activities. But I can reproduce this with table updates as shown below. # sudo su - postgres # psql foreman foreman=# select * from katello_activation_keys where name = 'testincorrectak'; id | name | description | organization_id | environment_id | cre ated_at | updated_at | user_id | max_hosts | content_view_id | cp_id | release_version | unlimited_hosts | auto_attac h ----+-----------------+-------------+-----------------+----------------+------------ ----------------+----------------------------+---------+-----------+---------------- -+----------------------------------+-----------------+-----------------+----------- -- 3 | testincorrectak | | 1 | 2 | 2018-04-13 20:23:42.340106 | 2018-04-13 20:23:43.224347 | 3 | | 3 | ff80808162ac47270162c0ad91200115 | | t | t (1 row) foreman=# update katello_activation_keys set cp_id=NULL where name = 'testincorrectak'; UPDATE 1 foreman=# select * from katello_activation_keys where name = 'testincorrectak'; id | name | description | organization_id | environment_id | cre ated_at | updated_at | user_id | max_hosts | content_view_id | cp_id | release_version | unlimited_hosts | auto_attach ----+-----------------+-------------+-----------------+----------------+------------ ----------------+----------------------------+---------+-----------+---------------- -+-------+-----------------+-----------------+------------- 3 | testincorrectak | | 1 | 2 | 2018-04-13 20:23:42.340106 | 2018-04-13 20:23:43.224347 | 3 | | 3 | | | t | t (1 row) Actual results: After the above table update, go to Satellite UI -> Activation Keys. The page will load forever and will not finish. Error in production.log: 2018-04-13 16:41:48 [app] [E] RestClient::ResourceNotFound: Katello::Resources::Candlepin::CandlepinResource: 404 Resource Not Found {"displayMessage":"Runtime Error RESTEASY001185: Could not find resource for relative : /activation_keys//content_overrides of full path: https://localhost:8443/candlepin/activation_keys//content_overrides at org.jboss.resteasy.core.registry.PathParamSegment.matchPattern:209","requestUuid":"269c5713-8946-4344-8cc3-76d257195b39"} (GET /candlepin/activation_keys//content_overrides) | Body: {"displayMessage":"Runtime Error RESTEASY001185: Could not find resource for relative : /activation_keys//content_overrides of full path: https://localhost:8443/candlepin/activation_keys//content_overrides at org.jboss.resteasy.core.registry.PathParamSegment.matchPattern:209","requestUuid":"269c5713-8946-4344-8cc3-76d257195b39"} | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!' | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result' | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.38.1/lib/restclient_ext/request.rb:50:in `block in transmit' | /opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start' | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.38.1/lib/restclient_ext/request.rb:44:in `transmit' | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute' | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute' Expected results: Activation key page works fine if an activation key exists without candlepin pool id for whatever reason. There can be an error or warning saying that a specific activation key needs to be removed. Additional info: workaround: foreman=# delete from katello_activation_keys where name = 'testincorrectak'; DELETE 1
Once the AK is corrupted, it is not deletable via normal means and you have to go into the database to clear it. The AK delete dynflow task will hang out for a few minutes and then go into paused/error state. It would be better if the delete task deleted the katello record even if the candlepin record does not exist.
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.
FYI< I ran into this issue when using https://console.redhat.com/ansible/automation-hub/repo/published/redhat/satellite/content/module/activation_key but forgetting to specify the content_overrides argument. I followed the steps https://access.redhat.com/solutions/6247611 to rectify the issue. No need for support to respond, but it may be useful to make the ansible module handle that scenario a little better.