Actions
Bug #34175
closedContent Hosts->Manage Errata: undefined method join for comma-separated string
Status:
Closed
Priority:
Normal
Assignee:
Category:
Errata Management
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
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
Updated by Evgeni Golov almost 3 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
Updated by Evgeni Golov almost 3 years ago
- Related to Bug #33852: Content - Errata - Add REX actions (menu items) added
Updated by Evgeni Golov almost 3 years ago
- Found in Releases Katello 4.3.0 added
Updated by Jonathon Turel almost 3 years ago
- Target version changed from Katello 4.4.0 to Katello 4.3.1
- Triaged changed from No to Yes
Updated by Justin Sherrill almost 3 years ago
- Pull request https://github.com/Katello/katello/pull/9887 added
Updated by The Foreman Bot almost 3 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
Updated by Jeremy Lenz almost 3 years ago
- Has duplicate Bug #34218: SUSE errata application broken after #33852 added
Updated by The Foreman Bot almost 3 years ago
- Fixed in Releases Katello 4.5.0 added
Updated by Jeremy Lenz almost 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|fee5cbcc8ee3551e5cd714eaf4b34cc6370fe84e.
Updated by Chris Roberts almost 3 years ago
- Pull request deleted (
https://github.com/Katello/katello/pull/9887)
Updated by The Foreman Bot almost 3 years ago
- Pull request https://github.com/Katello/katello/pull/9975 added
Updated by Chris Roberts almost 3 years ago
- Pull request deleted (
https://github.com/Katello/katello/pull/9975)
Actions