Bug 678658 - pulp-client repo bind produces traceback
Summary: pulp-client repo bind produces traceback
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: Sprint 21
Assignee: Jeff Ortel
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-02-18 20:04 UTC by dgao
Modified: 2013-09-09 16:31 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:10:54 UTC
Embargoed:


Attachments (Terms of Use)

Description dgao 2011-02-18 20:04:27 UTC
[root@champloo httpd]# pulp-client consumer bind --repoid=foo
Traceback (most recent call last):
  File "/usr/bin/pulp-client", line 5, in <module>
    pkg_resources.run_script('pulp==0.0.129', 'pulp-client')
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 467, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1200, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/lib/python2.7/site-packages/pulp-0.0.129-py2.7.egg/EGG-INFO/scripts/pulp-client", line 63, in <module>
    client.main()
  File "/usr/lib/python2.7/site-packages/pulp-0.0.129-py2.7.egg/pulp/client/cli/base.py", line 137, in main
    command.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp-0.0.129-py2.7.egg/pulp/client/core/base.py", line 118, in main
    action.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp-0.0.129-py2.7.egg/pulp/client/core/base.py", line 224, in main
    self.run()
  File "/usr/lib/python2.7/site-packages/pulp-0.0.129-py2.7.egg/pulp/client/core/consumer.py", line 205, in run
    self.repolib.update()
  File "/usr/lib/python2.7/site-packages/pulp-0.0.129-py2.7.egg/pulp/client/repolib.py", line 70, in update
    return action.perform()
  File "/usr/lib/python2.7/site-packages/pulp-0.0.129-py2.7.egg/pulp/client/repolib.py", line 148, in perform
    for cont in self.getUniqueContent():
  File "/usr/lib/python2.7/site-packages/pulp-0.0.129-py2.7.egg/pulp/client/repolib.py", line 173, in getUniqueContent
    for r in self.getContent(product):
  File "/usr/lib/python2.7/site-packages/pulp-0.0.129-py2.7.egg/pulp/client/repolib.py", line 191, in getContent
    id = str(cont['id'])
TypeError: tuple indices must be integers, not str


Quick fix is to mod repolib.py to:

191: id = str(cont[1]['id'])
192: path = cont[1]['relative_path']

Doing so removes the traceback but produces:

[root@champloo httpd]# pulp-client consumer bind --repoid=foo
error: operation failed: Permission Denied

2011-02-18 15:02:53,446 [ERROR][MainThread] main() @ base.py:234 - error: (401, 'Permission Denied')

Comment 1 Jeff Ortel 2011-02-18 22:20:04 UTC
This was a combination of client refactoring and some REST calls begin POST instead of GET which was exposed by stricter Authentication.

Fixed: 7edeebd9359ef2bfb2327790f40725ea6ea499e8

Comment 2 Jeff Ortel 2011-02-22 14:33:34 UTC
Build: 0.140

Comment 3 dgao 2011-02-22 15:53:27 UTC
[root@pulp-qe ~]# pulp-admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	foo                      
Name               	foo                      
FeedURL            	http://10.16.76.78/pub/updates
FeedType           	yum                      
Arch               	noarch                   
Sync Schedule      	None                     
Packages           	7                        
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     

[root@pulp-qe ~]# pulp-client -u admin -p admin consumer create --id=fred
warning: this client is not registered; please register to continue
Successfully created consumer [ fred ]

[root@pulp-qe ~]# pulp-client consumer bind --repoid=foo
Successfully subscribed consumer [fred] to repo [foo]

Comment 4 Preethi Thomas 2011-08-16 12:10:54 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:22:39 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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