Project

Profile

Help

Issue #2252

Repo sync with "epoch" related error message.

Added by akegata@gmail.com about 4 years ago. Updated over 1 year ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.9.2
Platform Release:
OS:
RHEL 6
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

While syncing a repo I end up with a "Task Failed" status with a an error in the purge_duplicates step saying ""error": "'epoch'"".

Here is the log from /var/log/messages:

Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752) 'epoch'
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752) Traceback (most recent call last):
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 249, in run
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     purge.remove_repo_duplicate_nevra(self.conduit.repo_id)
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     self.gen.throw(type, value, traceback)
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 185, in update_state
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     yield skip
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 249, in run
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     purge.remove_repo_duplicate_nevra(self.conduit.repo_id)
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 304, in remove_repo_duplicate_nevra
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     for unit_ids in _duplicate_key_id_generator(unit_type):
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 405, in _duplicate_key_id_generator_aggregation
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     current_nevra = tuple(pkg[field] for field in fields)
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 405, in <genexpr>
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     current_nevra = tuple(pkg[field] for field in fields)
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752) KeyError: 'epoch'
Sep 13 16:44:20 server pulp: pulp.server.event.http:INFO: (8641-46752) {"call_report": {"exception": null, "task_type": "pulp.server.managers.repo.sync.sync", "_href": "/pulp/api/v2/tasks/22e25f0e-760b-464b-84e0-2b16be559124/", "task_id": "22e25f0e-760b-464b-84e0-2b16be559124", "tags": ["pulp:repository:OL6_Latest_x86_64", "pulp:action:sync"], "finish_time": null, "_ns": "task_status", "start_time": "2016-09-13T13:50:54Z", "traceback": null, "spawned_tasks": [], "progress_report": {"yum_importer": {"content": {"items_total": 0, "state": "FINISHED", "error_details": [], "details": {"rpm_total": 0, "rpm_done": 0, "drpm_total": 0, "drpm_done": 0}, "size_total": 0, "size_left": 0, "items_left": 0}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FAILED", "error": "'epoch'"}, "distribution": {"items_total": 0, "state": "FINISHED", "error_details": [], "items_left": 0}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}}, "state": "running", "worker_name": "reserved_resource_worker-5@server.domain", "result": null, "error": null, "_id": {"$oid": "57d8043eb71f5981b8328c40"}, "id": "57d8043eb71f5981b8328c40"}, "event_type": "repo.sync.finish", "payload": {"importer_id": "yum_importer", "exception": null, "repo_id": "OL6_Latest_x86_64", "traceback": null, "started": "2016-09-13T13:50:54Z", "_ns": "repo_sync_results", "completed": "2016-09-13T14:44:19Z", "importer_type_id": "yum_importer", "error_message": null, "summary": {"content": {"state": "FINISHED"}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FAILED"}, "distribution": {"state": "FINISHED"}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}, "added_count": 0, "result": "failed", "updated_count": 39234, "details": {"content": {"size_total": 0, "items_left": 0, "items_total": 0, "state": "FINISHED", "size_left": 0, "details": {"rpm_total": 0, "rpm_done": 0, "drpm_total": 0, "drpm_done": 0}, "error_details": []}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FAILED", "error": "'epoch'"}, "
Sep 13 16:44:20 server pulp: pulp.server.event.http:INFO: (8641-46752) distribution": {"items_total": 0, "state": "FINISHED", "error_details": [], "items_left": 0}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}, "id": "57d810c335705821c140843f", "removed_count": 0}}
:
Sep 13 16:27:05 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/6/EPEL/x86_64_2012_10_12/repodata/repomd.xml
Sep 13 16:27:05 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/6/EPEL/x86_64_2012_10_12/repodata/repomd.xml
Sep 13 16:27:05 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/6/EPEL/x86_64_2012_10_12/repodata/repomd.xml
Sep 13 16:27:06 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/6/EPEL/x86_64_2012_10_12/repodata/repomd.xml
Sep 13 16:28:40 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/6/EPEL/x86_64_2012_10_12/repodata/repomd.xml
Sep 13 16:28:40 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/6/EPEL/x86_64_2012_10_12/repodata/repomd.xml
Sep 13 16:28:41 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/6/EPEL/x86_64_2012_10_12/repodata/repomd.xml
Sep 13 16:28:41 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/6/EPEL/x86_64_2012_10_12/repodata/repomd.xml
Sep 13 16:30:37 server pulp: pulp_rpm.plugins.importers.yum.sync:INFO: Downloading 0 RPMs.
Sep 13 16:37:05 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/6/EPEL/x86_64_2012_10_12/repodata/repomd.xml
Sep 13 16:37:05 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/6/EPEL/x86_64_2012_10_12/repodata/repomd.xml
Sep 13 16:39:04 server pulp: pulp_rpm.plugins.importers.yum.repomd.alternate:INFO: The content container reported: {'downloads': {}, 'total_sources': 0} for base URL: http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/
Sep 13 16:39:04 server pulp: pulp_rpm.plugins.importers.yum.sync:INFO: Downloading additional units.
Sep 13 16:39:04 server pulp: requests.packages.urllib3.connectionpool:INFO: Starting new HTTP connection (1): public-yum.oracle.com
Sep 13 16:39:05 server pulp: requests.packages.urllib3.connectionpool:INFO: Starting new HTTP connection (1): public-yum.oracle.com
Sep 13 16:40:03 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/7/Supplementary/x86_64/.treeinfo
Sep 13 16:40:04 server pulp: django.request:WARNING: Not Found: /var/www/pub/yum/http/repos/RHEL/7/Supplementary/x86_64/treeinfo
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752) 'epoch'
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752) Traceback (most recent call last):
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 249, in run
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     purge.remove_repo_duplicate_nevra(self.conduit.repo_id)
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     self.gen.throw(type, value, traceback)
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 185, in update_state
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     yield skip
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 249, in run
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     purge.remove_repo_duplicate_nevra(self.conduit.repo_id)
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 304, in remove_repo_duplicate_nevra
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     for unit_ids in _duplicate_key_id_generator(unit_type):
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 405, in _duplicate_key_id_generator_aggregation
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     current_nevra = tuple(pkg[field] for field in fields)
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 405, in <genexpr>
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752)     current_nevra = tuple(pkg[field] for field in fields)
Sep 13 16:44:19 server pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: (8641-46752) KeyError: 'epoch'
Sep 13 16:44:20 server pulp: pulp.server.event.http:INFO: (8641-46752) {"call_report": {"exception": null, "task_type": "pulp.server.managers.repo.sync.sync", "_href": "/pulp/api/v2/tasks/22e25f0e-760b-464b-84e0-2b16be559124/", "task_id": "22e25f0e-760b-464b-84e0-2b16be559124", "tags": ["pulp:repository:OL6_Latest_x86_64", "pulp:action:sync"], "finish_time": null, "_ns": "task_status", "start_time": "2016-09-13T13:50:54Z", "traceback": null, "spawned_tasks": [], "progress_report": {"yum_importer": {"content": {"items_total": 0, "state": "FINISHED", "error_details": [], "details": {"rpm_total": 0, "rpm_done": 0, "drpm_total": 0, "drpm_done": 0}, "size_total": 0, "size_left": 0, "items_left": 0}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FAILED", "error": "'epoch'"}, "distribution": {"items_total": 0, "state": "FINISHED", "error_details": [], "items_left": 0}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}}, "state": "running", "worker_name": "reserved_resource_worker-5@server.domain", "result": null, "error": null, "_id": {"$oid": "57d8043eb71f5981b8328c40"}, "id": "57d8043eb71f5981b8328c40"}, "event_type": "repo.sync.finish", "payload": {"importer_id": "yum_importer", "exception": null, "repo_id": "OL6_Latest_x86_64", "traceback": null, "started": "2016-09-13T13:50:54Z", "_ns": "repo_sync_results", "completed": "2016-09-13T14:44:19Z", "importer_type_id": "yum_importer", "error_message": null, "summary": {"content": {"state": "FINISHED"}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FAILED"}, "distribution": {"state": "FINISHED"}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}, "added_count": 0, "result": "failed", "updated_count": 39234, "details": {"content": {"size_total": 0, "items_left": 0, "items_total": 0, "state": "FINISHED", "size_left": 0, "details": {"rpm_total": 0, "rpm_done": 0, "drpm_total": 0, "drpm_done": 0}, "error_details": []}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FAILED", "error": "'epoch'"}, "
Sep 13 16:44:20 server pulp: pulp.server.event.http:INFO: (8641-46752) distribution": {"items_total": 0, "state": "FINISHED", "error_details": [], "items_left": 0}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}, "id": "57d810c335705821c140843f", "removed_count": 0}}
Sep 13 16:44:20 server pulp: requests.packages.urllib3.connectionpool:INFO: Starting new HTTP connection (1): foreman.domain
:

History

#1 Updated by bmbouter about 4 years ago

  • Description updated (diff)

#2 Updated by bmbouter about 4 years ago

If I'm reading this right, it tells me that your database has some documents in rpm, srpm, or drpm collections which do not have an 'epoch' entry.

In looking at the expected model definition[0] and it shows the units_rpm, units_srpm, and units_drpm collections each require an epoch. It would appear that your database lacks this field on one or more documents in one or more of these collections. One thing you could do would be to find and unnassociate these packages from all repos known to pulp and then orphan cleanup so pulp purges them from the db. I recommend this path forward.

Another option would be to find each offending documenting in mongodb directly and add an epoch of 0.

[0]: https://github.com/pulp/pulp_rpm/blob/master/plugins/pulp_rpm/plugins/db/models.py

#3 Updated by akegata@gmail.com almost 4 years ago

I ended up taking the course of action we discussed on IRC: I removed the repo having issues as well as another repo I knew shared at least some of the packages. After this I did a cleanup of all orphans and then recreated the repo again.
This worked, I can now sync the (newly created) repo.

#4 Updated by pcreech almost 4 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#5 Updated by pcreech almost 4 years ago

  • Triaged changed from No to Yes

#6 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF