Issue #3338
closed
rsync distributor syncs symlinks to wrong directory if repo_relative_path starts with /
Description
Due behavior of
os.path.join("/root/", "/foo/")
pulp/plugins/rsync/publish.py::RSyncPublishStep::make_destination
produces wrong destination directory which cause symlinks + extra content are synced to
<host>:/<relative_path> instead of <host>:<remote_root>/<relative_path>
- Sprint/Milestone set to 54
- Triaged changed from No to Yes
The fix needs to include preventing the relative path from being absolute (having a leading /). The publish should fail when encountering a relative path that is absolute.
- Status changed from NEW to ASSIGNED
- Assignee set to mansari
- Sprint/Milestone changed from 54 to 56
- Sprint/Milestone deleted (
56)
- Sprint changed from Sprint 33 to Sprint 34
- Sprint changed from Sprint 34 to Sprint 35
- Sprint changed from Sprint 35 to Sprint 36
- Sprint changed from Sprint 36 to Sprint 37
- Status changed from ASSIGNED to NEW
- Assignee deleted (
mansari)
- Sprint changed from Sprint 37 to Sprint 38
- Status changed from NEW to ASSIGNED
- Assignee set to jortel@redhat.com
- Sprint changed from Sprint 38 to Sprint 39
The rsync distributor documentation and code are confusing. I don't see a distributor configuration property named repo_relative_path in the documentation or the code. The closest I can find is remote_units_path which appears to be verified in the remote configuration but used from the root configuration which is a bug.
Please provided a more detailed explanation and steps to reproduce including a sample distributor configuration.
- Sprint changed from Sprint 39 to Sprint 40
- Status changed from ASSIGNED to NEW
- Assignee deleted (
jortel@redhat.com)
- Sprint changed from Sprint 40 to Sprint 41
- Sprint deleted (
Sprint 41)
repo_relative_path is attribute shared for all types of repositories. You can find it for example here:
pulp_rpm/plugins/pulp_rpm/plugins/distributors/yum/configuration.py::get_repo_relative_path which looks at repo config for
config.get('relative_url', repo.repo_id)
btw, this was filled against master but I think master is already for pulp-3.x which could be different from what was in pulp-2.x
- Status changed from NEW to CLOSED - WONTFIX
Also available in: Atom
PDF