Bug 1113684 - Removing a product, after removing a published version of a CV causes hanging on CV main page
Summary: Removing a product, after removing a published version of a CV causes hanging...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Configuration Management
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-26 15:57 UTC by Corey Welton
Modified: 2019-09-26 13:47 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:28:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6409 0 Normal Closed Removing a product, after removing a published version of a CV causes hanging on CV main page 2020-09-17 18:51:42 UTC

Description Corey Welton 2014-06-26 15:57:51 UTC
Description of problem:

After deleting a product -- possibly one that is associated with a CV, still -- the CV main view hangs with "Loading"

Version-Release number of selected component (if applicable):
Satellite-6.0.3-RHEL-7-20140626.0

How reproducible:

? unsure as of yet.

Steps to Reproduce:
(repro steps subject to change. I think this is the scenario but not 100% sure yet)

1.  Sync RHEL content and a custom product ("myproduct") with one or two repos.
2.  Associate all of these in a CV, publish, promote, etc.
3.  Remove "myproduct" via bulk actions.
4.  Return to CV page.

Actual results:
CV page hangs on "Loading"

trace in production.log


Connecting to database specified by database.yml
Processing by Bastion::BastionController#index as HTML
  Parameters: {"bastion_page"=>"content_views"}
  Rendered home/_submenu.html.erb (3.2ms)
  Rendered home/_user_dropdown.html.erb (2.8ms)
Read fragment views/tabs_and_title_records-1 (0.0ms)
  Rendered home/_organization_dropdown.html.erb (2.9ms)
  Rendered home/_location_dropdown.html.erb (2.2ms)
  Rendered home/_org_switcher.html.erb (5.4ms)
  Rendered home/_submenu.html.erb (2.5ms)
  Rendered home/_submenu.html.erb (2.5ms)
  Rendered home/_submenu.html.erb (2.8ms)
  Rendered home/_submenu.html.erb (1.9ms)
  Rendered home/_submenu.html.erb (1.8ms)
  Rendered home/_submenu.html.erb (2.6ms)
Write fragment views/tabs_and_title_records-1 (0.8ms)
  Rendered home/_topbar.html.erb (30.0ms)
  Rendered layouts/base.html.erb (30.9ms)
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/engines/bastion/app/views/bastion/layouts/application.html.haml (32.2ms)
Completed 200 OK in 42ms (Views: 32.0ms | ActiveRecord: 2.2ms)
Creating scope :roots. Overwriting existing method Hostgroup.roots.
Creating scope :ancestors_of. Overwriting existing method Hostgroup.ancestors_of.
Creating scope :children_of. Overwriting existing method Hostgroup.children_of.
Creating scope :descendants_of. Overwriting existing method Hostgroup.descendants_of.
Creating scope :subtree_of. Overwriting existing method Hostgroup.subtree_of.
Creating scope :siblings_of. Overwriting existing method Hostgroup.siblings_of.
Creating scope :ordered_by_ancestry. Overwriting existing method Hostgroup.ordered_by_ancestry.
Creating scope :ordered_by_ancestry_and. Overwriting existing method Hostgroup.ordered_by_ancestry_and.
Creating scope :before_depth. Overwriting existing method Hostgroup.before_depth.
Creating scope :to_depth. Overwriting existing method Hostgroup.to_depth.
Creating scope :at_depth. Overwriting existing method Hostgroup.at_depth.
Creating scope :from_depth. Overwriting existing method Hostgroup.from_depth.
Creating scope :after_depth. Overwriting existing method Hostgroup.after_depth.
Processing by Katello::Api::V2::ContentViewsController#index as JSON
  Parameters: {"nondefault"=>"true", "organization_id"=>"1", "page"=>"1", "search"=>"", "sort_by"=>"name", "sort_order"=>"ASC", "api_version"=>"v2"}
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/views/katello/api/v2/content_views/index.json.rabl within katello/api/v2/layouts/collection (223.7ms)
NoMethodError: undefined method `redhat?' for nil:NilClass
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/models/katello/repository.rb:168:in `redhat?'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/models/katello/repository.rb:164:in `product_type'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/helpers.rb:18:in `data_object_attribute'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:77:in `attribute'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:38:in `block in compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:37:in `each_pair'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:37:in `compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:21:in `block in build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:166:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:20:in `build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:51:in `to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `block in render'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:285:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/partials.rb:27:in `object_to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/partials.rb:14:in `partial'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:124:in `extends'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:34:in `block in compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:33:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:33:in `compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:21:in `block in build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:166:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:20:in `build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:53:in `block in to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:89:in `map'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:89:in `method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:53:in `to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `block in render'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:285:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/partials.rb:27:in `object_to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:108:in `child'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:46:in `block in compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:45:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:45:in `compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:21:in `block in build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:166:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:20:in `build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:51:in `to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `block in render'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:285:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/partials.rb:27:in `object_to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/partials.rb:14:in `partial'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:124:in `extends'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:34:in `block in compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:33:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:33:in `compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:21:in `block in build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:166:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:20:in `build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:53:in `block in to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `map'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `map'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:53:in `to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `block in render'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:285:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/partials.rb:27:in `object_to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:108:in `child'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:46:in `block in compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:45:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:45:in `compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:21:in `block in build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:166:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:20:in `build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:51:in `to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `block in render'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:285:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/partials.rb:27:in `object_to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/partials.rb:14:in `partial'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:124:in `extends'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:34:in `block in compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:33:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:33:in `compile_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:21:in `block in build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:166:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/builder.rb:20:in `build'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:51:in `to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:63:in `to_json'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `block in render'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:285:in `cache_results'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/engine.rb:39:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/views/katello/api/v2/content_views/index.json.rabl:1:in `__opt_rh_ruby____root_usr_share_gems_gems_katello_______app_views_katello_api_v__content_views_index_json_rabl___515692082895356819_76924760'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:18:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:36:in `render_template'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:17:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:110:in `_render_template'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:88:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:16:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:295:in `realtime'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:39:in `render'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/api/v2/rendering.rb:44:in `respond_with_template'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/api/v2/rendering.rb:59:in `respond_with_template_collection'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/api/v2/rendering.rb:72:in `try_specific_collection_template'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/api/v2/rendering.rb:12:in `respond_for_index'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/controllers/katello/api/api_controller.rb:144:in `respond'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/controllers/katello/api/v2/content_views_controller.rb:53:in `index'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:571:in `block (3 levels) in _run__2902675584514463208__process_action__697414310948452500__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_9926'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_2919'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_9926'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:471:in `block (2 levels) in _run__2902675584514463208__process_action__697414310948452500__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_9925'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_9925'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:415:in `block in _run__2902675584514463208__process_action__697414310948452500__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_9924'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_13'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_9924'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in `_run__2902675584514463208__process_action__697414310948452500__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/controllers/katello/api/api_controller.rb:109:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in `process'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in `process'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in `block in action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/mapper.rb:42:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/lib/apipie/static_dispatcher.rb:65:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `_run__3733998613361251380__call__2718511164503629085__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/lib/katello/middleware/silenced_logger.rb:30:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
/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'
Completed 500 Internal Server Error in 389ms (Views: 0.2ms | ActiveRecord: 4.8ms)

