Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1200488

Summary: UI displays incorrect number of consumed subscriptions
Product: Red Hat Satellite Reporter: sthirugn <sthirugn>
Component: Subscription ManagementAssignee: Tom McKay <tomckay>
Status: CLOSED CURRENTRELEASE QA Contact: sthirugn <sthirugn>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: bbuckingham, bkearney, jcallaha, mmccune, sthirugn, tomckay
Target Milestone: UnspecifiedKeywords: Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/10225
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 14:00:00 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:
Attachments:
Description Flags
Incorrect number of consumed content hosts
none
Failed screenshot
none
Failed candlepin event none

Description sthirugn@redhat.com 2015-03-10 16:28:10 UTC
Created attachment 1000054 [details]
Incorrect number of consumed content hosts

Description of problem:
UI displays incorrect number of consumed subscriptions

Version-Release number of selected component (if applicable):
Satellite-6.1.0-RHEL-6-20150303.0

How reproducible:
Always

Steps to Reproduce:
1. Upload a manifest
2. Create an activation key and attach subscriptions from the manifest
3. Register/subscribe few content hosts to this activation key
4. Navigate to UI -> Content -> Red Hat Subscriptions

Actual results:
The left pane shows incorrect number of consumed content hosts (see screenshot)

Expected results:
The left pane should show correct number of consumed content hosts

Additional info:

Comment 1 sthirugn@redhat.com 2015-03-10 16:36:49 UTC
Please note the same issue for custom repo in the screenshot.

Comment 3 Tom McKay 2015-04-21 16:51:25 UTC
Created redmine issue http://projects.theforeman.org/issues/10225 from this bug

Comment 4 Bryan Kearney 2015-05-06 22:05:28 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/10225 has been closed
-------------
Thomas McKay
Applied in changeset commit:katello|45bac3b0b8a1cdd33a1a65a3b7a1c6ec3d805cc5.

Comment 7 sthirugn@redhat.com 2015-05-14 15:49:00 UTC
Failed again in GA Snap 4 Compose 2 (foreman debug attached)

I noticed two failed candlepin events in Monitor-> Tasks with Action name:

Actions::Candlepin::ListenOnCandlepinEvents


Exception:
NoMethodError: undefined method `name' for nil:NilClass

Backtrace:
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.40/app/lib/actions/candlepin/reindex_pool_subscription_handler.rb:83:in `reindex_consumer'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.40/app/lib/actions/candlepin/reindex_pool_subscription_handler.rb:53:in `handle'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.40/app/lib/actions/candlepin/listen_on_candlepin_events.rb:178:in `on_event'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.40/app/lib/actions/candlepin/listen_on_candlepin_events.rb:147:in `act_on_event'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.40/app/lib/actions/candlepin/listen_on_candlepin_events.rb:80:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:859:in `block in assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `tap'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:138:in `match_value'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:116:in `block in match'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `match'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.40/app/lib/actions/candlepin/listen_on_candlepin_events.rb:67:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:476:in `block (3 levels) in execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action/progress.rb:30:in `with_progress_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action/progress.rb:16:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.40/app/lib/actions/middleware/keep_locale.rb:23:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.40/app/lib/actions/middleware/keep_locale.rb:34:in `with_locale'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.40/app/lib/actions/middleware/keep_locale.rb:23:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:475:in `block (2 levels) in execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:474:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:474:in `block in execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:391:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:391:in `block in with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:391:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:391:in `with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:469:in `execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/action.rb:256:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:9:in `block (2 levels) in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract.rb:155:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract.rb:155:in `with_meta_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:8:in `block in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:22:in `open_action'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:7:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/worker.rb:20:in `block in on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:859:in `block in assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `tap'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:138:in `match_value'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:116:in `block in match'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `match'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/executors/parallel/worker.rb:17:in `on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:82:in `on_envelope'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:72:in `receive'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:99:in `block (2 levels) in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:99:in `loop'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:99:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:99:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:99:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.5/lib/dynflow/micro_actor.rb:13:in `block in initialize'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'

Comment 10 Tom McKay 2015-05-20 19:58:34 UTC
Fix for this other BZ will correct this as well:
https://bugzilla.redhat.com/show_bug.cgi?id=1221738

Comment 11 sthirugn@redhat.com 2015-05-20 22:06:32 UTC
Failed.  Screenshot/foreman debug attached.

Scenario:
- Register two content hosts
- Unregister two content hosts

Comment 16 Tom McKay 2015-06-09 20:09:50 UTC
Is this reproducible any longer? My guess is that it was due to elasticsearch not getting updated to reflect the new subscriptions. This should all be working now.

Comment 17 Mike McCune 2015-06-10 14:36:43 UTC
ACK from Og that we move this ON_QA

Comment 18 jcallaha 2015-06-10 14:48:01 UTC
Tom and Suresh, it looks like the issue was probably elasticsearch. It works fine on Snap 7.

Comment 19 sthirugn@redhat.com 2015-06-16 20:44:54 UTC
Moving this to VERIFIED since the elasticsearch bug fix fixed this issue as per Jake's comment in Comment 18.

Comment 20 Bryan Kearney 2015-08-11 13:25:12 UTC
This bug is slated to be released with Satellite 6.1.

Comment 21 Bryan Kearney 2015-08-12 14:00:00 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.