Commit d0e0a1b
authored
fix(ci3): retry on-demand fleet for up to 5m (metal bench capacity) (#24440)
## Problem
The dedicated benchmark box pins `m6a.metal` (sole-tenant, to avoid
co-tenant memory-bandwidth variance). Metal capacity is thin, and
`create-fleet` can return `InsufficientInstanceCapacity` even on-demand.
The on-demand fallback in `aws_request_instance_type` tried **once** and
gave up, failing the bench run.
## Fix
Wrap the on-demand fallback in a time-budgeted retry loop, mirroring the
existing spot loop:
- `CI_ONDEMAND_TIMEOUT` (default **300s** = 5 min), `CI_ONDEMAND_POLL`
(default 20s).
- Retries the whole on-demand `create-fleet` until an instance is
acquired or the budget expires; logs the capacity error code per
attempt.
- Only reached when spot couldn't be had (unchanged), so normal
spot-first behavior is untouched.
## Verification
- Trigger a bench run (`ci.sh bench`) when metal capacity is tight;
confirm it now retries the on-demand request (logging
`InsufficientInstanceCapacity; retrying in 20s...`) rather than failing
immediately, and succeeds once capacity frees within 5 min.1 file changed
Lines changed: 27 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
154 | 156 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
165 | 181 | | |
166 | 182 | | |
167 | 183 | | |
| |||
0 commit comments