Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-38957

Selecting hosts on the "Content Hosts" page trigger a page refresh, resulting in all hosts being deselected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Normal Normal
    • None
    • 6.16.0
    • Hosts
    • False
    • sat-proton
    • None
    • None
    • None
    • None

      Description of problem:
      Selecting all hosts in one page triggers a page refresh, resulting in all hosts being deselected.

      Even though all hosts have been deselected, the user is still allowed to trigger the remote execution job to update hosts.

      After triggering the remote execution, the API request failed with the following internal server error.

      Even though the API request failed, the remote execution job proceeded for all hosts instead of the selected ones because empty hosts were selected

      2025-10-01T06:31:54 [I|app|99a6745e] Started POST "/katello/remote_execution" for xx.xx.xx.xx at 2025-10-01 06:31:54 +0000
      2025-10-01T06:31:54 [I|app|99a6745e] Processing by Katello::RemoteExecutionController#create as HTML
      2025-10-01T06:31:54 [I|app|99a6745e]   Parameters: {"name"=>"", "remote_action"=>"package_update", "bulk_host_ids"=>"{\"included\":{\"ids\":[],\"resources\":[],\"search\":null,...
      ...
      2025-10-01T06:31:55 [W|app|99a6745e] 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".
      2025-10-01T06:31:55 [I|app|99a6745e] Backtrace for '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".' error (AbstractController::DoubleRenderError): 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".
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/redirecting.rb:64:in `redirect_to'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/flash.rb:58:in `redirect_to'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:66:in `block in redirect_to'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in `block in instrument'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in `instrument'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:65:in `redirect_to'
       99a6745e | /usr/share/gems/gems/katello-4.14.0.13/app/controllers/katello/remote_execution_controller.rb:14:in `create'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/base.rb:228:in `process_action'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/rendering.rb:30:in `process_action'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
       99a6745e | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
       99a6745e | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
       99a6745e | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
       99a6745e | /usr/share/gems/gems/audited-5.7.0/lib/audited/sweeper.rb:16:in `around'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
       99a6745e | /usr/share/gems/gems/audited-5.7.0/lib/audited/sweeper.rb:16:in `around'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:137:in `run_callbacks'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/callbacks.rb:41:in `process_action'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/rescue.rb:22:in `process_action'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in `block in instrument'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
       99a6745e | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in `instrument'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
       99a6745e | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/base.rb:165:in `process'
       99a6745e | /usr/share/gems/gems/actionview-6.1.7.8/lib/action_view/rendering.rb:39:in `process'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal.rb:190:in `dispatch'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal.rb:254:in `dispatch'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:33:in `serve'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:50:in `block in serve'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in `each'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in `serve'
       99a6745e | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:842:in `call'

       

      How reproducible:

      easy

      Is this issue a regression from an earlier version:

      Not sure

      Steps to Reproduce:

      1. Go to the Content Hosts page.
      2. Make sure there are at least 2 pages listing the hosts. Adjust the default pagination setting if you have less hosts.
      3. Go to page 2 or other page by typing the page number (this is the trick to reproduce the issue).
      4. Tick the top checkbox to select all hosts in the page.

      Actual behavior:
      The table is refreshed, but nothing is selected. Even though the user is still allowed to trigger the remote execution job. Jobs triggered for all hosts instead of only the selected ones.

      Expected behavior:
      No page refresh. If a page refresh is needed, then the selected items should persist after afterward.

       

              Unassigned Unassigned
              rhn-support-hyu Hao Chang Yu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: