Bug 766705 - not able to upload a file to a repo using content upload
Summary: not able to upload a file to a repo using content upload
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-12 15:21 UTC by Preethi Thomas
Modified: 2012-02-24 20:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:14:25 UTC


Attachments (Terms of Use)

Description Preethi Thomas 2011-12-12 15:21:51 UTC
Description of problem:

using content upload to upload files to a repo fails with UnboundLocalError
Version-Release number of selected component (if applicable):
[root@preethi ~]# rpm -q pulp
pulp-0.0.254-5.fc15.noarch


How reproducible:


Steps to Reproduce:
1. create a repo (I tried both yum & file)
2. run pulp-admin content upload with -f and -r option
3. see the error
  
Actual results:

[root@preethi ~]# pulp-admin -u admin -p admin content upload /root/upload/test.txt  -r file-repo1 -v 
* Starting Content Upload

* Performing Content Uploads to Pulp server
Content [test.txt] already exists on the server with checksum [119e74eb7308817acef45688fac0e33262b960802f5fda45c55cd6093dd9d343]

* Performing Repo Associations 
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 23, in <module>
    admin.main()
  File "/usr/lib/python2.7/site-packages/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/pluginlib/command.py", line 211, in main
    self.run()
  File "/usr/lib/python2.7/site-packages/pulp/client/admin/plugins/content.py", line 177, in run
    if filtered_count == 0:
UnboundLocalError: local variable 'filtered_count' referenced before assignment
[root@preethi ~]# 

Expected results:
successful upload to the repo   

Additional info:

Comment 1 Pradeep Kilambi 2011-12-12 16:01:40 UTC
commit 0aa9eaefd04e1ce593852289606dbea8215f6c0d

Comment 2 Jeff Ortel 2011-12-12 20:41:22 UTC
0.254-6

Comment 3 Preethi Thomas 2011-12-13 13:40:47 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.254-6.fc15.noarch
[root@preethi ~]# 

[root@preethi ~]# pulp-admin content upload --dir /root/upload/  -r content -v --nosig
* Starting Content Upload

* Performing Content Uploads to Pulp server
Content [gofer-0.32-1.fc14.noarch.rpm] already exists on the server with checksum [af032f3119837475ede531a3b1b0fc44da1f9e3bbe2ca958fe4179cb19e12873]
Successfully uploaded [test2.txt] to server
Successfully uploaded [files.csv] to server
Content [test.txt] already exists on the server with checksum [119e74eb7308817acef45688fac0e33262b960802f5fda45c55cd6093dd9d343]
Successfully uploaded [pulp-0.0.168-1.fc14.noarch.rpm] to server

* Performing Repo Associations 
Package with same NVREA [(u'gofer', u'0', u'0.32', u'1.fc14', u'noarch')] already exists in repo [content]
Package with same filename [gofer-0.32-1.fc14.noarch.rpm] already exists in repo [content]
Packages skipped because of filters associated with the repository content : 0

* Metadata generation has been scheduled for repository [content] with a task id [88fa4a8c-2591-11e1-9659-002564a85a58]; use `pulp-admin repo generate_metadata --status` to check the status.

Content association Complete for Repo [content]: 
 Packages: 
pulp-0.0.168-1.fc14.noarch.rpm
gofer-0.32-1.fc14.noarch.rpm 
 
 Files: 
test.txt
test2.txt
files.csv
error:  
* Content Upload complete.
[root@preethi ~]#

Comment 4 Preethi Thomas 2012-02-24 20:14:25 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 5 Preethi Thomas 2012-02-24 20:19:19 UTC
Pulp v1.0 is released.


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