Issue #7228
closedOptimized sync with mirror set to true unassociates all content units and creates an empty repository version
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
Updated by ttereshc over 4 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:
- have custom implementation of
DeclarativeVersion.create
in the plugin - have plugin input in the pulpcore when deciding whether to add the content unassociation step or not
- 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.
- anything else?
Updated by bmbouter over 4 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.
Updated by ttereshc over 4 years ago
- Priority changed from Normal to High
- Triaged changed from No to Yes
- Sprint set to Sprint 78
Updated by ttereshc over 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ttereshc
Updated by pulpbot over 4 years ago
- Status changed from ASSIGNED to POST
Added by ttereshc over 4 years ago
Updated by ttereshc over 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset 057af882f23deef6170ea683bfb15261460d9328.
Added by ttereshc over 4 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)
Updated by pulpbot over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Handle mirror=True and optimize=True correctly.
Sub_repo sync is now also optimized when possible.
closes #7228 https://pulp.plan.io/issues/7228