Expected results:

Working CV page.


Additional info:

Comment 1 Corey Welton 2014-06-26 16:07:43 UTC
Proper repro:

1.  Sync RHEL content and a custom product ("myproduct") with one or two repos.
2.  Associate all of these in a CV, publish, promote, etc.
3.  Remove a version of published content from CV
3.  Remove "myproduct" via bulk actions.
4.  Return to CV page.

Comment 2 Corey Welton 2014-06-26 16:14:52 UTC
Note: trying to list CV from cli doesn't work.


[root@cloud-qe-12 foreman]# hammer content-view list --organization cswiiitestorg
undefined method `redhat?' for nil:NilClass



Nor does removing (assuming user could remember the CV name anyway since list doesn't work)

[root@cloud-qe-12 foreman]# hammer content-view remove --name goog  --organization cswiiitestorg
Could not remove objects from content view:
  undefined method `redhat?' for nil:NilClass

Comment 4 Corey Welton 2014-06-26 18:21:40 UTC
fwiw, a rake is totally hosed after this, even after removing orphans (which has a "nice" side-effect of removing all CVs across all orgs).

Comment 5 Partha Aji 2014-06-26 18:32:49 UTC
Created redmine issue http://projects.theforeman.org/issues/6409 from this bug

Comment 6 Partha Aji 2014-06-26 20:27:54 UTC
The basic bug is that the Bulk products delete has not been updated to the dynflow code. While that bug is yet to be fixed, here is the work around or hack...

This system had repositories that basically pointed to non existent products.

1) Identify which repo is bad. This can be done manually looping through each repo and trying to figure out which repo has redhat? or running the following sql script either via foreman-rake console or psql.
"select product_id from katello_repositories where product_id not in (select id from katello_products)"  . That should give you the list of bad repos

2) Create a new custom product in the same org as the repos  via the UI or API. This product is meant to be deleted later.

3) Get the product id of the new product (you should be able to get it from the products url or product info cli).

4) Run the following in psql,
UPDATE "katello_repositories" SET "product_id" = <product_id>, "updated_at" = '2014-06-26 20:09:16.307216' WHERE "katello_repositories"."id" in (select id   from katello_repositories where product_id not in (select id from katello_products))

5) Now the redhat? errors will not show up when you go to the page.
6) You can navigate to the product page and safely delete the product.

Comment 7 Partha Aji 2014-06-26 21:57:53 UTC
https://github.com/Katello/katello/pull/4355 should fix this issue.

Comment 8 Bryan Kearney 2014-06-27 20:05:27 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6409 has been closed

Comment 11 Corey Welton 2014-07-02 19:27:18 UTC
Failing this :(

After following the steps in comment #1 -- removing a published view, specifically -- i now get the following (particularly outdated?) message.

An error occurred removing the Products: Repository cannot be deleted since it has already been promoted. Using a changeset, please delete the repository from existing environments before deleting it.

First off, we shouldn't be seeing references to 'changesets' anymore.  This should be a separate bug.

This message occurs when you remove a CV publish version but don't click the "remove all" checkbox.

The end result is user gets error message above ^  .... but product does in fact get removed!  There is some sort of goo going on in dynflow too, which Partha has seen.

Since the overarching scope of this bz was to fix the CV interfacing with dynflow (as opposed to, say, just making sure the CV page works), jsherrill has suggested I fail this bz.

Comment 12 Corey Welton 2014-07-02 19:28:35 UTC
Version used above: Satellite-6.0.3-RHEL-6-20140702.0

Comment 13 Partha Aji 2014-07-07 16:02:18 UTC
So the bug in Dr Welton's case is that the product did not actually get removed from the database. Instead it just got deleted from elastic search. From what I gather "foreman-rake katello:reindex" fixed it. I have filed a redmine issue on this (since I couldnt reopen the linked one) -> http://projects.theforeman.org/issues/6513 will soon have a PR on this.

Comment 15 Partha Aji 2014-07-22 18:24:55 UTC
Moving this to ON_QA since  https://bugzilla.redhat.com/show_bug.cgi?id=1116933 should bve addressed this.

Comment 16 Corey Welton 2014-07-30 15:13:43 UTC
Verified per bug #1116933

Comment 18 Bryan Kearney 2014-09-11 12:28:01 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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