Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 623923 - Handle error if directory is not readable when doing repo upload
Handle error if directory is not readable when doing repo upload
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Retired
Component: z_other (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Pradeep Kilambi
: Triaged
Depends On:
Blocks: verified-to-close
  Show dependency treegraph
 
Reported: 2010-08-13 03:10 EDT by Shveta
Modified: 2011-08-16 10:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-08-16 10:20:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shveta 2010-08-13 03:10:02 EDT
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 11:30:54 EDT
on re-reading this, we can probably handle this error better.
Comment 3 Pradeep Kilambi 2010-10-27 15:29:50 EDT
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 12:58:25 EDT
Fixed in 0.77.
Comment 5 Jay Dobies 2010-11-03 15:35:25 EDT
Fixed in build 0.78.
Comment 6 Preethi Thomas 2010-11-10 11:21:29 EST
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 10:20:18 EDT
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.