[Satellite-6] hammer command is not working when the "--location" flag is used

Solution Verified - Updated -

Issue

  • hammer command is returning 500 Internal Server Error when the --location or --location-id flag is used.
  • From the production.log,
2016-01-05 15:56:56 [I] Processing by Api::V2::LocationsController#index as JSON
2016-01-05 15:56:56 [I]   Parameters: {"search"=>"name = \"<Location>\"", "apiv"=>"v2", "location"=>{}}
2016-01-05 15:56:56 [I] Authorized user hammer(hamm er)
2016-01-05 15:56:56 [I]   Rendered api/v2/taxonomies/index.json.rabl within api/v2/layouts/index_layout (7.5ms)
2016-01-05 15:56:56 [I] Completed 200 OK in 341ms (Views: 14.5ms | ActiveRecord: 22.0ms)
2016-01-05 15:56:57 [I] Processing by Katello::Api::V2::OrganizationsController#index as application/json;version=2
2016-01-05 15:56:57 [I]   Parameters: {"search"=>"name = \"<Organization>\"", "api_version"=>"v2", "organization"=>{}}
2016-01-05 15:56:57 [I] Authorized user hammer(hamm er)
2016-01-05 15:56:57 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0.76/app/views/katello/api/v2/organizations/index.json.rabl within api/v2/layouts/index_layout (6.1ms)
2016-01-05 15:56:57 [I] Completed 200 OK in 65ms (Views: 16.9ms | ActiveRecord: 9.1ms)
2016-01-05 15:56:57 [I] Processing by Api::V2::HostsController#index as JSON
2016-01-05 15:56:57 [I]   Parameters: {"organization_id"=>"3", "page"=>"1", "per_page"=>"1000", "apiv"=>"v2", "location_id"=>"7", :host=>{}}
2016-01-05 15:56:57 [I] Authorized user hammer(hamm er)
2016-01-05 15:56:57 [E] Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return". (AbstractController::DoubleRenderError)

Environment

  • Red Hat Satellite v 6.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.