| Summary: | 'pulp-admin repo sync' fails on resyncing repositories which have removed content, and preserve_metadata set to true. | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Ernest W. Durbin III <ewdurbin> |
| Component: | user-experience | Assignee: | Pradeep Kilambi <pkilambi> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | pkilambi |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-02-24 20:13:12 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
fixed! commit 69e2d0d6e3f4135e1af59db8a63992a21a5a9fb2 Fixed in build 0.247. verified [root@preethi ~]# pulp-admin repo sync --id=rhel6_x86_64_preserve -F Sync for repository rhel6_x86_64_preserve started Sync: Finished 4/6710 new items downloaded 6706/6710 existing items processed Item Details: RPMs: 6710/6710 [root@preethi ~]# pulp-admin repo info --id=rhel6_x86_64_preserve Id rhel6_x86_64_preserve Name rhel6_x86_64_preserve Repo URL https://preethi.usersys.redhat.com/pulp/repos/content/dist/rhel/rhui/server-6/updates/6Server/x86_64/os/ Feed URL https://cdn.redhat.com/content/dist/rhel/rhui/server-6/updates/6Server/x86_64/os/ Feed Type remote Content Type yum Feed Certs CA:Yes Cert:Yes Consumer Certs CA:No Cert:No Architecture noarch Sync Schedule None Packages 6710 Files 0 Distributions None Publish True Clones [] Groups None Filters [] Notes {} Preserve Metadata True Checksum Type sha256 Pulp v1.0 is released Closed Current Release. |
Description of problem: running pulp-admin repo sync against a repository which has removed/replaced content raises an exception and stops cold when preserve_metadata is set to 'True'. Version-Release number of selected component (if applicable): Community Release 17 Community Release 18 How reproducible: Perfectly Steps to Reproduce: 1. Sync a repository which removes/replaces content with the perserve_metadata flag set to true 2. Wait until repository has replaced or removed content 3. Try to sync the repository once more. Actual results: At the command line: PulpException: Metadata for repo [repository-id] is set to be preserved. Cannot remove new content In /var/log/pulp/pulp.log 2011-11-08 14:21:25,208 13173:140249355228928: pulp.server.api.synchronizers:INFO: synchronizers:275 Skipping errata imports from sync process 2011-11-08 14:21:25,212 13173:140249355228928: pulp.server.api.repo_sync:INFO: repo_sync:263 Sync returned 81 packages, 0 errata in 20.8483200073 seconds 2011-11-08 14:21:30,030 13173:140249355228928: pulp.server.api.repo_sync:INFO: repo_sync:274 81 old packages to process, 81 new packages to process 2011-11-08 14:21:30,034 13173:140249355228928: pulp.server.api.repo:INFO: repo:956 Metadata for repo [redhat-cdh-3] is set to be preserved. Cannot remove new content 2011-11-08 14:21:30,039 13173:140249355228928: pulp.server.tasking.task:ERROR: task:455 Task failed: Task cd19d18a-0a3e-11e1-a635-00137254a118: _sync(redhat-cdh-3, synchronizer=<pulp.server.api.synchronizers.YumSynchronizer object at 0x7f8e95f01e10>, skip_dict={}, max_speed=None, threads=None, progress_callback=<bound method RepoSyncTask.progress_callback of <pulp.server.api.repo_sync_task.RepoSyncTask object at 0x7f8e95f01590>>) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/tasking/task.py", line 404, in run result = self.callable(*self.args, **self.kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/api/repo_sync.py", line 277, in _sync repo_api.remove_packages(repo["id"], old_pkgs) File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 957, in remove_packages raise PulpException(msg) PulpException: Metadata for repo [redhat-cdh-3] is set to be preserved. Cannot remove new content Expected results: Yo! found you new rpms! Toss them dirty old ones out. Additional info: