Bug 985412 - CLI system_group job_tasks throws exception
Summary: CLI system_group job_tasks throws exception
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Mike McCune
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-17 12:38 UTC by Ales Dujicek
Modified: 2014-08-14 12:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-14 12:45:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
attempted_error_ reproduction (109.30 KB, image/png)
2013-10-15 20:34 UTC, manjiri tapaswi
no flags Details

Description Ales Dujicek 2013-07-17 12:38:12 UTC
Description of problem:

when you specify invalid job_id to "system_group job_tasks" you get exception

system_group job_tasks --org org --name mygroup --job_id 0
error: 'tasks' (more in the log file /var/log/katello/client.log)

/var/log/katello/client.log:
2013-07-17 08:17:42,236 [ERROR][MainThread] error() @ base.py:202 - 'tasks'
2013-07-17 08:17:42,236 [ERROR][MainThread] error() @ base.py:203 - Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/katello/client/cli/base.py", line 215, in main
    ret_code = super(KatelloCLI, self).main(args, command_name, parent_usage)
  File "/usr/lib/python2.6/site-packages/katello/client/core/base.py", line 312, in main
    return subcommand.main(self.args[1:], self.args[0], self._get_usage_line(command_name, parent_usage))
  File "/usr/lib/python2.6/site-packages/katello/client/core/base.py", line 312, in main
    return subcommand.main(self.args[1:], self.args[0], self._get_usage_line(command_name, parent_usage))
  File "/usr/lib/python2.6/site-packages/katello/client/core/base.py", line 390, in main
    return self.run()
  File "/usr/lib/python2.6/site-packages/katello/client/core/system_group.py", line 237, in run
    tasks = history['tasks']
KeyError: 'tasks'


Version-Release number of selected component (if applicable):
katello-1.4.2-18.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-agent-1.4.3-1.git.1.24fe511.el6.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-configure-1.4.3-16.el6sat.noarch
katello-glue-pulp-1.4.2-18.el6sat.noarch
katello-all-1.4.2-18.el6sat.noarch
katello-cli-common-1.4.2-8.el6sat.noarch
ruby193-rubygem-foreman-katello-engine-0.0.8-6.el6sat.noarch
signo-katello-0.0.19-1.el6sat.noarch
katello-glue-elasticsearch-1.4.2-18.el6sat.noarch
katello-configure-foreman-1.4.3-16.el6sat.noarch
katello-foreman-all-1.4.2-18.el6sat.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-1.4.2-8.el6sat.noarch
ruby193-rubygem-katello_api-0.0.3-2.el6_4.noarch
katello-common-1.4.2-18.el6sat.noarch
katello-selinux-1.4.3-3.el6sat.noarch
katello-glue-candlepin-1.4.2-18.el6sat.noarch
ruby193-rubygem-katello-foreman-engine-0.0.3-6.el6sat.noarch
katello-qpid-broker-key-pair-1.0-1.noarch


How reproducible:
always

Steps to Reproduce:
1. system_group create --name grp --org org 
2. system_group job_tasks --org org --name grp --job_id 0

Actual results:
error: 'tasks' (more in the log file /var/log/katello/client.log)

Expected results:


Additional info:

Comment 1 RHEL Program Management 2013-09-17 04:22:38 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 4 Mike McCune 2013-10-10 18:28:55 UTC
Lets add some error checking to the API to check for this

Comment 5 manjiri tapaswi 2013-10-15 20:34:35 UTC
Created attachment 812681 [details]
attempted_error_ reproduction

Tried to reproduce the exception, but get the correct/expected error message - looks like it is fixed.

Comment 6 Ales Dujicek 2013-10-18 12:32:28 UTC
But it is not expected output what I can see in your screenshot.
error: 'tasks' (more in the log file /var/log/katello/client.log)

Have you looked into client.log?

File "/usr/lib/python2.6/site-packages/katello/client/core/system_group.py", line 237, in run
    tasks = history['tasks']
KeyError: 'tasks'

Comment 10 Bryan Kearney 2014-08-14 12:45:33 UTC
This is related to the old cli, I am closing this out. If you feel this was a mistake, please go ahead and re-open. Thank you!


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