Story #1982
closedAs a user, I can force a full sync
100%
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 issues
Updated by mhrivnak over 8 years ago
- Related to Issue #1971: '--retain-old-count' option not retroactive added
Updated by mhrivnak over 8 years ago
- Related to Story #1983: As a user, an importer config change or content removal will cause the next sync to be full added
Updated by ttereshc over 8 years ago
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.
Updated by ipanova@redhat.com over 8 years ago
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.
Updated by ipanova@redhat.com over 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to fdobrovo
Updated by fdobrovo over 8 years ago
- Status changed from ASSIGNED to POST
Added by fdobrovo over 8 years ago
Added by fdobrovo over 8 years ago
Revision 51434764 | View on GitHub
1982 - Added --force-full option to importer pulp-admin
closes #1982 https://pulp.plan.io/issues/1982
pulp.client.commands.repo.sync_publish.SyncPublishCommand
- Moved generate_override_config from RunPublishRepositoryCommand
- SyncPublishCommand now accepts override_config_options
- SyncPublishCommand now have new method generate_override_config
pulp.client.commands.repo.sync_publish.RunSyncRepositoryCommand
- Now accepts --force-full flag
Added by fdobrovo over 8 years ago
Revision df42dea8 | View on GitHub
1982 - --force-full option for yum importer
Updated by fdobrovo over 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp:pulp|51434764e083aa7edd71a5541ad5c5434f8efa24.
Updated by Ichimonji10 over 8 years ago
- 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
Updated by semyers about 8 years ago
- Status changed from 6 to CLOSED - CURRENTRELEASE
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