Project

General

Profile

Bug #5742

Installing a incorrect package group raises undefined method error under 'details'

Added by Brad Buckingham over 8 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Web UI
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1098152
Description of problem:
I was trying to install package group and The group name that I passed was incorrect "development". But then UI should throw a proper message that selected package-group ins not available. However it raises a undefined method error as below. And results says 'Success' however it should be failed.

On ui details says: ==================
undefined method `+' for nil:NilClass (NoMethodError)
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/pulp/consumer.rb:62:in `task_result_packages'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/pulp/consumer.rb:18:in `humanized_output'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/helpers/presenter.rb:23:in `humanized_output'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/helpers/presenter.rb:48:in `map'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/helpers/presenter.rb:48:in `humanized_output'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/helpers/presenter.rb:23:in `humanized_output'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.5.3/app/models/foreman_tasks/task/dynflow_task.rb:63:in `get_humanized'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.5.3/app/models/foreman_tasks/task/dynflow_task.rb:45:in `humanized'
/opt/rh/ruby193/root/usr/share/gems/gems/rabl-0.9.0/lib/rabl/helpers.rb:18:in `data_object_attribute'

Complete log in attachment:

/var/log/gofer/agent.log says: ==============================

2014-05-15 12:00:39,469 [ERROR][worker-0] install() dispatcher.py:80 - handler failed
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/pulp/agent/lib/dispatcher.py", line 76, in install
report = handler.install(conduit, units, dict(options))
File "/usr/lib/pulp/agent/handlers/rpm.py", line 202, in install
details = grp.install(names)
File "/usr/lib/python2.6/site-packages/pulp_rpm/handler/rpmtools.py", line 219, in install
yb.selectGroup(name)
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 2911, in selectGroup
raise Errors.GroupsError, _("No Group named %s exists") % grpid
GroupsError: No Group named "development" exists
2014-05-15 12:00:39,471 [INFO][worker-0] sendreply()
rmi.py:172 - 0821329e-4e8b-46db-b398-9a95297e190d processed in: 1.201 (seconds)

Version-Release number of selected component (if applicable):

sat6 beta snap4:

Satellite-6.0.3-RHEL-6-20140508.1

  • apr-util-ldap-1.3.9-3.el6_0.1.x86_64
  • candlepin-0.9.7-1.el6_5.noarch
  • candlepin-scl-1-5.el6_4.noarch
  • candlepin-scl-quartz-2.1.5-5.el6_4.noarch
  • candlepin-scl-rhino-1.7R3-1.el6_4.noarch
  • candlepin-scl-runtime-1-5.el6_4.noarch
  • candlepin-selinux-0.9.7-1.el6_5.noarch
  • candlepin-tomcat6-0.9.7-1.el6_5.noarch
  • elasticsearch-0.90.10-4.el6sat.noarch
  • foreman-1.6.0.7-1.el6sat.noarch
  • foreman-compute-1.6.0.7-1.el6sat.noarch
  • foreman-gce-1.6.0.7-1.el6sat.noarch
  • foreman-libvirt-1.6.0.7-1.el6sat.noarch
  • foreman-ovirt-1.6.0.7-1.el6sat.noarch
  • foreman-postgresql-1.6.0.7-1.el6sat.noarch
  • foreman-proxy-1.6.0.4-1.el6sat.noarch
  • foreman-selinux-1.5.0-0.develop.el6sat.noarch
  • foreman-vmware-1.6.0.7-1.el6sat.noarch
  • katello-1.5.0-22.el6sat.noarch
  • katello-ca-1.0-1.noarch
  • katello-certs-tools-1.5.5-1.el6sat.noarch
  • katello-installer-0.0.37-1.el6sat.noarch
  • openldap-2.4.23-32.el6_4.1.x86_64
  • pulp-katello-plugins-0.2-1.el6sat.noarch
  • pulp-nodes-common-2.3.1-0.4.beta.el6sat.noarch
  • pulp-nodes-parent-2.3.1-0.4.beta.el6sat.noarch
  • pulp-puppet-plugins-2.3.1-0.4.beta.el6sat.noarch
  • pulp-rpm-plugins-2.3.1-0.4.beta.el6sat.noarch
  • pulp-selinux-2.3.1-0.4.beta.el6sat.noarch
  • pulp-server-2.3.1-0.4.beta.el6sat.noarch
  • python-ldap-2.3.10-1.el6.x86_64
  • ruby193-rubygem-ldap_fluff-0.2.2-2.el6sat.noarch
  • ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
  • ruby193-rubygem-runcible-1.0.8-1.el6sat.noarch
  • rubygem-hammer_cli-0.1.0-12.el6sat.noarch
  • rubygem-hammer_cli_foreman-0.1.0-12.el6sat.noarch
  • rubygem-hammer_cli_foreman_tasks-0.0.2-5.el6sat.noarch
  • rubygem-hammer_cli_katello-0.0.3-22.el6sat.noarch
    How reproducible:
    always

Steps to Reproduce:
1. sync a thel6.5 repo
2. provision rhel6.5 client via foreman
3. register client with server via rhsm
4. subscribe the tools repo to install katello agent
5. run goferd
6. Now install package group 'development' (invalid)

Actual results:
undefined method `+' for nil:NilClass (NoMethodError)

Expected results:
UI should throw proper error message.

Additional info:

Associated revisions

Revision 8e615b20 (diff)
Added by Brad Buckingham about 8 years ago

fixes #5742/BZ1098152 - fix consumer action to display failure message

This commit contains a minor change so that if the user provides an
invalid package or package group name as part of an action
(e.g. install/update/remove), the error message returned by
pulp is displayed.

Without this change, the user will get a stack trace as are no
'resolved' or 'deps' information in the result.

With this change the user would see the following messages as
provided by pulp:

1. installing an invalid package:

:invalidpackagename--*.*: No package(s) available to install

2. installing an invalid package group:

No Group named invalidgroupname exists

Revision 473b6603
Added by Brad Buckingham about 8 years ago

Merge pull request #4222 from bbuckingham/issue-5742

fixes #5742/BZ1098152 - fix consumer action to display failure message

History

#1 Updated by Brad Buckingham over 8 years ago

  • Assignee set to Brad Buckingham
  • Triaged set to No

#2 Updated by Eric Helms about 8 years ago

  • Triaged changed from No to Yes

#3 Updated by Brad Buckingham about 8 years ago

  • Target version set to 45

#4 Updated by Brad Buckingham about 8 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset katello|commit:8e615b20ae2b23666ebf7833c3e8641560b1fb1d.

#5 Updated by Eric Helms almost 8 years ago

  • Legacy Backlogs Release (now unused) set to 13

Also available in: Atom PDF