Bug 1325018 - Syncing an iso/file tree with directories causes a failure
Summary: Syncing an iso/file tree with directories causes a failure
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks: 1321771
TreeView+ depends on / blocked
 
Reported: 2016-04-07 21:08 UTC by Partha Aji
Modified: 2021-04-06 17:59 UTC (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:


Attachments (Terms of Use)
pulp manifest (119 bytes, application/x-shellscript)
2016-04-07 21:08 UTC, Partha Aji
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 1824 0 Normal CLOSED - CURRENTRELEASE iso repo publish fails for file in subdirectories 2016-05-17 20:00:44 UTC

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


Note You need to log in before you can comment on or make changes to this bug.