Skip to content

fix(pulp): retry transient Pulp API errors - #20

Merged
Tpo76 merged 1 commit into
mainfrom
MON-217872-retry-transient-pulp-api-errors
Dec 4, 2026
Merged

Tpo76 merged 1 commit into
mainfrom
MON-217872-retry-transient-pulp-api-errors

Conversation

@Tpo76

@Tpo76 Tpo76 commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

MON-217872

Transient Pulp API errors (502 at the gateway, upload tasks failed or stuck on a worker) fail deliveries that pass on rerun.

  • setup-cli: retry pulp status 5 times (10/20/40/60 s), each failure logged, ::error:: only after the last. A bash loop rather than pulp status --retries: the latter has a fixed delay and does not log the error of each attempt.
  • package-delivery (rpm, deb): when an upload task ends failed/canceled or times out and the sha256 lookup finds nothing, upload the file again (2 extra attempts, resolve_with_reupload in lib/api.sh). The sha256 lookup curl gets --retry 3 --retry-all-errors.
  • promote-to-stable (deb): --retry-all-errors on the legacy associations lookup.

Trade-off: a re-upload after a timed-out task can queue a second task behind the first one (worst case about 3 x 600 s per file, pool of 8); the sha256 lookup still picks the content up when the first task completes.

Seen recently: pulp status 502 (4 runs, incl. one on 2026-12-04), unresolved upload content (3 jobs), associations lookup (1).

Tests: new bats cases in pulp/tests/setup-cli.bats (retry then success, failure after 5 attempts) and pulp/tests/api.bats (re-upload bounded to 2), failing without the change. shellcheck clean.

Dev stack validation (centreon-plugins-sudoers, throwaway branch, actions pinned to bf64e83, dev Pulp): https://github.com/centreon/centreon-plugins/actions/runs/47327162083

  • setup-cli against an unreachable server: 5 attempts, a [WARN] with the error for each, waits 10/20/40/60 s, one ::error:: at the end.
  • el8/el9/el10 (upload, resolve, modify, publish, verification) and bookworm/trixie (legacy path, publish, verification): delivered.
  • jammy/noble: ubuntu-unstable repository not provisioned on the dev stack, fail closed as before (not related to this change).
  • Not exercised live: the re-upload path (bats only) and the deb unassociated upload path (one package per arch goes through the legacy path).

Follow-ups: MON-218303 (repository show, paginated promote listings, first-pass fetchability checks).

@Tpo76
Tpo76 marked this pull request as ready for review December 4, 2026 11:51
@Tpo76
Tpo76 requested a review from a team as a code owner December 4, 2026 11:51
@Tpo76
Tpo76 merged commit 0e2526e into main Dec 4, 2026
9 checks passed
@Tpo76
Tpo76 deleted the MON-217872-retry-transient-pulp-api-errors branch December 4, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants