Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 770515 - Getting "Type error" while checking repo status from cli.
Summary: Getting "Type error" while checking repo status from cli.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Martin Bacovsky
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-12-27 07:52 UTC by Sachin Ghai
Modified: 2019-09-26 13:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 18:16:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sachin Ghai 2011-12-27 07:52:21 UTC
Description of problem:
I imported simple Novs manifest (stageSamTestSimple20Nov2011.zip) and synced rhel6.1 and rhel6.2 repos. Sync was successful. Later I tried to check the repo status and got following:

error: string indices must be integers (more in the log file)



Repo list:
============
katello> repo list --org ACME_Corporation
-----------------------------------------------------------------------------
            Repo List For Org ACME_Corporation Environment Locker

 Id   Name                                               Package Count  
-----------------------------------------------------------------------------
 1    pulp_x86_64                                                       
 79   Red Hat Enterprise Linux 6 Server RPMs 62 x86_64                  
 78   Red Hat Enterprise Linux 6 Server RPMs 61 x86_64 

product list:
===============

katello> product list --org ACME_Corporation --provider "Red Hat"
------------------------------------------------------------------------------------------
                            Product List For Provider Red Hat

 Id          Name                                                                     Provider Id   Provider Name  
------------------------------------------------------------------------------------------
 69          Red Hat Enterprise Linux Server                                          1             Red Hat        
 RH0197181   Red Hat Enterprise Linux Server Self-support 1-2 sockets Up to 1 guest   1             Red Hat        
katello> 

Repo status:
============

katello> repo status --name "Red Hat Enterprise Linux 6 Server RPMs 61 x86_64" --org ACME_Corporation --product "Red Hat Enterprise Linux Server"
error: string indices must be integers (more in the log file)
katello> 


Version-Release number of selected component (if applicable):
[root@dhcp201-197 ~]# rpm -qa | grep katello
katello-glue-pulp-0.1.155-1.el6.noarch
katello-configure-0.1.48-1.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-cli-common-0.1.31-1.el6.noarch
katello-glue-foreman-0.1.155-1.el6.noarch
katello-common-0.1.155-1.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-0.1.155-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-repos-0.1.4-1.el6.noarch
katello-cli-0.1.31-1.el6.noarch
katello-glue-candlepin-0.1.155-1.el6.noarch
katello-all-0.1.155-1.el6.noarch
katello-certs-tools-1.0.1-1.el6.noarch


How reproducible:
always

Steps to Reproduce:
1. check repo status

Actual results:
katello> repo status --name "Red Hat Enterprise Linux 6 Server RPMs 61 x86_64" --org ACME_Corporation --product "Red Hat Enterprise Linux Server"
error: string indices must be integers (more in the log file)
katello> 

Expected results:
No error should be raised on executing repo status 

Additional info:


production.log:
==================

Started GET "/katello///api/environments/1/products/69/repositories?include_disabled=False&name=Red+Hat+Enterprise+Linux+6+Server+RPMs+61+x86_64" for 127.0.0.1 at Tue Dec 27 13:06:02 +0530 2011
  Processing by Api::ProductsController#repositories as JSON
  Parameters: {"name"=>"Red Hat Enterprise Linux 6 Server RPMs 61 x86_64", "id"=>"69", "environment_id"=>"1", "include_disabled"=>"False"}
Completed 200 OK in 28ms (Views: 1.9ms | ActiveRecord: 16.4ms)


Started GET "/katello///api/repositories/78/" for 127.0.0.1 at Tue Dec 27 13:06:02 +0530 2011
  Processing by Api::RepositoriesController#show as JSON
  Parameters: {"id"=>"78"}
Completed 200 OK in 159ms (Views: 2.4ms | ActiveRecord: 0.5ms)


Started GET "/katello///api/repositories/78/sync" for 127.0.0.1 at Tue Dec 27 13:06:02 +0530 2011
  Processing by Api::SyncController#index as JSON
  Parameters: {"repository_id"=>"78"}
Completed 200 OK in 91ms (Views: 2.1ms | ActiveRecord: 0.6ms)


client.log:
==========

2011-12-27 13:09:06,828 [ERROR][MainThread] error() @ base.py:184 - string indices must be integers
2011-12-27 13:09:06,843 [ERROR][MainThread] error() @ base.py:185 - Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/katello/client/cli/base.py", line 226, in main
    return command.main(command_args)
  File "/usr/lib/python2.6/site-packages/katello/client/core/base.py", line 149, in main
    return action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/katello/client/core/base.py", line 358, in main
    return self.run()
  File "/usr/lib/python2.6/site-packages/katello/client/core/repo.py", line 287, in run
    repo['last_errors'] = format_progress_errors(errors)
  File "/usr/lib/python2.6/site-packages/katello/client/core/utils.py", line 412, in format_progress_errors
    error_list = [e["error"]["error"] for e in errors]
TypeError: string indices must be integers

Comment 1 Martin Bacovsky 2012-01-11 15:43:23 UTC
I was unable to reproduce it on katello-cli-0.1.34, katello-0.1.174.

According to inecas it seems the issue was fixed along with  
#771363 - Promoting the changeset fails (system test) and should be fixed since katello-0.1.163

Comment 2 Sachin Ghai 2012-01-17 08:37:20 UTC
Verified with latest katello build 0.1.178

[root@dhcp201-176 ~]# rpm -qa | grep -ie katello-0 -ie pulp-0
katello-0.1.178-1.el6.noarch
katello-glue-pulp-0.1.178-1.el6.noarch
pulp-0.0.257-1.el6.noarch
[root@dhcp201-176 ~]# 



katello> repo status --org sghai_org --name "Red Hat Enterprise Linux 6 Server RPMs 62 x86_64" --product "Red Hat Enterprise Linux Server"
--------------------------------------------------------------------------------
                               Repository Status
--------------------------------------------------------------------------------

Package Count: 6732
Last Sync:     2012/01/17 10:07:30
Sync State:    Finished

katello> repo status --org ami_org --name pulpy_x64 --product pulpy
--------------------------------------------------------------------------------
                               Repository Status
--------------------------------------------------------------------------------

Package Count: 20
Last Sync:     2012/01/17 17:04:22
Sync State:    Finished

katello>


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