Project

Profile

Help

Issue #5809

closed

Sync with mirror=false is not additive

Added by iballou over 4 years ago. Updated almost 4 years ago.

Status:
CLOSED - NOTABUG
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 62
Quarter:

Description

I've synced a repo twice, each time with a different url. The second sync clears out the repo version and only contains the content from the latest remote repo. This seems to be a regression since it was additive before.

Actions #1

Updated by iballou over 4 years ago

This is with file content.

Actions #2

Updated by fao89 over 4 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 62
Actions #3

Updated by dalley over 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley
Actions #4

Updated by dalley over 4 years ago

iballou, do all of the files in the 2 repositories have the same relative paths? I was able to reproduce this behavior in this circumstance, but not generally, at least not yet. Are these repositories public?

If the relative paths overlap -- two files can't be published to the same relative_path, so Pulp prefers the new one and drops the old one in this circumstance. Pulp is correct in not allowing overlapping relative paths, and I don't think it should fail outright instead of doing what it does, but a warning might be a good idea, instead of replacing them silently.

Actions #5

Updated by iballou over 4 years ago

dalley wrote:

iballou, do all of the files in the 2 repositories have the same relative paths? I was able to reproduce this behavior in this circumstance, but not generally, at least not yet. Are these repositories public?

This is the case, yeah. The two repositories have files with exactly the same names. The repositories are file1 and file2 here (https://github.com/Katello/katello/tree/master/test/fixtures/test_repos). We sync them from the filesystem locally.

If the relative paths overlap -- two files can't be published to the same relative_path, so Pulp prefers the new one and drops the old one in this circumstance. Pulp is correct in not allowing overlapping relative paths, and I don't think it should fail outright instead of doing what it does, but a warning might be a good idea, instead of replacing them silently.

Having repo syncing be additive with the same file names worked before, we had an old test that started failing recently related to this. Do you think this working before was a Pulp 3 bug or was that a more recent design decision?

Actions #6

Updated by dalley over 4 years ago

  • Status changed from ASSIGNED to CLOSED - NOTABUG

Basically, Pulp used to have a bug, and we fixed it recently. There's no correct way to publish a repository version with multiple content units using the same relative_path, so any repository version that contains this is essentially invalid. Previously you could still make repository versions like this and it wouldn't stop you, but it would almost certainly cause problems later. Whereas now we validate repository versions for correctness before they are created, and in this case Pulp resolves any conflicts by preferring the incoming file over the older one.

Let me or @dkliban know if this presents any problems for Katello and we can try to find a solution for it.

Actions #7

Updated by ggainey almost 4 years ago

  • Tags Katello added
  • Tags deleted (Katello-P2)

Also available in: Atom PDF