Project

Profile

Help

Issue #7228

Optimized sync with mirror set to true unassociates all content units and creates an empty repository version

Added by sajha 15 days ago. Updated about 7 hours ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 78

Description

Syncing a repository with Optimized sync set to true and mirror set to true unassociates all content units and creates an empty repository version. The progress report looks like the attached image. The first sync works fine. The subsequent sync removes all content units.

Optimized Sync.png (26.5 KB) Optimized Sync.png sajha, 07/28/2020 05:41 PM
250

Associated revisions

Revision 057af882 View on GitHub
Added by ttereshc 6 days ago

Handle mirror=True and optimize=True correctly.

Sub_repo sync is now also optimized when possible.

closes #7228 https://pulp.plan.io/issues/7228

Revision ce901fd2 View on GitHub
Added by ttereshc 5 days ago

Handle mirror=True and optimize=True correctly.

Sub_repo sync is now also optimized when possible.

closes #7228 https://pulp.plan.io/issues/7228

(cherry picked from commit 057af882f23deef6170ea683bfb15261460d9328)

History

#1 Updated by ttereshc 15 days ago

It seems to happen because the mirror implementation from the pulpcore is used which is unaware of the RPM specific optimize option which does not add any content to a new incomplete repo version.

Possible solutions:

  1. have custom implementation of DeclarativeVersion.create in the plugin
  2. have plugin input in the pulpcore when deciding whether to add the content unassociation step or not
  3. add existing content to the incomplete repo version, so it would be clear that content is there and there is just nothing to remove because it's the same.
  4. anything else?

#2 Updated by bmbouter 15 days ago

I looked over the optimize_sync code and I recommend moving it out of RpmFirstStage and into the task code called before DeclarativeVersion.create() is even called. This will cause the pipeline never to start. From an efficiency perspective since no DeclarativeContent is emitted down the pipeline there is no concurrency opportunity so handling that synchronously earlier in the code should be the same from an efficiency perspective.

#3 Updated by ttereshc 9 days ago

  • Priority changed from Normal to High
  • Triaged changed from No to Yes
  • Sprint set to Sprint 78

#4 Updated by ttereshc 7 days ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc

#5 Updated by pulpbot 7 days ago

  • Status changed from ASSIGNED to POST

#6 Updated by ttereshc 5 days ago

  • Status changed from POST to MODIFIED

#7 Updated by ttereshc 1 day ago

  • Sprint/Milestone set to 3.5.1

#8 Updated by pulpbot about 7 hours ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF