Replace scheduler's inline per-candidate loop and separate single-host branch with one unified pipeline (mirrors worker's task 2.1 fix): build exactly one validated candidate list, whether from --peers or synthesized as a single candidate from the legacy default, then connect through the shared xce_cluster_config_to_client_config() helper exactly once. Adds sched_on_reconnect(), a rejoin callback that only sets a flag and returns immediately (no I/O, no xcecli_* calls) to avoid the self-deadlock worker hit in task 2.3 — registered via xcecli_set_reconnect_handler() after xcecli_start(), since xcecli_start() resets any handler registered earlier back to NULL. Adds test_scheduler_connect.c: behavioral tests confirm no-peers and single-candidate configs produce identical connect log sequences and that unreachable candidates fail fast without retry loops; structural tests source-scan scheduler.c to confirm a single xcecli_ctx_init() call site, a single xcecli_join() call site, and a rejoin callback body free of I/O and xcecli_* calls. Live-validated against a 3-node HA controller cluster: a scheduler configured with the standby listed first in --peers fails over via xcecli's built-in retry-next mechanism to the primary and joins successfully. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FYSEeLmzjtD4RLDuUDhLoK |
||
|---|---|---|
| .. | ||
| autoscaler | ||
| configs | ||
| controller | ||
| docs | ||
| frontend | ||
| include | ||
| lib | ||
| nixSupport | ||
| scheduler | ||
| schema | ||
| tools | ||
| worker | ||
| xceadmin | ||
| flake.lock | ||
| flake.nix | ||
| meson.build | ||
| meson.options | ||