Commit b1da2b3
authored
[iris] Propagate derived region/zone to worker configs (#4720)
🤖 _PR description written by Claude Code._
## Summary
Finishes the region/zone refactor started in #4681. That PR collapsed
region/zone to a single source of truth (`slice_template.gcp.zone`) on
the control side, but left `Autoscaler._per_group_worker_config` reading
the now-empty `group.config.worker.attributes` dict. New workers stopped
publishing a `region` attribute at registration, which silently locked
every job with a hard `region` constraint out of fresh capacity.
## Background
#4679 reported jobs sitting forever in PENDING when no scaling group
matched their routing constraints. #4681 fixed that at submit time
(`check_routing_feasibility` / `job_feasibility`) and, as a secondary
cleanup, removed the explicit `worker.attributes.region`/`zone` entries
from `_expand_tpu_pools` and `_expand_multi_zone_groups`, moving
`ScalingGroup.region`/`.zone` to derive purely from
`slice_template.gcp.zone`. The validator in `config.py` now even rejects
YAML that sets these attributes explicitly.
That refactor was correct on the control side: submit-time routing,
feasibility checks, and autoscaler demand planning all derive from the
slice template. The part that got missed is the *data* side:
`runtime.py:_per_group_worker_config` still builds each new worker's
`WorkerConfig.worker_attributes` by copying from
`group.config.worker.attributes`, which is now empty for region/zone.
The worker boots, `build_worker_metadata` merges its (empty)
`extra_attributes`, and `register_or_refresh_worker` writes zero
`region` rows into the `worker_attributes` table.
## Symptom on marin cluster
Eczech's `bolinas_scaling_sweep` child `train_lm` tasks sat pending
with:
```
Scheduler: Insufficient TPUs (need 4, available 0) - 2 worker(s)
(with constraints=['device-type', 'device-variant', 'region', 'reservation-job'])
Autoscaler: tier_blocked: 1 matching group(s) blocked by quota-pool tier monotonicity
```
There were 74 BATCH v5p-8 tasks (michaelryan's extracts) on us-east5-a
workers sitting at lower priority — all marked `preemptible_by
INTERACTIVE` — but preemption never fired. `_run_preemption_pass` only
considers victim tasks whose worker passes the preemptor's constraint
filter (`controller.py:546`), and none of the BATCH workers carried a
`region` attribute, so they never entered the candidate set.
Cluster-wide join of `workers.md_git_hash` × `worker_attributes` at the
time:
| md_git_hash | total | with `region` |
|---|---:|---:|
| `91aade6de` (pre-#4681 build) | 375 | 375 |
| `b2ece3448` (post-#4681 build) | 381 | 0 |
| `4657a5aa2` | 40 | 0 |
| `d042e4872` | 9 | 0 |
Last worker with `region=us-east5`:
`marin-tpu-v5p-preemptible-8-us-east5-a-20260413-2127-0fa6c413-worker-0`
(~21:27 UTC 2026-04-13). First without:
`…20260414-0032-9ff96f3d-worker-0`. That gap lines up with the
controller redeploy a few hours after #4681 merged.
~38 pending tasks across 7 users (eczech, larry, calvinxu, moojink,
konwoo, ahmed, rohith) all carried a hard `region` constraint and were
affected. Jobs using soft region constraints
(`mode=CONSTRAINT_MODE_PREFERRED`, e.g. michaelryan's extract launchers)
were unaffected — soft constraints only influence ranking, not the
candidate filter.1 parent 3f80b5f commit b1da2b3
File tree
2 files changed
+28
-2
lines changed- lib/iris
- src/iris/cluster/controller/autoscaler
- tests/cluster/controller
2 files changed
+28
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
382 | 390 | | |
383 | 391 | | |
384 | 392 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
1187 | 1187 | | |
1188 | 1188 | | |
1189 | 1189 | | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
1190 | 1208 | | |
1191 | 1209 | | |
1192 | 1210 | | |
| |||
0 commit comments