Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1325018

Summary: Syncing an iso/file tree with directories causes a failure
Product: Red Hat Satellite Reporter: Partha Aji <paji>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, bmbouter, daviddavis, dkliban, ggainey, ipanova, mhrivnak, mmccune, omaciel, pcreech, rchan, ttereshc
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://pulp.plan.io/issues/1824
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:51:07 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:
Bug Depends On:    
Bug Blocks: 1321771    
Attachments:
Description Flags
pulp manifest none

Description Partha Aji 2016-04-07 21:08:55 UTC
Created attachment 1144897 [details]
pulp manifest

Description of problem:
ISO trees with nested structure cause sync failures

Download the attached pulp-manifest.sh

Setup the following repo on satellite machine

$ chmod 700 pulp-manifest.sh 
$ mkdir -p foo/bar
$ touch foo/blah.txt
$ touch foo/bar/boo.txt
$ cd foo
$ ../pulp-manifest.sh blah.txt bar/boo.txt > PULP_MANIFEST
$ python -m SimpleHTTPServer 5555


Logon to your satellite
1) Content-> Products -> Choose product -> Repositories -> Create Repository

2) Setup a Repository with content type "file" and feed => "http://localhost:5555/foo"

3) Sync the repository

Expected:
Syncs cleanly.

Actual:
Error with /var/log/messages showing the following error

""""
Apr  7 15:17:09 galaxy pulp: pulp.plugins.file.distributor:INFO: Beginning publish for repository <foo>
Apr  7 15:17:09 galaxy pulp: pulp.plugins.file.distributor:ERROR: (2419-02304) [Errno 2] No such file or directory
Apr  7 15:17:09 galaxy pulp: pulp.plugins.file.distributor:ERROR: (2419-02304) Traceback (most recent call last):
Apr  7 15:17:09 galaxy pulp: pulp.plugins.file.distributor:ERROR: (2419-02304)   File "/usr/lib/python2.7/site-packages/pulp/plugins/file/distributor.py", line 90, in publish_repo
Apr  7 15:17:09 galaxy pulp: pulp.plugins.file.distributor:ERROR: (2419-02304)     self._symlink_unit(build_dir, unit, links_to_create)
Apr  7 15:17:09 galaxy pulp: pulp.plugins.file.distributor:ERROR: (2419-02304)   File "/usr/lib/python2.7/site-packages/pulp/plugins/file/distributor.py", line 239, in _symlink_unit
Apr  7 15:17:09 galaxy pulp: pulp.plugins.file.distributor:ERROR: (2419-02304)     os.symlink(unit.storage_path, symlink_filename)
Apr  7 15:17:09 galaxy pulp: pulp.plugins.file.distributor:ERROR: (2419-02304) OSError: [Errno 2] No such file or directory
Apr  7 15:17:10 galaxy pulp: pulp.server.controllers.repository:INFO: {'state': 'failed', 'error_message': '[Errno 2] No such file or directory', 'traceback': 'Traceback (most recent call last):\n  File "/usr/lib/python2.7/site-packages/pulp/plugins/file/distributor.py", line 90, in publish_repo\n    self._symlink_unit(build_dir, unit, links_to_create)\n  File "/usr/lib/python2.7/site-packages/pulp/plugins/file/distributor.py", line 239, in _symlink_unit\n    os.symlink(unit.storage_path, symlink_filename)\nOSError: [Errno 2] No such file or directory\n', 'state_times': {'failed': '2016-04-07T19:17:09', 'not_started': '2016-04-07T19:17:09', 'in_progress': '2016-04-07T19:17:09'}}
Apr  7 15:17:10 galaxy pulp: py.warnings:WARNING: (2419-02304) /usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py:1039: DeprecationWarning: save is deprecated. Use insert_one or replace_one instead
Apr  7 15:17:10 galaxy pulp: py.warnings:WARNING: (2419-02304)   publish_result_coll.save(result)
""""

Comment 2 pulp-infra@redhat.com 2016-04-08 01:03:39 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2016-04-08 01:03:41 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2016-04-08 13:33:40 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2016-04-14 20:03:40 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 6 pulp-infra@redhat.com 2016-04-26 23:03:52 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 8 pulp-infra@redhat.com 2016-05-16 14:30:34 UTC
The Pulp upstream bug status is at VERIFIED. Updating the external tracker on this bug.

Comment 9 pulp-infra@redhat.com 2016-05-17 20:00:45 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 11 Peter Ondrejka 2016-10-13 14:39:46 UTC
Verified in satellite-6.2.3-1.0, according to steps from problem desc (in step2 should be "http://localhost:5555").

Comment 12 Peter Ondrejka 2016-10-13 17:32:49 UTC
(In reply to Peter Ondrejka from comment #11)
> Verified in satellite-6.2.3-1.0, according to steps from problem desc (in
> step2 should be "http://localhost:5555").

also works on sat 6.3 snap 3.0

Comment 13 Satellite Program 2018-02-21 16:51:07 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> 
> For information on the advisory, and where to find the updated files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2018:0336