Story #1982
closed
As a user, I can force a full sync
Status:
CLOSED - CURRENTRELEASE
Description
A sync optimization exists that checks the remote metadata's revision number, and if it hasn't increased since the last successful sync, skips most of the current sync. It tries to accommodate several edge cases where the full sync should happen, but it's difficult and cumbersome to try catching them all. Here's what the decision looks like today:
if 0 < metadata_files.revision <= previous_revision \
and not self.config.override_config.get(importer_constants.KEY_FEED) \
and previous_skip_set - current_skip_set == set() \
and (self.download_deferred or not missing_units) \
and not sync_due_to_unit_removal:
Users have encountered many cases where they want to force a full re-sync. Rather than try to predict and handle each condition individually as above, pulp should also offer an option to force it just because the user said so. :)
Similar work was done recently for the distributor: https://pulp.plan.io/issues/1158
- Related to Issue #1971: '--retain-old-count' option not retroactive added
- Related to Story #1983: As a user, an importer config change or content removal will cause the next sync to be full added
What do you think about adding the force_full option to the platform?
No plugin specific decision is required in this case (just do re-sync no matter what) and potentially it can be useful not only for RPM plugin.
I agree with Tanya.
In case we decide to that in platform a note should be written in platform that there is new optional importer config parameter usable by on all importer plugin types.
- Groomed changed from No to Yes
- Sprint/Milestone set to 22
- Sprint/Milestone changed from 22 to 23
- Status changed from NEW to ASSIGNED
- Assignee set to fdobrovo
- Status changed from ASSIGNED to POST
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
- Platform Release set to 2.10.0
- Status changed from MODIFIED to 5
- Status changed from 5 to 6
Verified against a Pulp 2.10.0 system provisioned this morning.
(pulp-smash2) [ichimonji10@beech:pulp-smash]$ python -m unittest2 pulp_smash.tests.rpm.cli.test_sync
...
----------------------------------------------------------------------
Ran 3 tests in 135.682s
OK
(pulp-smash2) [ichimonji10@beech:pulp-smash]$ git grep 1982
pulp_smash/tests/rpm/cli/test_sync.py: This test case targets `Pulp #1982`_ and `Pulp Smash #353`_. The test
pulp_smash/tests/rpm/cli/test_sync.py: .. _Pulp #1982: https://pulp.plan.io/issues/1982
pulp_smash/tests/rpm/cli/test_sync.py: if selectors.bug_is_untestable(1982, cfg.version):
pulp_smash/tests/rpm/cli/test_sync.py: self.skipTest('https://pulp.plan.io/issues/1982')
(pulp-smash2) [ichimonji10@beech:pulp-smash]$ ssh $hostname rpm -qa | sort | grep -i pulp
Warning: Permanently added 'ibm-x3550m3-09.lab.eng.brq.redhat.com,10.34.36.133' (ECDSA) to the list of known hosts.
pulp-admin-client-2.10.0-0.4.beta.fc24.noarch
pulp-docker-admin-extensions-2.1.0-0.2.beta.fc24.noarch
pulp-docker-plugins-2.1.0-0.2.beta.fc24.noarch
pulp-ostree-admin-extensions-1.1.3-1.fc24.noarch
pulp-ostree-plugins-1.1.3-1.fc24.noarch
pulp-puppet-admin-extensions-2.10.0-0.1.beta.fc24.noarch
pulp-puppet-plugins-2.10.0-0.1.beta.fc24.noarch
pulp-python-admin-extensions-1.1.3-1.fc24.noarch
pulp-python-plugins-1.1.3-1.fc24.noarch
pulp-rpm-admin-extensions-2.10.0-0.4.beta.fc24.noarch
pulp-rpm-plugins-2.10.0-0.4.beta.fc24.noarch
pulp-selinux-2.10.0-0.4.beta.fc24.noarch
pulp-server-2.10.0-0.4.beta.fc24.noarch
python-kombu-3.0.33-6.pulp.fc24.noarch
python-pulp-bindings-2.10.0-0.4.beta.fc24.noarch
python-pulp-client-lib-2.10.0-0.4.beta.fc24.noarch
python-pulp-common-2.10.0-0.4.beta.fc24.noarch
python-pulp-docker-common-2.1.0-0.2.beta.fc24.noarch
python-pulp-oid_validation-2.10.0-0.4.beta.fc24.noarch
python-pulp-ostree-common-1.1.3-1.fc24.noarch
python-pulp-puppet-common-2.10.0-0.1.beta.fc24.noarch
python-pulp-python-common-1.1.3-1.fc24.noarch
python-pulp-repoauth-2.10.0-0.4.beta.fc24.noarch
python-pulp-rpm-common-2.10.0-0.4.beta.fc24.noarch
python-pulp-streamer-2.10.0-0.4.beta.fc24.noarch
Also see: https://github.com/PulpQE/pulp-smash/pull/380
- Status changed from 6 to CLOSED - CURRENTRELEASE
- Sprint/Milestone deleted (
23)
Also available in: Atom
PDF
1982 - Added --force-full option to importer pulp-admin
closes #1982 https://pulp.plan.io/issues/1982
pulp.client.commands.repo.sync_publish.SyncPublishCommand
pulp.client.commands.repo.sync_publish.RunSyncRepositoryCommand