Skip to content

fix: keep replicate TLS temp files alive - #8013

Open
pablomh wants to merge 1 commit into
pulp:mainfrom
pablomh:fix-replica-tempfile-lifecycle
Open

fix: keep replicate TLS temp files alive#8013
pablomh wants to merge 1 commit into
pulp:mainfrom
pablomh:fix-replica-tempfile-lifecycle

Conversation

@pablomh

@pablomh pablomh commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep HTTPS replication TLS temp files alive for the full replicate_distributions() task instead of storing only their paths
  • pass the CA temp file path directly as verify_ssl and stop using PULP_CA_BUNDLE as a process-global side channel
  • add regression unit tests for temp-file lifecycle and verify_ssl handoff, plus a changelog entry

Test plan

  • python3 -m py_compile pulpcore/app/tasks/replica.py pulpcore/tests/unit/test_replica.py
  • Verified no linter errors on changed files
  • Live smoke on Capsules with a no-match q_select, confirming replicate_distributions and finalize_replication complete
  • Full automated test suite not run locally (oci-env requires Docker here)

Made with Cursor

Replication over HTTPS wrote the CA, client cert, and client key to NamedTemporaryFiles but only kept their paths, so CPython deleted earlier files before pulp-glue could load the upstream API with TLS verification. Keep those files alive for the duration of replicate(), pass the CA bundle path directly as verify_ssl, add regression coverage for the TLS handoff, and clean up the temp files on exit.

Assisted-By: Cursor
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant