Project

General

Profile

Actions

Bug #39211

open

Concurrent capsule sync fails with Pulp3 distribution uniqueness error

Added by Pablo Méndez Hernández 5 months ago. Updated 25 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Foreman Proxy Content
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

When SyncCapsule runs multiple repos concurrently, two repos sharing the same Pulp3 distribution (same base_path/name) can race to create it. The losing task fails with:

Katello::Errors::Pulp3Error: {'name': [ErrorDetail(string='This field must be unique.', code='unique')], 'base_path': [ErrorDetail(string='This field must be unique.', code='unique')]}

The error surfaces only during async Pulp task polling (action: Actions::Pulp3::CapsuleContent::RefreshDistribution), so a service-level rescue cannot catch it.

Fix: move distribution refresh out of per-repo GenerateMetadata into a single RefreshAllDistributions action planned by SyncCapsule after all sync batches complete, and override rescue_external_task in RefreshDistribution to recover by retrying as a partial_update when a concurrent task wins the race.

Actions #1

Updated by The Foreman Bot 5 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/11700 added
Actions #2

Updated by Ian Ballou 5 months ago

  • Red Hat JIRA set to SAT-31994
Actions #3

Updated by Ian Ballou 5 months ago

  • Category set to Foreman Proxy Content
  • Assignee set to Pablo Méndez Hernández
  • Target version set to Katello 4.21.0
  • Triaged changed from No to Yes
Actions #4

Updated by Ian Ballou 2 months ago

  • Target version changed from Katello 4.21.0 to Katello 5.0.0
Actions #5

Updated by The Foreman Bot 25 days ago

  • Pull request deleted (https://github.com/Katello/katello/pull/11700)
Actions #6

Updated by Ian Ballou 25 days ago

  • Status changed from Ready For Testing to New
  • Assignee deleted (Pablo Méndez Hernández)
Actions

Also available in: Atom PDF