Bug 865528 - Incorrect credentials shows strange bug "string indices must be integers"
Incorrect credentials shows strange bug "string indices must be integers"
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.0
Unspecified Unspecified
high Severity low (vote)
: Unspecified
: --
Assigned To: Lukas Zapletal
Og Maciel
:
Depends On:
Blocks: sam12-tracker 872332
  Show dependency treegraph
 
Reported: 2012-10-11 12:58 EDT by Aaron Weitekamp
Modified: 2013-03-27 16:05 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When katello-configure is run more than once with the same credentials, the previous admin user will fail to authenticate on the System Engine webpage. Error handling in the command line code was improved to ensure that the issue does not occur. The previously created user should be able to successfully authenticate to System Engine regardless of repeated execution of the katello-configure command.
Story Points: ---
Clone Of:
: 872332 (view as bug list)
Environment:
Last Closed: 2012-12-04 14:57:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
katello/client.log (3.12 KB, text/x-log)
2012-10-11 12:58 EDT, Aaron Weitekamp
no flags Details

  None (edit)
Description Aaron Weitekamp 2012-10-11 12:58:42 EDT
Created attachment 625590 [details]
katello/client.log

Description of problem:
If katello-configure is run more than once the previous admin user fails to authenticate

Version-Release number of selected component (if applicable):
1.1 
[root@localhost katello]# rpm -qa |grep katello
katello-glue-pulp-1.1.12-12.el6cf.noarch
katello-certs-tools-1.1.8-1.el6cf.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-common-1.1.8-6.el6cf.noarch
katello-selinux-1.1.1-1.el6cf.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-common-1.1.12-12.el6cf.noarch
katello-1.1.12-12.el6cf.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-configure-1.1.9-6.el6cf.noarch
katello-all-1.1.12-12.el6cf.noarch
katello-cli-1.1.8-6.el6cf.noarch
katello-glue-candlepin-1.1.12-12.el6cf.noarch


How reproducible:
100%

Steps to Reproduce:
1. `katello-configure` with default options
2. run `katello-configure` again with --user-name=[new_username] --user-pass=[new_user_pass]
3a. run katello CLI with credentials from step 2, e.g. `katello -v -u [new_username] -p [new_user_pass]
3b. login WebUI
  
Actual results:
CLI error returned: "error: string indices must be integers (more in the log file /var/log/katello/client.log)"
WebUI display: no error displayed, no page load

Expected results:
successful authentication

Additional info:
Comment 2 Lukas Zapletal 2012-10-30 09:49:52 EDT
I reproduced today.

Looks like this one is the same. https://bugzilla.redhat.com/show_bug.cgi?id=871086
Comment 3 Lukas Zapletal 2012-10-31 07:39:00 EDT
Ok reproduced but I got another priority now, putting back to NEW. I apologize.
Comment 4 Lukas Zapletal 2012-10-31 09:02:08 EDT
Just a head up. This is the error:

2012-10-31 12:51:47,433 [ERROR][MainThread] error() @ base.py:190 - Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/katello/client/cli/base.py", line 202, 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 298, 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 392, in main
    msg = ", ".join(re.args[1]["errors"])
TypeError: string indices must be integers

And if you wait for few minutes after katello-configure run, it will disappear and everything is working fine then.
Comment 5 Lukas Zapletal 2012-10-31 09:23:14 EDT
https://github.com/Katello/katello/pull/959
Comment 7 Lukas Zapletal 2012-11-05 07:25:24 EST
7d29467 865528 - improving error handling in the cli code (cherry picked from commit 54d61c10f73ace4959c789f490f642bcb8af978d)
Comment 9 Og Maciel 2012-11-06 14:52:08 EST
Failed QA:

[root@qetello04 ~]# katello-configure --deployment=cfse --user-name=omaciel --user-pass=foobar
Starting Katello configuration
The top-level log file is [/var/log/katello/katello-configure-20121106-124008/main.log]
[root@qetello04 ~]# katello -u omaciel -p foobar user list
Invalid credentials

* candlepin-0.7.8.1-1.el6cf.noarch
* candlepin-selinux-0.7.8.1-1.el6cf.noarch
* candlepin-tomcat6-0.7.8.1-1.el6cf.noarch
* katello-1.1.12-20.el6cf.noarch
* katello-all-1.1.12-20.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1.el6cf.noarch
* katello-cli-1.1.8-12.el6cf.noarch
* katello-cli-common-1.1.8-12.el6cf.noarch
* katello-common-1.1.12-20.el6cf.noarch
* katello-configure-1.1.9-11.el6cf.noarch
* katello-glue-candlepin-1.1.12-20.el6cf.noarch
* katello-glue-pulp-1.1.12-20.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.1.1-2.el6cf.noarch
* pulp-1.1.14-1.el6cf.noarch
* pulp-common-1.1.14-1.el6cf.noarch
* pulp-selinux-server-1.1.14-1.el6cf.noarch
Comment 10 Og Maciel 2012-11-07 10:24:26 EST
Verified:

Turns out this BZ was about displaying "Invalid credentials" as an error message to the user instead of "string indices must be integers"

* candlepin-0.7.8.1-1.el6cf.noarch
* candlepin-selinux-0.7.8.1-1.el6cf.noarch
* candlepin-tomcat6-0.7.8.1-1.el6cf.noarch
* katello-1.1.12-20.el6cf.noarch
* katello-all-1.1.12-20.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1.el6cf.noarch
* katello-cli-1.1.8-12.el6cf.noarch
* katello-cli-common-1.1.8-12.el6cf.noarch
* katello-common-1.1.12-20.el6cf.noarch
* katello-configure-1.1.9-11.el6cf.noarch
* katello-glue-candlepin-1.1.12-20.el6cf.noarch
* katello-glue-foreman-0.1.318-1.el6cf.noarch
* katello-glue-pulp-1.1.12-20.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.1.1-2.el6cf.noarch
* pulp-1.1.14-1.el6cf.noarch
* pulp-common-1.1.14-1.el6cf.noarch
* pulp-selinux-server-1.1.14-1.el6cf.noarch
Comment 12 errata-xmlrpc 2012-12-04 14:57:17 EST
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

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