Files
kubernetes/test/utils
Ed Bartosh 891a905031 test/localupcluster: stop all components before starting replacements
Modify() was replacing components one at a time: stop X, start X, stop Y,
start Y, ... in version-skew order (apiserver last on downgrade). This
caused a crash during downgrade: KCM-1.35 started against the still-
running apiserver-1.36, passed its /healthz, and then immediately lose
its connection when apiserver-1.36 was killed by the localupcluster.
KCM-1.35 would reconnect to the not-yet-ready apiserver-1.35, hit a
403 RBAC error during controller initialization, and exit — because that
initialization phase does not retry on RBAC errors.

Fix by splitting Modify() into two phases:

  Phase 1 — stop all components to be replaced, in reverse startup order
  (kube-proxy down to apiserver), so dependent components release their
  connections before the apiserver is stopped.

  Phase 2 — start all replacement components in standard startup order
  (apiserver first), so each component connects to a fully-ready apiserver.
2026-04-23 08:27:36 +02:00
..
2024-11-08 03:00:54 +00:00