Project

General

Profile

Actions

Bug #34175

closed

Content Hosts->Manage Errata: undefined method join for comma-separated string

Added by Ben Roberts over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Errata Management
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Steps to reproduce:

  • From the Content Hosts view, bulk select hosts and click Actions->Manage Errata.
  • A popup box appears listing all the pending errata for the selected hosts.
  • Select either one, or many errata from the list and click Install Selected
  • Click yes on the confirmation prompt

Results in error page with text:

Oops, we're sorry but something went wrong undefined method `join' for "ALSA-2021:5082,FEDORA-EPEL-2021-bdd50a8079":String

Running Katello nightly (updated as of 2021-12-16)

# rpm -qa '*katello*'
katello-common-4.4.0-0.1.master.el8.noarch
katello-server-ca-1.0-1.noarch
katello-selinux-4.0.2-1.el8.noarch
katello-debug-4.4.0-0.1.master.el8.noarch
katello-repos-4.4-0.2.nightly.el8.noarch
rubygem-katello-4.4.0-0.2.pre.master.20211201084334git73323fb.el8.noarch
katello-default-ca-1.0-1.noarch
katello-certs-tools-2.8.2-1.el8.noarch
katello-ca-consumer-whitefall.jellybean.sihnon.net-1.0-1.noarch
katello-4.4.0-0.1.master.el8.noarch
foreman-installer-katello-3.2.0-0.1.develop.20211215031226gite34bd78.el8.noarch
rubygem-hammer_cli_katello-1.4.0-0.1.pre.master.20211125093815git3fea315.el8.noarch
katello-client-bootstrap-1.7.7-1.el8.noarch

# rpm -qa '*foreman*'
foreman-debug-3.2.0-0.1.develop.20211215185442gitddc2b76.el8.noarch
foreman-build-3.2.0-0.1.develop.20211215185442gitddc2b76.el8.noarch
whitefall.jellybean.sihnon.net-foreman-proxy-client-1.0-1.noarch
foreman-vmware-3.2.0-0.1.develop.20211215185442gitddc2b76.el8.noarch
nodejs-theforeman-builder-8.16.0-1.el8.noarch
rubygem-foreman_maintain-1.0.1-1.el8.noarch
whitefall.jellybean.sihnon.net-foreman-proxy-1.0-3.noarch
rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.fm3_0.el8.noarch
foreman-plugin-3.2.0-0.1.develop.20211215185442gitddc2b76.el8.noarch
rubygem-foreman_puppet-3.0.0-1.fm3_2.el8.noarch
foreman-proxy-3.2.0-0.1.develop.20211112194131gita2393b8.el8.noarch
foreman-installer-3.2.0-0.1.develop.20211215031226gite34bd78.el8.noarch
foreman-dynflow-sidekiq-3.2.0-0.1.develop.20211215185442gitddc2b76.el8.noarch
foreman-cli-3.2.0-0.1.develop.20211215185442gitddc2b76.el8.noarch
nodejs-theforeman-vendor-8.16.0-1.el8.noarch
foreman-release-3.2.0-0.1.develop.el8.noarch
rubygem-hammer_cli_foreman-3.2.0-0.1.pre.develop.20211112194143git8996825.el8.noarch
foreman-assets-3.2.0-0.1.develop.20211215185442gitddc2b76.el8.noarch
foreman-selinux-3.2.0-0.1.develop.20211214154721git4adc0e4.el8.noarch
rubygem-foreman-tasks-core-0.3.5-1.fm2_5.el8.noarch
whitefall.jellybean.sihnon.net-foreman-client-1.0-1.noarch
rubygem-hammer_cli_foreman_tasks-0.0.16-1.fm3_0.el8.noarch
foreman-3.2.0-0.1.develop.20211215185442gitddc2b76.el8.noarch
foreman-service-3.2.0-0.1.develop.20211215185442gitddc2b76.el8.noarch
foreman-postgresql-3.2.0-0.1.develop.20211215185442gitddc2b76.el8.noarch
foreman-installer-katello-3.2.0-0.1.develop.20211215031226gite34bd78.el8.noarch
rubygem-foreman_remote_execution_core-1.4.4-1.el8.noarch
rubygem-hammer_cli_foreman_puppet-0.0.4-1.fm3_1.el8.noarch
rubygem-foreman-tasks-5.3.0-1.fm3_2.el8.noarch
rubygem-foreman_remote_execution-5.1.0-1.fm3_2.el8.noarch

Related issues 2 (0 open2 closed)

Related to Katello - Bug #33852: Content - Errata - Add REX actions (menu items)ClosedPartha AjiActions
Has duplicate Katello - Bug #34218: SUSE errata application broken after #33852DuplicateActions
Actions #1

Updated by Evgeni Golov over 2 years ago

Some context:

In #33852 we changed the controller to do a join:

  diff --git a/app/controllers/katello/remote_execution_controller.rb b/app/controllers/katello/remote_execution_controller.rb
  index 3efb584d7e..57f1d0994d 100644
  --- a/app/controllers/katello/remote_execution_controller.rb
  +++ b/app/controllers/katello/remote_execution_controller.rb
  @@ -48,7 +48,7 @@ module Katello

         def inputs
           if feature_name == 'katello_errata_install'
  -          { :errata => errata_inputs }
  +          { "Errata Search Query" => "errata_id ^ (#{errata_inputs.join(',')})" }
           elsif feature_name == 'katello_service_restart'
             { :helper => params[:name] }
           elsif feature_name == 'katello_module_stream_action'

But errata_inputs is already joining things for us:

        def errata_inputs
          if ::Foreman::Cast.to_bool(params[:install_all])
            Erratum.installable_for_hosts(hosts).pluck(:errata_id).join(',')
          elsif params[:bulk_errata_ids]
            find_bulk_errata_ids(hosts, params[:bulk_errata_ids]).join(',')
          else
            params[:name]
          end
        end

Actions #2

Updated by Evgeni Golov over 2 years ago

  • Related to Bug #33852: Content - Errata - Add REX actions (menu items) added
Actions #3

Updated by Evgeni Golov over 2 years ago

  • Found in Releases Katello 4.3.0 added
Actions #4

Updated by Jonathon Turel over 2 years ago

  • Target version changed from Katello 4.4.0 to Katello 4.3.1
  • Triaged changed from No to Yes
Actions #5

Updated by Justin Sherrill about 2 years ago

  • Bugzilla link set to 2037706
Actions #6

Updated by Justin Sherrill about 2 years ago

  • Pull request https://github.com/Katello/katello/pull/9887 added
Actions #7

Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Jeremy Lenz
  • Pull request https://github.com/Katello/katello/pull/9913 added
Actions #8

Updated by Jeremy Lenz about 2 years ago

  • Has duplicate Bug #34218: SUSE errata application broken after #33852 added
Actions #9

Updated by The Foreman Bot about 2 years ago

  • Fixed in Releases Katello 4.5.0 added
Actions #10

Updated by Jeremy Lenz about 2 years ago

  • Status changed from Ready For Testing to Closed
Actions #11

Updated by Chris Roberts about 2 years ago

  • Pull request deleted (https://github.com/Katello/katello/pull/9887)
Actions #12

Updated by The Foreman Bot about 2 years ago

  • Pull request https://github.com/Katello/katello/pull/9975 added
Actions #13

Updated by Chris Roberts about 2 years ago

  • Pull request deleted (https://github.com/Katello/katello/pull/9975)
Actions

Also available in: Atom PDF