Project

General

Profile

Bug #13807

Pulp duplicate key error on upgrade

Added by Eric Helms over 5 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Upgrades
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

The following error occurred after trying to upgrade, by first running the katello content bats test against a 2.4 installation:

Feb 18 13:35:01 centos7-2-4 pulp: py.warnings:WARNING: (11302-47008)
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:INFO: Migration to pulp_rpm.plugins.migrations version 23 complete.
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:INFO: Applying pulp_rpm.plugins.migrations version 24
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:INFO: Migration to pulp_rpm.plugins.migrations version 24 complete.
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: E11000 duplicate key error index: pulp_database.repos.$repo_id_-1  dup key: { : null }
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008) Traceback (most recent call last):
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 183, in main
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     return _auto_manage_db(options)
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 246, in _auto_manage_db
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     migrate_database(options)
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 142, in migrate_database
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     ensure_database_indexes()
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 157, in ensure_database_indexes
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     model.Repository.ensure_indexes()
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib/python2.7/site-packages/mongoengine/document.py", line 738, in ensure_indexes
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     collection = cls._get_collection()
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib/python2.7/site-packages/mongoengine/document.py", line 210, in _get_collection
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     cls.ensure_indexes()
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib/python2.7/site-packages/mongoengine/document.py", line 766, in ensure_indexes
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     collection.create_index(fields, background=background, **opts)
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib64/python2.7/site-packages/pymongo/collection.py", line 1380, in create_index
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     self.__create_index(keys, kwargs)
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib64/python2.7/site-packages/pymongo/collection.py", line 1290, in __create_index
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     sock_info, cmd, read_preference=ReadPreference.PRIMARY)
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib64/python2.7/site-packages/pymongo/collection.py", line 205, in _command
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     read_concern=read_concern)
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib64/python2.7/site-packages/pymongo/pool.py", line 211, in command
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     read_concern)
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib64/python2.7/site-packages/pymongo/network.py", line 100, in command
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     helpers._check_command_response(response_doc, msg, allowable_errors)
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)   File "/usr/lib64/python2.7/site-packages/pymongo/helpers.py", line 189, in _check_command_response
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)     raise DuplicateKeyError(errmsg, code, response)
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008) DuplicateKeyError: E11000 duplicate key error index: pulp_database.repos.$repo_id_-1  dup key: { : null }
Feb 18 13:35:01 centos7-2-4 pulp: pulp.server.db.manage:CRITICAL: (11302-47008)

History

#1 Updated by Justin Sherrill over 5 years ago

  • Status changed from New to Closed

This is purely a pulp issue: https://pulp.plan.io/issues/1707

Also available in: Atom PDF