Bug 1567352 - Activation key page doesn't load when an Activation key got created without the candlepin pool id
Summary: Activation key page doesn't load when an Activation key got created without t...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Activation Keys
Version: 6.2.14
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Cole Higgins
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-13 20:42 UTC by sthirugn@redhat.com
Modified: 2021-09-09 13:47 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-03 12:05:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description sthirugn@redhat.com 2018-04-13 20:42:54 UTC
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

Comment 1 Chris Duryee 2018-04-13 21:44:18 UTC
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.

Comment 3 Bryan Kearney 2019-05-02 19:06:58 UTC
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.

Comment 4 Bryan Kearney 2019-06-03 12:05:47 UTC
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.

Comment 5 Matt 2021-08-12 20:50:32 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.