Project

General

Profile

Bug #9944

E11000 duplicate key error index while removing and readding repository

Added by Jorick Astrego about 7 years ago. Updated almost 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

In Katello 2.1, I removed a repo from the product CentOS and added it again. When doing a sync I get an errror "E11000 duplicate key error index":

Action:

Actions::Pulp::Repository::Sync

Input:

{"pulp_id"=>"Netbulae-CentOS-CentOS_7_CR_x86_64",
"task_id"=>nil,
"remote_user"=>"testuser-4808f06f",
"remote_cp_user"=>"testuser",
"locale"=>"en"}

Output:

{"pulp_tasks"=>
[{"exception"=>nil,
"task_type"=>"pulp.server.tasks.repository.sync_with_auto_publish",
"_href"=>"/pulp/api/v2/tasks/1569ffd1-1699-49ee-9edf-5b9fd349cf74/",
"task_id"=>"1569ffd1-1699-49ee-9edf-5b9fd349cf74",
"tags"=>
["pulp:repository:Netbulae-CentOS-CentOS_7_CR_x86_64",
"pulp:action:sync"],
"finish_time"=>"2015-03-30T10:42:18Z",
"_ns"=>"task_status",
"start_time"=>"2015-03-30T10:39:21Z",
"traceback"=>
"Traceback (most recent call last):\n File \"/usr/lib/python2.6/site-packages/celery/app/trace.py\", line 240, in trace_task\n R = retval = fun(*args, **kwargs)\n File \"/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py\", line 315, in call\n return super(Task, self).__call__(*args, **kwargs)\n File \"/usr/lib/python2.6/site-packages/celery/app/trace.py\", line 437, in protected_call\n return self.run(*args, **kwargs)\n File \"/usr/lib/python2.6/site-packages/pulp/server/tasks/repository.py\", line 210, in sync_with_auto_publish\n sync_result = managers.repo_sync_manager().sync(repo_id, sync_config_override=overrides)\n File \"/usr/lib/python2.6/site-packages/pulp/server/managers/repo/sync.py\", line 113, in sync\n raise PulpExecutionException(_('Importer indicated a failed response'))\nPulpExecutionException: Importer indicated a failed response\n",
"spawned_tasks"=>[],
"progress_report"=> {"yum_importer"=> {"content"=> {"size_total"=>0,
"items_left"=>0,
"items_total"=>0,
"state"=>"FAILED",
"size_left"=>0,
"details"=> {"rpm_total"=>0, "rpm_done"=>0, "drpm_total"=>0, "drpm_done"=>0},
"error"=>
"E11000 duplicate key error index: pulp_database.repo_content_units.$repo_id_-1_unit_type_id_-1_unit_id_-1_owner_type_-1_owner_id_-1 dup key: { : \"Netbulae-CentOS-CentOS_7_CR_x86_64\", : \"drpm\", : \"c17a3cf3-c6b2-44a4-ac36-72bf701d6648\", : \"importer\", : \"yum_importer\" }",
"error_details"=>[]},
"comps"=>{"state"=>"NOT_STARTED"},
"distribution"=> {"items_total"=>0,
"state"=>"NOT_STARTED",
"error_details"=>[],
"items_left"=>0},
"errata"=>{"state"=>"NOT_STARTED"},
"metadata"=>{"state"=>"FINISHED"}}},
"queue"=>"",
"state"=>"error",
"result"=>nil,
"error"=> {"code"=>"PLP0000",
"data"=>{},
"description"=>"Importer indicated a failed response",
"sub_errors"=>[]},
"_id"=>{"$oid"=>"551927d9a2b55aa584f88d11"},
"id"=>"551927d967e23533949c5d9c"}],
"poll_attempts"=>{"total"=>34, "failed"=>3}}

Exception:

Katello::Errors::PulpError: PLP0000: Importer indicated a failed response

Backtrace:

