Bug 623923 - Handle error if directory is not readable when doing repo upload
Summary: Handle error if directory is not readable when doing repo upload
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2010-08-13 07:10 UTC by Shveta
Modified: 2011-08-16 14:20 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2011-08-16 14:20:18 UTC


Attachments (Terms of Use)

Description Shveta 2010-08-13 07:10:02 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

[root@shveta noarch]# pulp-admin -u admin -p admin repo upload --id=f12_x86 --dir=http://download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/Packages/
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 30, in <module>
    pulpcli.PulpCore().main()
  File "/usr/lib/python2.6/site-packages/pulptools/pulpcli.py", line 108, in main
    cmd.main()
  File "/usr/lib/python2.6/site-packages/pulptools/core/basecore.py", line 115, in main
    self._do_core()
  File "/usr/lib/python2.6/site-packages/pulptools/core/core_repo.py", line 114, in _do_core
    self._upload()
  File "/usr/lib/python2.6/site-packages/pulptools/core/core_repo.py", line 222, in _upload
    files += utils.processDirectory(self.options.dir, "rpm")
  File "/usr/lib/python2.6/site-packages/pulptools/utils.py", line 117, in processDirectory
    for file in listdir(dirpath):
  File "/usr/lib/python2.6/site-packages/pulptools/utils.py", line 106, in listdir
    raise Exception("Cannot read from directory %s" % directory)
Exception: Cannot read from directory /tmp/tito/noarch/http:/download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/Packages



============================================================


[root@shveta grinder]# pulp-admin -u admin -p admin repo upload --id=f12_x86 --dir=/var/www/html/grinder
 Successful uploaded [php-pear-Auth-SASL-1.0.4-1.fc12.noarch.rpm] to  Repo [ f12_x86 ] 
 Successful uploaded [viewvc-1.1.5-2.fc12.noarch.rpm] to  Repo [ f12_x86 ] 
 Successful uploaded [epiphany-2.28.2-1.fc12.x86_64.rpm] to  Repo [ f12_x86 ] 
 Successful uploaded [gnome-python2-libgtop2-2.28.0-2.fc12.x86_64.rpm] to  Repo [ f12_x86 ] 
 Successful uploaded [1:openoffice.org-pyuno-3.1.1-19.32.fc12.x86_64.rpm] to  Repo [ f12_x86 ] 
 Successful uploaded [gparted-0.5.1-1.fc12.x86_64.rpm] to  Repo [ f12_x86 ] 
 Successful uploaded [gstreamermm-devel-0.10.7-1.fc12.x86_64.rpm] to  Repo [ f12_x86 ]

Comment 2 Pradeep Kilambi 2010-09-08 15:30:54 UTC
on re-reading this, we can probably handle this error better.

Comment 3 Pradeep Kilambi 2010-10-27 19:29:50 UTC
fixed!

commit 15c667dd89a5390ef262ab151406e9b9d4f5733d
Author: Pradeep Kilambi <pkilambi@redhat.com>
Date:   Wed Oct 27 15:22:40 2010 -0400

    bz:623923 - Handle read errors during upload


$ sudo pulp-admin -u admin -p admin repo upload --id=f12_x86 --dir=http://download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/Packages/
Cannot read from directory /home/pkilambi/http:/download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/Packages

Comment 4 Jay Dobies 2010-10-29 16:58:25 UTC
Fixed in 0.77.

Comment 5 Jay Dobies 2010-11-03 19:35:25 UTC
Fixed in build 0.78.

Comment 6 Preethi Thomas 2010-11-10 16:21:29 UTC
verified

[root@preethi ~]# pulp-admin repo upload --id=repo-upload --dir=http://download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/Packages/
Cannot read from directory /root/http:/download.devel.redhat.com/released/F-12/GOLD/Fedora/i386/os/Packages

Comment 7 Preethi Thomas 2011-08-16 14:20:18 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.