stack-orchestrator/stack_orchestrator/deploy
A. F. Dudley 7f12270939 bar-6cb: fix PV claimRef, namespace race, and PVC creation resilience
Three related fixes in the k8s deployer restart/up flow:

1. Clear stale claimRefs on Released PVs (_clear_released_pv_claim_refs):
   After namespace deletion, PVs survive in Released state with claimRefs
   pointing to deleted PVC UIDs. New PVCs can't bind until the stale
   claimRef is removed. Now clears them before PVC creation.

2. Wait for namespace termination (_wait_for_namespace_deletion):
   _ensure_namespace() now detects a terminating namespace and polls
   until deletion completes (up to 120s) before creating the new one.
   Replaces the racy 5s sleep in deployment restart.

3. Resilient PVC creation: wrap each PVC creation in error handling so
   one failure doesn't prevent subsequent PVCs from being attempted.
   All errors are collected and reported together.

Closes: bar-6cb, bar-31a, bar-fec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 08:33:45 +00:00
..
compose refactor: rename deployment update to deployment update-envs 2026-03-08 02:33:20 +00:00
k8s bar-6cb: fix PV claimRef, namespace race, and PVC creation resilience 2026-03-10 08:33:45 +00:00
webapp refactor: rename deployment update to deployment update-envs 2026-03-08 02:33:20 +00:00
__init__.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
deploy_types.py Fix pyright type errors across codebase 2026-01-22 01:10:36 -05:00
deploy_util.py Fix pyright type errors across codebase 2026-01-22 01:10:36 -05:00
deploy.py feat: add deployment prepare command (so-076.1) 2026-03-08 06:56:34 +00:00
deployer_factory.py Apply pre-commit linting fixes 2026-01-21 20:58:31 -05:00
deployer.py feat: add deployment prepare command (so-076.1) 2026-03-08 06:56:34 +00:00
deployment_context.py Merge origin/main into multi-port-service 2026-01-24 16:48:11 -05:00
deployment_create.py Allow relative volume paths for k8s-kind deployments 2026-02-03 17:17:44 -05:00
deployment.py bar-6cb: fix PV claimRef, namespace race, and PVC creation resilience 2026-03-10 08:33:45 +00:00
dns_probe.py feat(deploy): add deployment restart command 2026-02-03 17:15:19 -05:00
images.py Apply pre-commit linting fixes 2026-01-21 20:58:31 -05:00
spec.py feat(k8s): per-service resource layering in deployer 2026-03-07 10:26:10 +00:00
stack_state.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
stack.py Apply pre-commit linting fixes 2026-01-21 20:58:31 -05:00