Bug 817634 - Adding a "bonus pool" to an activation key, then removing parent pool, causes errors
Summary: Adding a "bonus pool" to an activation key, then removing parent pool, causes...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: 1.X
Assignee: Tom McKay
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On: 807291 827549
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-30 17:21 UTC by Tom McKay
Modified: 2017-06-26 20:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 807291
Environment:
Last Closed: 2017-06-26 20:39:58 UTC
Embargoed:
tomckay: automate_bug?


Attachments (Terms of Use)
Added bonus pool to an activation key and then unsubscribe the system. (139.66 KB, image/png)
2012-05-14 08:44 UTC, Tazim Kolhar
no flags Details

Description Tom McKay 2012-04-30 17:21:59 UTC
+++ This bug was initially created as a clone of Bug #807291 +++

Description of problem:

While creating an activation key I added a bonus pool to it (an available subscription created by consumption of a physical subscription). I then removed the system with the physical subscription, thus effectively eliminating the bonus pool. Viewing the activation key and selecting "Applied Subscriptions" tab throws error:

undefined method `productName' for nil:NilClass

Started GET "/katello/activation_keys/1/applied_subscriptions" for 10.11.230.24 at Tue Mar 27 08:48:24 -0400 2012
  Processing by ActivationKeysController#applied_subscriptions as HTML
  Parameters: {"id"=>"1"}
Setting locale: en
Setting current user thread-local variable to admin
Checking  params  for activation_keys/applied_subscriptions
Authorizing admin for activation_keys/applied_subscriptions
Resource GET request: /candlepin/owners/ACME_Corporation/pools?
Processing response: 200
Setting current user thread-local variable to nil
undefined method `productName' for nil:NilClass
undefined method `productName' for nil:NilClass
#<NoMethodError: undefined method `productName' for nil:NilClass>
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/whiny_nil.rb:48:in `method_missing'
/home/tomckay/code/katello/src/app/controllers/activation_keys_controller.rb:323:in `pools_hash'
/home/tomckay/code/katello/src/app/controllers/activation_keys_controller.rb:322:in `each'
/home/tomckay/code/katello/src/app/controllers/activation_keys_controller.rb:322:in `pools_hash'
/home/tomckay/code/katello/src/app/controllers/activation_keys_controller.rb:315:in `retrieve_applied_pools'
/home/tomckay/code/katello/src/app/controllers/activation_keys_controller.rb:84:in `applied_subscriptions'

--- Additional comment from jlaska on 2012-04-18 10:21:06 EDT ---

Hi Tom, what's the customer impact of this issue?  Is this a common scenario?  Does the presence of the 'nil:NilClass' failure introduce any non-recoverable issues?

--- Additional comment from mmccune on 2012-04-18 11:43:05 EDT ---

moving to 1.0.z

--- Additional comment from tomckay on 2012-04-30 12:48:47 EDT ---

Hopefully not common. 1.0.z would be good

Comment 1 Tom McKay 2012-05-02 13:27:18 UTC
  Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: 29d5d46ca6b4a96c2b410b6f765b72c1732fc941
      https://github.com/Katello/katello/commit/29d5d46ca6b4a96c2b410b6f765b72c1732fc941
  Author: Tom McKay <thomasmckay>
  Date:   2012-05-01 (Tue, 01 May 2012)

Subscription pools are checked for validity before the activation key can be accessed.

Comment 2 Tom McKay 2012-05-10 12:43:52 UTC
Note for testing: Subscribe a physical system to a pool that includes "up to 1 guest"; this will create a virtual-only "bonus" pool. Add this virtual pool to an activation key. Now unsubscribe the physical system; this will remove the bonus pool. Visit the activation key created early and confirm that the subscription is no longer there.

Comment 3 Tazim Kolhar 2012-05-14 08:44:12 UTC
Created attachment 584288 [details]
Added bonus pool to an activation key and then unsubscribe the system.

Comment 4 Tazim Kolhar 2012-05-14 08:48:13 UTC
Comment on attachment 584288 [details]
Added bonus pool to an activation key and then unsubscribe the system.

VERIFIED with the build :
[root@dhcp201-195 ~]# rpm -qa | grep katello
katello-cli-headpin-0.2.0-1.el6_2.noarch
katello-selinux-0.2.4-1.el6_2.noarch
katello-common-0.3.1-1.el6_2.noarch
katello-headpin-0.2.6-4.el6_2.noarch
katello-glue-candlepin-0.3.1-1.el6_2.noarch
katello-cli-common-0.3.2-3.el6_2.noarch
katello-headpin-all-0.2.6-4.el6_2.noarch
katello-configure-0.3.3-2.el6_2.noarch
katello-certs-tools-1.1.5-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch

Subscribed a physical system to a pool that includes "up to 1 guest"
.

A virtual bonus pool created was added to an activation key.

The system was unsubscribed.

Checked the activation key. Subscription is no longer there.

Comment 6 Bryan Kearney 2017-06-26 20:39:58 UTC
The release of Satellite 5.8 we are deprecating the support of Subscription Asset Manager. The release notes for 5.8 can be found at https://access.redhat.com/documentation/en-us/red_hat_satellite/5.8/pdf/release_notes/Red_Hat_Satellite-5.8-Release_Notes-en-US.pdf.

I am therefore closing out this bug as WONTFIX. If you believe this to be an error, please feel free tor each out to either Rich Jerrido or Bryan Kearney. Thank you!


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