/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/pulp/abstract_async_task.rb:100:in `block in external_task='
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/pulp/abstract_async_task.rb:98:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/pulp/abstract_async_task.rb:98:in `external_task='
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/polling.rb:86:in `poll_external_task_with_rescue'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/polling.rb:15:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/cancellable.rb:9:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/pulp/abstract_async_task.rb:57:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:443:in `block (3 levels) in execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/middleware/remote_action.rb:27:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/middleware/remote_action.rb:57:in `block (2 levels) in as_remote_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/katello/util/thread_session.rb:84:in `pulp_config'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/middleware/remote_action.rb:43:in `as_pulp_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/middleware/remote_action.rb:56:in `block in as_remote_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/katello/util/thread_session.rb:91:in `cp_config'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/middleware/remote_action.rb:38:in `as_cp_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/middleware/remote_action.rb:55:in `as_remote_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/middleware/remote_action.rb:27:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/progress.rb:30:in `with_progress_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action/progress.rb:16:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/middleware/keep_locale.rb:23:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/middleware/keep_locale.rb:34:in `with_locale'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.1.1/app/lib/actions/middleware/keep_locale.rb:23:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:442:in `block (2 levels) in execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:441:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:441:in `block in execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `block in with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:365:in `with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:436:in `execute_run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:230:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:9:in `block (2 levels) in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract.rb:152:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract.rb:152:in `with_meta_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:8:in `block in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:22:in `open_action'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:7:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/worker.rb:20:in `block in on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:859:in `block in assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `tap'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:138:in `match_value'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:116:in `block in match'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `match'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/executors/parallel/worker.rb:17:in `on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:82:in `on_envelope'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:72:in `receive'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `block (2 levels) in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `loop'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:99:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/micro_actor.rb:13:in `block in initialize'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'

Action:

Actions::ElasticSearch::Repository::IndexContent

Input:

{"dependency"=>Step(3).output[:pulp_tasks],
"id"=>309,
"remote_user"=>"testuser-4808f06f",
"remote_cp_user"=>"testuser",
"locale"=>"en"}

Output:

{}

Action:

Actions::Katello::Repository::Sync

Input:

{"repository"=> {"id"=>309, "name"=>"CentOS 7 CR x86_64", "label"=>"CentOS_7_CR_x86_64"},
"product"=> {"id"=>2, "name"=>"CentOS", "label"=>"CentOS", "cp_id"=>"1425647565673"},
"provider"=>{"id"=>1, "name"=>"Anonymous"},
"organization"=>{"id"=>1, "name"=>"Netbulae", "label"=>"Netbulae"},
"id"=>309,
"sync_result"=>Step(3).output,
"user_id"=>4,
"locale"=>"en"}

Output:

{}

Action:

Actions::Katello::Repository::Sync

Input:

{"repository"=> {"id"=>309, "name"=>"CentOS 7 CR x86_64", "label"=>"CentOS_7_CR_x86_64"},
"product"=> {"id"=>2, "name"=>"CentOS", "label"=>"CentOS", "cp_id"=>"1425647565673"},
"provider"=>{"id"=>1, "name"=>"Anonymous"},
"organization"=>{"id"=>1, "name"=>"Netbulae", "label"=>"Netbulae"},
"id"=>309,
"sync_result"=>Step(3).output,
"user_id"=>4,
"locale"=>"en"}

Output:

{}

History

#1 Updated by Eric Helms about 7 years ago

  • Target version set to 68
  • Legacy Backlogs Release (now unused) set to 23
  • Triaged changed from No to Yes

#2 Updated by Eric Helms about 7 years ago

  • Status changed from New to Need more information

Can you note which repositories you had attached to your product so I can try to replicate it?

#3 Updated by Jorick Astrego about 7 years ago

No problem, I added the repo as "CentOS 7 Continuous Release x86_64" now and that worked

List of repos:

Name
CentOS 6 os x86_64
CentOS 6 SCL x86_64
CentOS 6 updates x86_64
CentOS 7 Continuous Release x86_64
CentOS 7 os x86_64
CentOS 7 updates x86_64

#4 Updated by Eric Helms about 7 years ago

  • Target version deleted (68)

#5 Updated by Eric Helms about 7 years ago

I attempted this myself creating a product with [1] and [2], syncing [1] and then [2], then deleting and re-adding [2]. This scenario worked for me without issues on 2.2

[1] http://mirror.centos.org/centos/7/os/x86_64/
[2] http://mirror.centos.org/centos/7/cr/x86_64/

#6 Updated by Eric Helms about 7 years ago

  • Legacy Backlogs Release (now unused) changed from 23 to 51

#7 Updated by Eric Helms about 7 years ago

  • Legacy Backlogs Release (now unused) changed from 51 to 55

#8 Updated by Eric Helms almost 7 years ago

  • Legacy Backlogs Release (now unused) changed from 55 to 61

Jorick - is this still an issue you are encountering with latest?

#9 Updated by Eric Helms almost 7 years ago

  • Status changed from Need more information to Rejected
  • Legacy Backlogs Release (now unused) deleted (61)

Given the length the issue has been open without the needed information, I am setting to rejected. Please re-open if you are still have this issue.

#10 Updated by Eric Helms almost 6 years ago

  • Legacy Backlogs Release (now unused) set to 166

Also available in: Atom PDF