Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1188406

Summary: sync and publish returns failed [Errno 21] Is a directory on f21 and rh6
Product: [Retired] Pulp Reporter: Irina Gulina <igulina>
Component: z_otherAssignee: Randy Barlow <rbarlow>
Status: CLOSED DUPLICATE QA Contact: pulp-qe-list
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: austin, mhrivnak, rbarlow
Target Milestone: ---Keywords: Triaged
Target Release: 2.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-06 15:33:32 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 Irina Gulina 2015-02-02 19:04:59 UTC
>> rpm -qa pulp-server
pulp-server-2.6.0-0.5.beta.fc21.noarch


>> pulp-admin -u admin -p admin rpm repo create --repo-id rybka --feed https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
Successfully created repository [rybka]

>> pulp-admin -u admin -p admin rpm repo sync run --repo-id rybka 
+----------------------------------------------------------------------+
                    Synchronizing Repository [rybka]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.


Downloading metadata...
[|]
... completed

Downloading repository content...
[==================================================] 100%
RPMs:       32/32 items
Delta RPMs: 0/0 items

... completed

Downloading distribution files...
[==================================================] 100%
Distributions: 0/0 items
... completed

Importing errata...
[-]
... completed

Importing package groups/categories...
[-]
... completed


Task Succeeded



Initializing repo metadata
[-]
... completed

Publishing Distribution files
[-]
... completed

Publishing RPMs
[==================================================] 100%
32 of 32 items
... completed

Publishing Delta RPMs
... skipped

Publishing Errata
[==================================================] 100%
4 of 4 items
... completed

Publishing Comps file
[==================================================] 100%
3 of 3 items
... completed

Publishing Metadata.
[-]
... completed

Closing repo metadata
[-]
... completed

Generating sqlite files
... skipped

Publishing files to web
[-]
... failed
[Errno 21] Is a directory


Task Failed

[Errno 21] Is a directory

>> less ./.pulp/server_calls.log
{
        "num_success": 0, 
        "description": "Publishing files to web", 
        "step_type": "publish_directory", 
        "items_total": 1, 
        "state": "FAILED", 
        "error_details": [
          {
            "traceback": "  File \"/usr/lib/python2.6/site-packages/pulp/plugins/util/publish_step.py\", line 204, in process\n    self._process_block()\n\n  File \"/usr/lib/python2.6/site-packages/pulp/plugins/util/publish_step.py\", line 246, in _process_block\n    self.process_main()\n\n  File \"/usr/lib/python2.6/site-packages/pulp/plugins/util/publish_step.py\", line 778, in process_main\n    os.rename(tmp_link_name, publish_location)\n", 
            "error": "[Errno 21] Is a directory"
          }
        ], 
        "details": "", 
        "num_failures": 1, 
        "step_id": "6d644052-2dce-42b3-986f-6e108e18e59c", 
        "num_processed": 1
      },



There is the same issue on rh6, however on f20 evrth is fine, see comment here https://bugzilla.redhat.com/show_bug.cgi?id=1124570#c6

Comment 1 Irina Gulina 2015-02-04 14:52:05 UTC
on pulp 2.6.0.5 under rh6 

>> pulp-admin rpm repo publish run --repo-id zoo
+----------------------------------------------------------------------+
                      Publishing Repository [zoo]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.


Copying files
[-]
... completed

Initializing repo metadata
[-]
... completed

Publishing Distribution files
[-]
... completed

Publishing RPMs
[-]
... completed

Publishing Delta RPMs
... skipped

Publishing Errata
[==================================================] 100%
4 of 4 items
... completed

Publishing Comps file
[==================================================] 100%
3 of 3 items
... completed

Publishing Metadata.
[-]
... completed

Closing repo metadata
[-]
... completed

Generating sqlite files
... skipped

Publishing files to web
[-]
... failed
[Errno 21] Is a directory


Task Failed

[Errno 21] Is a directory

Comment 2 amacdona@redhat.com 2015-02-06 15:33:32 UTC
I believe this is related to:

https://bugzilla.redhat.com/show_bug.cgi?id=1183784

The problem is that the relative urls are conflicting with relative urls of deleted repos. Until solved, there are two workarounds:

1. Use a different relative url

2. Delete the conflicting orphaned directories in:

/var/lib/pulp/published/yum/http/repos
/var/lib/pulp/published/yum/https/repos

*** This bug has been marked as a duplicate of bug 1183784 ***