Bug 1387776
Summary: | Unable to view activation keys in satellite web-ui as well as in hammer since upgrade | |||
---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Prashant Waghmare <pwaghmar> | |
Component: | Activation Keys | Assignee: | Justin Sherrill <jsherril> | |
Status: | CLOSED ERRATA | QA Contact: | Lukas Pramuk <lpramuk> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 6.2.2 | CC: | akofink, bbuckingham, bkearney, cduryee, ehelms, jcallaha, jsherril, lpramuk, mlele, nitthoma, rbobek | |
Target Milestone: | Unspecified | Keywords: | Triaged | |
Target Release: | Unused | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | rubygem-katello-3.0.0.98-1 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1417112 (view as bug list) | Environment: | ||
Last Closed: | 2017-03-06 08:29:45 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1417112 |
Description
Prashant Waghmare
2016-10-21 20:43:59 UTC
Upstream bug assigned to jsherril Upstream bug assigned to jsherril Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16931 has been resolved. What is reproducer here? I just upgraded 6.1.11 to 6.2.7 and activation-keys remain present. What kind of AKs it has to be to reproduce? Lukas, I believe you have to have to have repositories that are no longer supported with a valid subscription (i.e. delete your manifest) on the activation key. Re-flag needinfo if this doesn't work. Andrew, yet before the upgrade I deleted a manifest, but still no luck reproducing this issue - AKs after the upgrade are all visible. (I associated 3 AKs to different subs in the manifest - 1 to all, 1 to employee only, 1 to atomic only) Lukas, I see what you're saying (just tried it on 6.2.7). One way to definitely reproduce this issue is to remove the relationship manually: ``` foreman-rake console User.current = User.find_by(login: 'admin') ak = Katello::ActivationKey.find(1) pools = ak.get_key_pools.collect { |cp_pool| Katello::Pool.find_by(:cp_id => cp_pool['id']) } pools.first.subscription_id = nil pools.first.save ``` hammer activation-key list --organization-id 1 On 6.1.z, you would need to change the find_by calls to find_by_<field>, like this: ``` foreman-rake console User.current = User.find_by_login('admin') ak = Katello::ActivationKey.find(1) pools = ak.get_key_pools.collect { |cp_pool| Katello::Pool.find_by_cp_id( cp_pool['id']) } pools.first.subscription_id = nil pools.first.save ``` VERIFIED. @satellite-6.2.8-1.0.el7sat.noarch tfm-rubygem-katello-3.0.0.102-1.el7sat.noarch by this manual reproducer: 1. @Sat6.2.2 create AK and associate with subscription(s) # hammer --csv activation-key list --organization-id 1 ID,Name,Host Limit,Lifecycle Environment,Content View 1,AK_1,0 of Unlimited,Library,CV_1 2. Simulate broken relationship of AK with subscription # foreman-rake console ... irb(main):001:0> User.current = User.find_by(login: 'admin') ... irb(main):002:0> ak = Katello::ActivationKey.find(1) ... irb(main):003:0> pools = ak.get_key_pools.collect { |cp_pool| Katello::Pool.find_by(:cp_id => cp_pool['id']) } ... irb(main):004:0> pools.first.subscription_id = nil => nil irb(main):005:0> pools.first.save => true 3. Try to list AKs # hammer activation-key list --organization-id 1 undefined method `products' for nil:NilClass @UI: /activation_keys page is now loading forever 4. Upgrade to 6.2.8 # yum upgrade ... # satellite-installer --upgrade ... Upgrade completed! 5. List AKs # hammer --csv activation-key list --organization-id 1 ID,Name,Host Limit,Lifecycle Environment,Content View 1,AK_1,0 of Unlimited,Library,CV_1 @UI: /activation_keys page loads successfully Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:0447 |