Bug 1098152 - Installing a incorrect package group raises undefined method error under 'details'
Summary: Installing a incorrect package group raises undefined method error under 'det...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-15 12:10 UTC by Sachin Ghai
Modified: 2019-09-26 17:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-02 14:08:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
UI shows undefined error while installing invalid package group (59.16 KB, image/png)
2014-05-15 12:10 UTC, Sachin Ghai
no flags Details
complete logs (13.88 KB, text/plain)
2014-05-15 12:13 UTC, Sachin Ghai
no flags Details
error message when installing invalid pkg group (46.00 KB, image/png)
2014-06-13 11:27 UTC, Sachin Ghai
no flags Details
error message when installing invalid pkg (39.57 KB, image/png)
2014-06-13 11:28 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 5742 0 None None None 2016-04-22 16:44:50 UTC

Description Sachin Ghai 2014-05-15 12:10:55 UTC
Created attachment 895874 [details]
UI shows undefined error while installing invalid package group

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:

Comment 1 Sachin Ghai 2014-05-15 12:13:11 UTC
Created attachment 895875 [details]
complete logs

Comment 2 Sachin Ghai 2014-05-15 12:15:11 UTC
same issue when removing invalid package group.

Comment 3 RHEL Program Management 2014-05-15 12:25:20 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 5 Brad Buckingham 2014-05-15 16:36:49 UTC
Created redmine issue http://projects.theforeman.org/issues/5742 from this bug

Comment 6 Brad Buckingham 2014-06-05 16:59:50 UTC
fixed with katello PR:

https://github.com/Katello/katello/pull/4222

Note: an error would be displayed for both an invalid package or package group name; therefore, the above PR fixes both.

Comment 9 Sachin Ghai 2014-06-13 11:25:09 UTC
Verified with sat6 beta snap9 compose2.

UI throws proper error messages if we try to install package/package group with incorrect name. thanks Brad.

Comment 10 Sachin Ghai 2014-06-13 11:27:36 UTC
Created attachment 908505 [details]
error message when installing invalid pkg group

Comment 11 Sachin Ghai 2014-06-13 11:28:38 UTC
Created attachment 908506 [details]
error message when installing invalid pkg

Comment 12 Bryan Kearney 2014-07-02 14:08:42 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.

Comment 13 Bryan Kearney 2014-07-02 14:10:06 UTC
This was delivered in 6.0.3, the Beta version of Satellite 6.0


Note You need to log in before you can comment on or make changes to this bug.