Bug 1001642 - Exception while trying to list systems with CLI [NEEDINFO]
Exception while trying to list systems with CLI
Status: CLOSED WONTFIX
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.3
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Katello Bug Bin
SAM QE List
: Reopened
Depends On:
Blocks: sam20-tracker
  Show dependency treegraph
 
Reported: 2013-08-27 08:55 EDT by Vitaly Kuznetsov
Modified: 2017-06-26 16:41 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-06-26 16:41:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
sreber: needinfo? (katello-bugs)


Attachments (Terms of Use)

  None (edit)
Description Vitaly Kuznetsov 2013-08-27 08:55:11 EDT
Description of problem:
# katello -u admin -p admin system list --org testorgA5C338
error: 'environment' (more in the log file /var/log/katello/client.log)

# cat /var/log/katello/client.log
2013-08-27 08:48:47,631 [ERROR][MainThread] error() @ base.py:204 - 'environment'
2013-08-27 08:48:47,633 [ERROR][MainThread] error() @ base.py:205 - Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/katello/client/cli/base.py", line 217, 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.py", line 97, in run
    self.printer.print_items(systems)
  File "/usr/lib/python2.6/site-packages/katello/client/lib/ui/printer.py", line 391, in print_items
    self.__printer_strategy.print_items(self.get_header(), self.__filtered_columns(), items)
  File "/usr/lib/python2.6/site-packages/katello/client/lib/ui/printer.py", line 212, in print_items
    column_widths = self._calc_column_widths(items, columns)
  File "/usr/lib/python2.6/site-packages/katello/client/lib/ui/printer.py", line 309, in _calc_column_widths
    widths[column['attr_name']] = self._column_width(items, column)
  File "/usr/lib/python2.6/site-packages/katello/client/lib/ui/printer.py", line 291, in _column_width
    for column_value in [u_str(self._get_column_value(column, item)) for item in items]:
  File "/usr/lib/python2.6/site-packages/katello/client/lib/ui/printer.py", line 100, in _get_column_value
    value = item_format_func(item)
  File "/usr/lib/python2.6/site-packages/katello/client/core/system.py", line 89, in <lambda>
    item_formatter=lambda p: "%s" % (p['environment']['name']))
KeyError: 'environment'


Version-Release number of selected component (if applicable):
# rpm -qa | grep katello
katello-glue-candlepin-1.4.3-9.el6sam_splice.noarch
katello-common-1.4.3-9.el6sam_splice.noarch
katello-headpin-all-1.4.3-9.el6sam_splice.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-glue-elasticsearch-1.4.3-9.el6sam_splice.noarch
katello-selinux-1.4.4-2.el6sat.noarch
katello-cli-common-1.4.3-8.el6sat.noarch
signo-katello-0.0.20-1.el6sat.noarch
katello-cli-1.4.3-8.el6sat.noarch
katello-configure-1.4.4-3.el6sat.noarch
katello-headpin-1.4.3-9.el6sam_splice.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch


How reproducible:
Always

Steps to Reproduce:
1. Try to list systems with CLI
2.
3.

Actual results:
Exception

Expected results:
Systems listed

Additional info:
Comment 1 Tazim Kolhar 2013-08-27 10:29:24 EDT
Tried to use system list for below rpm's

# rpm -qa | grep katello
katello-glue-elasticsearch-1.4.3-9.el6sam_splice.noarch
katello-cli-common-1.4.3-8.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-configure-1.4.4-3.el6sat.noarch
signo-katello-0.0.20-1.el6sat.noarch
katello-glue-candlepin-1.4.3-9.el6sam_splice.noarch
katello-cli-1.4.3-8.el6sat.noarch
katello-common-1.4.3-9.el6sam_splice.noarch
katello-headpin-1.4.3-9.el6sam_splice.noarch
katello-headpin-all-1.4.3-9.el6sam_splice.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-selinux-1.4.4-2.el6sat.noarch

# headpin -u admin -p admin system list --org ACME_Corporation
--------------------------------------------------------------------------------
                   Systems List For Org [ ACME_Corporation ]

Name UUID Environment Service Level Content View 
--------------------------------------------------------------------------------


201308271934:17.077 - FINE: ssh root@hp-dl380pgen8-02-vm-12.lab.bos.redhat.com export LANG=en_US;  /usr/bin/headpin --username "admin" --password "admin" system list -v --org "org-sys-1377611813601" (com.redhat.qe.tools.SSHCommandRunner.run)
201308271934:19.760 - FINE: Stdout: 
--------------------------------------------------------------------------------
                 Systems List For Org [ org-sys-1377611813601 ]
--------------------------------------------------------------------------------

Name          : sys-CustomInfo-1377611813601
UUID          : 929977c7-03c3-4154-835e-a0c774427fd6
Environment   : Library
Service Level : 
Content View  : Default Organization View
Comment 2 Garik Khachikyan 2013-08-27 10:31:59 EDT
@Vitaly hi: mind to run katello-debug and post the produced tarball here please? tyia.
Comment 4 Vitaly Kuznetsov 2013-08-27 10:41:38 EDT
'headpin' command fails with the same result:

# headpin -u admin -p admin system list --org testorgA5C338
error: 'environment' (more in the log file /var/log/katello/client.log)
Comment 9 Bryan Kearney 2017-06-26 16:41:22 EDT
The release of Satellite 5.8 we are deprecating the support of Subscription Asset Manager. The release notes for 5.8 can be found at https://access.redhat.com/documentation/en-us/red_hat_satellite/5.8/pdf/release_notes/Red_Hat_Satellite-5.8-Release_Notes-en-US.pdf.

I am therefore closing out this bug as WONTFIX. If you believe this to be an error, please feel free tor each out to either Rich Jerrido or Bryan Kearney. Thank you!

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