Bug 623923

Summary: Handle error if directory is not readable when doing repo upload
Product: [Retired] Pulp Reporter: Shveta <ssachdev>
Component: z_otherAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: pthomas
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 14:20:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 647488    

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>
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.