Project

General

Profile

Bug #34175

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

Added by Ben Roberts 5 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Errata Management
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

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

Related to Katello - Bug #33852: Content - Errata - Add REX actions (menu items)Closed
Has duplicate Katello - Bug #34218: SUSE errata application broken after #33852Duplicate

Associated revisions

Revision fee5cbcc (diff)
Added by Jeremy Lenz 3 months ago

Fixes #34175 - split errata install into two templates (#9913)

Refs #34175 - Fix regression errata install identifier
which is caused by a regression by a commit to fix #33852
(cherry picked from commit 281ee267ffdf03e16db4bb6c99dfdb375daba450)
Refs #34175 - add case statement
Refs #34175 - fix tests
also fix Suse template for install_errata_by_search

Co-authored-by: Jeremy Lenz <>
Co-authored-by: Markus Bader <>

History

#1 Updated by Evgeni Golov 5 months 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

#2 Updated by Evgeni Golov 5 months ago

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

#3 Updated by Evgeni Golov 5 months ago

  • Found in Releases Katello 4.3.0 added

#4 Updated by Jonathon Turel 5 months ago

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

#5 Updated by Justin Sherrill 4 months ago

  • Bugzilla link set to 2037706

#6 Updated by Justin Sherrill 4 months ago

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

#7 Updated by The Foreman Bot 4 months ago

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

#8 Updated by Jeremy Lenz 4 months ago

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

#9 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases Katello 4.5.0 added

#10 Updated by Jeremy Lenz 3 months ago

  • Status changed from Ready For Testing to Closed

#11 Updated by Chris Roberts 3 months ago

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

#12 Updated by The Foreman Bot 3 months ago

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

#13 Updated by Chris Roberts 3 months ago

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

Also available in: Atom PDF