Skip to content

Support multi-subnet fleets, explicit on-demand market type, terminate on shutdown#7

Merged
Alexander Chumakin (alexandrchumakin) merged 2 commits into
mainfrom
achumakin/on-demand-multi-subnet
Jul 17, 2026
Merged

Support multi-subnet fleets, explicit on-demand market type, terminate on shutdown#7
Alexander Chumakin (alexandrchumakin) merged 2 commits into
mainfrom
achumakin/on-demand-multi-subnet

Conversation

@alexandrchumakin

@alexandrchumakin Alexander Chumakin (alexandrchumakin) commented Jul 17, 2026

Copy link
Copy Markdown
  • subnet-id (and subnetId inside availability-zones-config) accepts several comma/whitespace-separated subnets. The EC2 Fleet request gets one override per subnet × instance type so capacity/spot pools span multiple AZs; the RunInstances path tries subnets in sequence. Single-subnet callers are unchanged.
  • market-type accepts on-demand explicitly, and invalid values now fail: the old check read an undefined field and never fired, so any typo silently launched on-demand.
  • Launch template and RunInstances pin InstanceInitiatedShutdownBehavior=terminate. On-demand instances default to stop, so the shutdown -P +240 safety net in orca-workflows start-runner would leave a stopped instance with a billed EBS volume; one-time spot already terminates, this makes on-demand match.

Context: orca-workflows is switching CI runners from spot to on-demand — spot reclaims kill jobs mid-run with 'runner lost communication' (jcp-orca-agent-tests run 29570946157 lost its runner 7 minutes into the job; the serial console shows a hypervisor-initiated poweroff). The default-flip PR JetBrains/orca-workflows#177 depends on the terminate pin here.

dist/ rebuilt with ncc. eslint has one pre-existing no-use-before-define finding on main, unchanged here.

After merge: re-point the v2 tag to pick this up, then merge JetBrains/orca-workflows#177.

- subnet-id (and availability-zones-config subnetId) accepts several
  comma/whitespace-separated subnets; the EC2 Fleet gets one override per
  subnet x instance type, widening spot pools across AZs to reduce
  interruptions. RunInstances path tries subnets sequentially.
- market-type accepts 'on-demand' explicitly and rejects invalid values
  (the old check compared an undefined field and never fired).
- Pin InstanceInitiatedShutdownBehavior=terminate so OS-level shutdown
  safety nets terminate on-demand runners instead of leaving stopped
  instances with billed EBS volumes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alexander-demukh

Copy link
Copy Markdown

The diff is crazy here
Codex (@codex) review this

@alexandrchumakin
Alexander Chumakin (alexandrchumakin) merged commit fb310d6 into main Jul 17, 2026
1 check passed
@alexandrchumakin
Alexander Chumakin (alexandrchumakin) deleted the achumakin/on-demand-multi-subnet branch July 17, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants