Project

Profile

Help

Issue #5652

closed

Syncing RHEL 8 x86_64 appstream/os repo fails

Added by iballou about 5 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello-P2
Sprint:
Sprint 61
Quarter:

Description

Main error: "An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block."
Ping me for the full internal repo URL if you need it.

Traceback:

{"pulp_tasks"=>
  [{"pulp_href"=>"/pulp/api/v3/tasks/13c82f63-3c29-4713-9472-406a40a6da29/",
    "pulp_created"=>"2019-10-31T17:22:39.788+00:00",
    "state"=>"failed",
    "name"=>"pulp_rpm.app.tasks.synchronizing.synchronize",
    "started_at"=>"2019-10-31T17:22:39.894+00:00",
    "finished_at"=>"2019-10-31T17:34:37.772+00:00",
    "error"=>
     {"traceback"=>
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py\", line 822, in perform_job\n" +
       "    rv = job.perform()\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 605, in perform\n" +
       "    self._result = self._execute()\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 611, in _execute\n" +
       "    return self.func(*self.args, **self.kwargs)\n" +
       "  File \"/usr/local/lib/pulp/src/pulp-rpm/pulp_rpm/app/tasks/synchronizing.py\", line 123, in synchronize\n" +
       "    dv.create()\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/stages/declarative_version.py\", line 169, in create\n" +
       "    loop.run_until_complete(pipeline)\n" +
       "  File \"/usr/lib64/python3.6/asyncio/base_events.py\", line 484, in run_until_complete\n" +
       "    return future.result()\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/stages/api.py\", line 209, in create_pipeline\n" +
       "    await asyncio.gather(*futures)\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/stages/api.py\", line 43, in __call__\n" +
       "    await self.run()\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/stages/content_stages.py\", line 120, in run\n" +
       "    await self._post_save(batch)\n" +
       "  File \"/usr/local/lib/pulp/src/pulp-rpm/pulp_rpm/app/tasks/synchronizing.py\", line 628, in _post_save\n" +
       "    declarative_content.content.packages.add(pkg.content)\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/fields/related_descriptors.py\", line 938, in add\n" +
       "    through_defaults=through_defaults,\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/fields/related_descriptors.py\", line 1067, in _add_items\n" +
       "    new_ids.difference_update(vals)\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py\", line 274, in __iter__\n" +
       "    self._fetch_all()\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py\", line 1242, in _fetch_all\n" +
       "    self._result_cache = list(self._iterable_class(self))\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py\", line 182, in __iter__\n" +
       "    for row in compiler.results_iter(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size):\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/sql/compiler.py\", line 1052, in results_iter\n" +
       "    results = self.execute_sql(MULTI, chunked_fetch=chunked_fetch, chunk_size=chunk_size)\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/sql/compiler.py\", line 1100, in execute_sql\n" +
       "    cursor.execute(sql, params)\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py\", line 67, in execute\n" +
       "    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py\", line 76, in _execute_with_wrappers\n" +
       "    return executor(sql, params, many, context)\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py\", line 79, in _execute\n" +
       "    self.db.validate_no_broken_transaction()\n" +
       "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/base/base.py\", line 438, in validate_no_broken_transaction\n" +
       "    \"An error occurred in the current transaction. You can't \"\n",
      "description"=>
       "An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block."},
    "worker"=>"/pulp/api/v3/workers/c7cecfa7-7930-4784-af42-ab199715d579/",
    "spawned_tasks"=>[],
    "progress_reports"=>
     [{"message"=>"Parsed Erratum",
       "code"=>"parsing.errata",
       "state"=>"completed",
       "total"=>95,
       "done"=>95},
      {"message"=>"Downloading Metadata Files",
       "code"=>"downloading.metadata",
       "state"=>"completed",
       "done"=>5},
      {"message"=>"Associating Content",
       "code"=>"associating.content",
       "state"=>"canceled",
       "done"=>6214},
      {"message"=>"Parse Modulemd",
       "code"=>"parsing.modulemds",
       "state"=>"completed",
       "total"=>94,
       "done"=>94},
      {"message"=>"Parse Modulemd-defaults",
       "code"=>"parsing.modulemddefaults",
       "state"=>"completed",
       "total"=>40,
       "done"=>40},
      {"message"=>"Downloading Artifacts",
       "code"=>"downloading.artifacts",
       "state"=>"canceled",
       "done"=>6088},
      {"message"=>"Parsed Packages",
       "code"=>"parsing.packages",
       "state"=>"completed",
       "total"=>6285,
       "done"=>6285}],
    "created_resources"=>[],
    "reserved_resources_record"=>
     ["/pulp/api/v3/remotes/rpm/rpm/89bdef9f-459c-4664-a1f9-9a13323031da/",
      "/pulp/api/v3/repositories/aba6750c-f66c-4abc-a291-013e2d46cb72/"]}],
 "create_version"=>true,
 "poll_attempts"=>{"total"=>65, "failed"=>1}}
Actions #1

Updated by ttereshc about 5 years ago

  • Status changed from NEW to POST
  • Assignee set to ttereshc
  • Triaged changed from No to Yes
  • Sprint set to Sprint 61
  • Tags Pulp 3 RPM blocker added

Added by ttereshc about 5 years ago

Revision 80209d27 | View on GitHub

Fix sync of a repo which contains modules and advisories

Add inner transaction to properly handle exceptions inside outer transaction. Django recommended way https://docs.djangoproject.com/en/2.2/topics/db/transactions/#django.db.transaction.atomic

closes #5652 https://pulp.plan.io/issues/5652

Actions #2

Updated by ttereshc about 5 years ago

  • Status changed from POST to MODIFIED
Actions #3

Updated by ttereshc about 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions #4

Updated by bmbouter over 4 years ago

  • Tags deleted (Pulp 3 RPM blocker)

Also available in: Atom PDF