Bug 845995
| Summary: | CLI: wrong error when activation key name or system group name is wrong. | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Hayk Hovsepyan <hhovsepy> |
| Component: | API | Assignee: | Miroslav Suchý <msuchy> |
| Status: | CLOSED ERRATA | QA Contact: | Hayk Hovsepyan <hhovsepy> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0.0 | CC: | achan, asettle, bkearney, dmacpher, inecas, mmccune, msuchy, omaciel |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Specifying a nonexistent system group when adding a system group to an activation key on the command line resulted in a misleading error message:
"error: list index out of range (more in the log file /var/log/katello/client.log)"
This fix adds local and server-side to validate and specify which activation key or system group produces the error and report it.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-12-04 19:53:08 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: | |||
The same when you remove system group from activation key. "activation_key remove_system_group --name $wrongname --system_group $wrongname --org ACME_Corporation" Syntax error fixed in: https://github.com/Katello/katello/pull/515 Tested on revision: katello-cli-1.1.8-4.el6cf.noarch katello-certs-tools-1.1.8-1.el6cf.noarch candlepin-selinux-0.7.8-1.el6cf.noarch qpid-cpp-server-ssl-0.14-14.el6_2.x86_64 pulp-selinux-server-1.1.12-1.el6cf.noarch katello-glue-pulp-1.1.12-7.el6cf.noarch katello-qpid-broker-key-pair-1.0-1.noarch katello-cli-common-1.1.8-4.el6cf.noarch candlepin-0.7.8-1.el6cf.noarch qpid-cpp-client-ssl-0.14-14.el6_2.x86_64 katello-configure-1.1.9-3.el6cf.noarch katello-glue-candlepin-1.1.12-7.el6cf.noarch katello-candlepin-cert-key-pair-1.0-1.noarch candlepin-tomcat6-0.7.8-1.el6cf.noarch pulp-common-1.1.12-1.el6cf.noarch qpid-cpp-server-0.14-14.el6_2.x86_64 katello-selinux-1.1.1-1.el6cf.noarch katello-all-1.1.12-7.el6cf.noarch python-qpid-0.14-7.el6_2.noarch python-isodate-0.4.4-4.pulp.el6.noarch qpid-cpp-client-0.14-14.el6_2.x86_64 pulp-1.1.12-1.el6cf.noarch katello-common-1.1.12-7.el6cf.noarch katello-1.1.12-7.el6cf.noarch katello-qpid-client-key-pair-1.0-1.noarch m2crypto-0.21.1.pulp-7.el6.x86_64 python-oauth2-1.5.170-2.pulp.el6.noarch mod_wsgi-3.3-3.pulp.el6.x86_64 The problem was fixed only for one case, when system group name is wrong in add_system_group "activation_key add_system_group --name $correctname --system_group $wrongname --org ACME_Corporation". But in 3 other cases it still fails: 1. Activation key name is wrong while adding: "activation_key add_system_group --name $wrongname --system_group $systemgroupname --org ACME_Corporation". 2. Activation key name is wrong while removing: "activation_key remove_system_group --name $wrongname --system_group $systemgroupname --org ACME_Corporation". 3. System group name is wrong while removing: "activation_key remove_system_group --name $name --system_group $wrongsystemgroupname --org ACME_Corporation". In all 3 cases it shows error "error: list index out of range (more in the log file /var/log/katello/client.log)". The request not merged yet, changing to ASSIGNED Verified on revision: katello-certs-tools-1.1.8-1.el6cf.noarch katello-common-1.1.12-9.el6cf.noarch katello-1.1.12-9.el6cf.noarch katello-qpid-client-key-pair-1.0-1.noarch katello-configure-1.1.9-4.el6cf.noarch katello-selinux-1.1.1-1.el6cf.noarch katello-glue-candlepin-1.1.12-9.el6cf.noarch katello-qpid-broker-key-pair-1.0-1.noarch katello-agent-1.1.2-1.el6cf.noarch katello-glue-pulp-1.1.12-9.el6cf.noarch katello-candlepin-cert-key-pair-1.0-1.noarch katello-cli-common-1.1.8-5.el6cf.noarch katello-cli-1.1.8-5.el6cf.noarch Now it works OK for all 4 cases. 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 |
Description of problem: Try to add system group to activation key by CLI. When you specify non existing system group name or non existing activation key name while assigning system group to activation key, it shows wrong error message:"error: list index out of range (more in the log file /var/log/katello/client.log)" In client.log file it prints: " File "/usr/lib/python2.6/site-packages/katello/client/core/activation_key.py", line 315, in run system_group = system_group[0] IndexError: list index out of range" Version-Release number of selected component (if applicable): python-qpid-0.14-7.el6_2.noarch katello-common-1.1.3-1.el6.noarch qpid-cpp-server-ssl-0.14-14.el6_2.x86_64 candlepin-tomcat6-0.5.35-1.el6.noarch katello-1.1.3-1.el6.noarch katello-configure-1.1.2-1.el6.noarch katello-qpid-broker-key-pair-1.0-1.noarch katello-cli-common-1.0.1-1.el6.noarch katello-cli-1.0.1-1.el6.noarch katello-repos-1.1.1-1.el6.noarch mod_wsgi-3.3-3.pulp.el6.x86_64 katello-glue-pulp-1.1.3-1.el6.noarch qpid-cpp-client-ssl-0.14-14.el6_2.x86_64 katello-selinux-1.0.1-1.el6.noarch katello-qpid-client-key-pair-1.0-1.noarch katello-agent-1.0.6-1.el6.noarch python-oauth2-1.5.170-2.pulp.el6.noarch pulp-common-1.1.11-1.el6.noarch katello-glue-candlepin-1.1.3-1.el6.noarch qpid-cpp-server-0.14-14.el6_2.x86_64 pulp-1.1.11-1.el6.noarch katello-candlepin-cert-key-pair-1.0-1.noarch m2crypto-0.21.1.pulp-7.el6.x86_64 katello-certs-tools-1.1.7-1.el6.noarch katello-glue-foreman-1.1.3-1.el6.noarch candlepin-0.5.35-1.el6.noarch qpid-cpp-client-0.14-14.el6_2.x86_64 pulp-selinux-server-1.1.11-1.el6.noarch How reproducible: always Steps to Reproduce: 1. Create an activation key. 2. Create a system group. 3. Try to assign some wrong system group to created activation key: "activation_key add_system_group --name $wrongname --system_group $systemgroupname --org ACME_Corporation". You will see strange error. This is bug. 4. Try to assign existing system group to wrong activation key. The same error. Actual results: System throws some array index out of range error when activation key or system group name does not exist. Expected results: Sit should check does activation key or system group exists. If not, show message that they are not found.