Bug 822484

Summary: [cli] sync_plan list traceback
Product: Red Hat Satellite Reporter: Garik Khachikyan <gkhachik>
Component: APIAssignee: Petr Chalupa <pchalupa>
Status: CLOSED ERRATA QA Contact: Garik Khachikyan <gkhachik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: achan, asettle, dmacpher, mkoci, mmccune, omaciel, pchalupa, tsanders
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Attempts to list sync plans via the "sync_plan list" command results in a traceback error, due to a programming error. This fix corrects date column header name. A list of created sync plans now displays when the command is issued.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 19:45:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Garik Khachikyan 2012-05-17 13:32:24 UTC
Description of problem:
recent katello latest ends up with tracebac kon "sync_plan list --org ACME_Corporation"
---
error: expected string or buffer (more in the log file)
---

... and log explains:
---
2012-05-17 15:25:45,920 [ERROR][MainThread] error() @ base.py:188 - expected string or buffer
2012-05-17 15:25:45,950 [ERROR][MainThread] error() @ base.py:189 - Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/katello/client/cli/base.py", line 237, in main
    return command.main(command_args)
  File "/usr/lib/python2.6/site-packages/katello/client/core/base.py", line 150, in main
    return action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/katello/client/core/base.py", line 400, in main
    return self.run()
  File "/usr/lib/python2.6/site-packages/katello/client/core/sync_plan.py", line 75, in run
    self.printer.print_items(plans)
  File "/usr/lib/python2.6/site-packages/katello/client/utils/printer.py", line 323, in print_items
    self.__printer_strategy.print_items(self.__heading, self.__filtered_columns(), items)
  File "/usr/lib/python2.6/site-packages/katello/client/utils/printer.py", line 172, in print_items
    column_widths = self._calc_column_widths(items, columns)
  File "/usr/lib/python2.6/site-packages/katello/client/utils/printer.py", line 257, in _calc_column_widths
    widths[column['attr_name']] = self._column_width(items, column)
  File "/usr/lib/python2.6/site-packages/katello/client/utils/printer.py", line 241, 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/utils/printer.py", line 79, in _get_column_value
    value = value_format_func(value)
  File "/usr/lib/python2.6/site-packages/katello/client/core/utils.py", line 134, in format_date
    t = iso8601.parse(date)
  File "/usr/lib64/python2.6/site-packages/_xmlplus/utils/iso8601.py", line 20, in parse
    m = __datetime_rx.match(s)
TypeError: expected string or buffer
---


Version-Release number of selected component (if applicable):
python-oauth2-1.5.170-2.pulp.el6.noarch
candlepin-0.5.32-1.el6.noarch
katello-glue-foreman-0.2.35-1.git.52.1ef9503.el6.noarch
pulp-1.0.4-1.el6.noarch
katello-repos-testing-0.2.4-1.el6.noarch
qpid-cpp-client-ssl-0.14-14.el6_2.x86_64
katello-qpid-broker-key-pair-1.0-1.noarch
katello-agent-1.0.3-1.git.0.cccd0b4.el6.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64
pulp-common-1.0.4-1.el6.noarch
katello-common-0.2.35-1.git.52.1ef9503.el6.noarch
pulp-selinux-server-1.0.4-1.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-0.2.33-1.git.47.57dfe29.el6.noarch
katello-cli-tests-0.2.15-1.git.6.e9265a5.el6.noarch
qpid-cpp-server-0.14-14.el6_2.x86_64
katello-glue-pulp-0.2.35-1.git.52.1ef9503.el6.noarch
katello-0.2.35-1.git.52.1ef9503.el6.noarch
katello-configure-0.2.20-1.git.46.ee20972.el6.noarch
candlepin-tomcat6-0.5.32-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-common-0.2.33-1.git.47.57dfe29.el6.noarch
m2crypto-0.21.1.pulp-7.el6.x86_64
katello-certs-tools-1.1.6-1.git.0.4878f30.el6.noarch
python-qpid-0.14-7.el6_2.noarch
qpid-cpp-client-0.14-14.el6_2.x86_64
katello-glue-candlepin-0.2.35-1.git.52.1ef9503.el6.noarch
katello-selinux-0.2.4-1.git.0.b03a73e.el6.noarch
katello-repos-0.2.4-1.el6.noarch
qpid-cpp-server-ssl-0.14-14.el6_2.x86_64

How reproducible:
always

Steps to Reproduce:
1.sync_plan create --name sp1 --date 2012-05-17 --interval hourly
2.sync_plan list
3.
  
Actual results:
failure

Expected results:
no failures, list of created sync plans should be returned.

Additional info:

Comment 1 Petr Chalupa 2012-06-11 10:31:57 UTC
fixed in 22c7ca098375e266f534c9f16c516e0858a0553c

Comment 3 Garik Khachikyan 2012-09-19 11:44:20 UTC
# VERIFIED

the scenario in bug description is fulfilled now. thanks.

checked on:
---
candlepin-0.7.8-1.el6cf.noarch
katello-glue-pulp-1.1.12-7.el6cf.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-common-1.1.8-4.el6cf.noarch
qpid-cpp-client-0.14-22.el6_3.x86_64
katello-common-1.1.12-7.el6cf.noarch
qpid-cpp-client-ssl-0.14-22.el6_3.x86_64
katello-selinux-1.1.1-1.el6cf.noarch
pulp-1.1.12-1.el6cf.noarch
candlepin-tomcat6-0.7.8-1.el6cf.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-agent-1.1.2-1.el6cf.noarch
qpid-cpp-server-0.14-22.el6_3.x86_64
python-oauth2-1.5.170-2.pulp.el6.noarch
katello-certs-tools-1.1.8-1.el6cf.noarch
python-isodate-0.4.4-4.pulp.el6.noarch
python-qpid-0.14-11.el6_3.noarch
pulp-selinux-server-1.1.12-1.el6cf.noarch
katello-glue-candlepin-1.1.12-7.el6cf.noarch
candlepin-cert-consumer-hp-xw6600-02.rhts.eng.bos.redhat.com-1.0-1.noarch
pulp-common-1.1.12-1.el6cf.noarch
katello-configure-1.1.9-3.el6cf.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64
candlepin-selinux-0.7.8-1.el6cf.noarch
katello-1.1.12-7.el6cf.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-1.1.8-4.el6cf.noarch
m2crypto-0.21.1.pulp-7.el6.x86_64
qpid-cpp-server-ssl-0.14-22.el6_3.x86_64
---

Comment 5 errata-xmlrpc 2012-12-04 19:45:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1543.html