Bug 1025897

Summary: Exception thrown when syncing multiple rpm repositories containing the same files.
Product: [Retired] Pulp Reporter: Barnaby Court <bcourt>
Component: rpm-supportAssignee: Barnaby Court <bcourt>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: high Docs Contact:
Priority: unspecified    
Version: MasterCC: pthomas
Target Milestone: ---   
Target Release: 2.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-09 14:31:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Barnaby Court 2013-11-01 20:49:23 UTC
Description of problem:
Syncing multiple repos that are part of the same parent repo (for example, rhel 5 os & kickstart) could result in a race condition that threw a log in the pulp.log file.

==> /var/log/pulp/nectar.log <==
2013-11-01 13:17:13,111 nectar.downloaders.base:ERROR: [Errno 17] File exists: '/var/lib/pulp/content/rpm/blas/3.0/38.el5/i386/6ebd3a3f1cfdd2de1e569ad0a4e65b725fcc0c19/Server'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/nectar/downloaders/base.py", line 110, in _fire_event_to_listener
    event_listener_callback(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/listener.py", line 93, in download_succeeded
    unit = self.sync_conduit.init_unit(model.TYPE, model.unit_key, model.metadata, model.relative_path)
  File "/usr/lib/python2.6/site-packages/pulp/plugins/conduits/mixins.py", line 445, in init_unit
    path = content_query_manager.request_content_unit_file_path(type_id, relative_path)
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/content/query.py", line 283, in request_content_unit_file_path
    os.makedirs(unit_dir)
  File "/usr/lib64/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
ImporterConduitException: [Errno 17] File exists: '/var/lib/pulp/content/rpm/blas/3.0/38.el5/i386/6ebd3a3f1cfdd2de1e569ad0a4e65b725fcc0c19/Server'

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Barnaby Court 2013-11-01 20:54:21 UTC
https://github.com/pulp/pulp/pull/700

Comment 2 Jeff Ortel 2013-11-01 22:29:09 UTC
build: 2.3.0-0.27.beta

Comment 3 Preethi Thomas 2013-11-06 14:56:32 UTC
verified
No error in nectar.log

Synced rhel6.1 os & kickstart

Also synced rhel62 os & kickstart

Comment 4 Preethi Thomas 2013-12-09 14:31:02 UTC
Pulp 2.3 released.