Bug 987937 - CLI - empty string as organization name
Summary: CLI - empty string as organization name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello
Version: 1.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Adam Price
QA Contact: Og Maciel
URL:
Whiteboard:
Depends On:
Blocks: sam13-tracker 995579
TreeView+ depends on / blocked
 
Reported: 2013-07-24 12:42 UTC by Ales Dujicek
Modified: 2013-10-01 11:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 995579 (view as bug list)
Environment:
Last Closed: 2013-10-01 11:14:38 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2013:1390 0 normal SHIPPED_LIVE Release 1.3 of Subscription Asset Manager 2013-10-01 14:43:14 UTC

Description Ales Dujicek 2013-07-24 12:42:42 UTC
Description of problem:


giving an empty string as organization name to CLI commands causes weird behaviour:

> gpg_key list --org ""
Couldn't find organization 'gpg_keys'

> provider info --org '' --name provider
Couldn't find organization 'providers'

> repo list --org ""
error: 0 (more in the log file /var/log/katello/client.log)

> changeset list --org '' --environment Library
error: 0 (more in the log file /var/log/katello/client.log)

> content definition list --org ""
Couldn't find organization 'content_view_definitions'
> org create --name content_view_definitions
Successfully created org [ content_view_definitions ]
> content definition list --org ""
error: 'unicode' object has no attribute 'get' (more in the log file /var/log/katello/client.log)

etc.

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

Comment 1 Ales Dujicek 2013-07-30 11:55:50 UTC
just noticed that if you use too long string (997 and more characters) as organization name, then you get:
Stderr: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
ExitCode: 246

instead of usual error when organization is not found:
Stderr: Couldn't find organization 'orgname'
ExitCode: 148

I thing it is still related to organization name validation so I did not create new bug report

Comment 2 Adam Price 2013-08-07 19:50:49 UTC
https://github.com/Katello/katello-cli/pull/66

Comment 5 Og Maciel 2013-08-16 20:07:51 UTC
sam> product list --org ""
Usage:   <options> product list <options>

headpin: error: Option --org is required; please see --help

sam> provider list --org ""
Usage:   <options> provider list <options>

headpin: error: Option --org is required; please see --help

Comment 6 Og Maciel 2013-08-16 20:08:30 UTC
Verified:

* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.8.20-1.el6sam.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.8.20-1.el6sam.noarch
* candlepin-tomcat6-0.8.20-1.el6sam.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.3-7.el6sat.noarch
* katello-cli-common-1.4.3-7.el6sat.noarch
* katello-common-1.4.3-8.el6sam_splice.noarch
* katello-configure-1.4.4-2.el6sat.noarch
* katello-glue-candlepin-1.4.3-8.el6sam_splice.noarch
* katello-glue-elasticsearch-1.4.3-8.el6sam_splice.noarch
* katello-headpin-1.4.3-8.el6sam_splice.noarch
* katello-headpin-all-1.4.3-8.el6sam_splice.noarch
* katello-selinux-1.4.4-2.el6sat.noarch
* openldap-2.4.23-31.el6.x86_64
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.2.2-1.el6sat.noarch
* ruby193-rubygem-net-ldap-0.3.1-2.el6sat.noarch
* signo-0.0.20-1.el6sat.noarch
* signo-katello-0.0.20-1.el6sat.noarch
* thumbslug-0.0.32-1.el6sam.noarch
* thumbslug-selinux-0.0.32-1.el6sam.noarch

Comment 8 errata-xmlrpc 2013-10-01 11:14:38 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/RHEA-2013-1390.html


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