Project

Profile

Help

Issue #7228

closed

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

Added by sajha over 3 years ago. Updated over 3 years 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
Quarter:

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.


Files

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

Updated by ttereshc over 3 years 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?
Actions #2

Updated by bmbouter over 3 years 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.

Actions #3

Updated by ttereshc over 3 years ago

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

Updated by ttereshc over 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc
Actions #5

Updated by pulpbot over 3 years ago

  • Status changed from ASSIGNED to POST

Added by ttereshc over 3 years ago

Revision 057af882 | View on GitHub

Handle mirror=True and optimize=True correctly.

Sub_repo sync is now also optimized when possible.

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

Actions #6

Updated by ttereshc over 3 years ago

  • Status changed from POST to MODIFIED

Added by ttereshc over 3 years ago

Revision ce901fd2 | View on GitHub

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)

Actions #7

Updated by ttereshc over 3 years ago

  • Sprint/Milestone set to 3.5.1
Actions #8

Updated by pulpbot over 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF