Skip to content

CO-67: retry Hetzner VMs without tearing down the location - #951

Open
lwille wants to merge 4 commits into
CO-38/fix-unavailable-server-typesfrom
CO-67/hetzner-retry-matrix
Open

lwille wants to merge 4 commits into
CO-38/fix-unavailable-server-typesfrom
CO-67/hetzner-retry-matrix

Conversation

@lwille

@lwille lwille commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes https://wearezeta.atlassian.net/browse/CO-67

Stacked on #950 (needs its ignore_changes = [server_type]). Will be retargeted to master once #950 is merged.

Change type

  • Fix
  • Feature
  • Documentation
  • Security / Upgrade

Basic information

  • THIS CHANGE REQUIRES A DEPLOYMENT PACKAGE RELEASE
  • THIS CHANGE REQUIRES A WIRE-DOCS RELEASE

Testing

  • I ran/applied the changes myself, in a test environment.
  • The CI job attached to this repo will test it for me.

Tracking

  • I added a new entry in an appropriate subdirectory of changelog.d
  • I mentioned this PR in Jira, OR I mentioned the Jira ticket in this PR.
  • I mentioned this PR in one of the issues attached to one of our repositories.

Motivation

CI often fails because Hetzner has no capacity for the requested VM types. On top of that, every failed attempt destroyed all VMs that had already been provisioned.

Objective

  • According to the Hetzner API, cx* types are no longer offered in any EU location, and hel1 does not offer cpx52/62. Dedicated ccx* types are offered in every location. cd.sh and cd_staging.sh now use the same matrix: cpx first, ccx as fallback. The LOCATIONS array is restored in cd.sh.
  • terraform destroy now runs only once all server type pairs of a location are exhausted. Within a location, existing servers are kept and only missing ones are created with the next pair.
  • wiab-staging-hetzner: adds the missing ignore_changes = [server_type] on datanode.

Reason

Staying in the EU keeps artifact downloads close. ash/hil only offer the old cpx generation, and sin is far away. ccx costs more, but these VMs are short-lived.

Use case

LOCATIONS=("hel1" "nbg1" "fsn1")
SMALL_SERVER_TYPES=("cpx22" "cpx32" "ccx13" "ccx23")
MEDIUM_SERVER_TYPES=("cpx42" "cpx42" "ccx23" "ccx33")

Caveats:

  • A cluster can end up with mixed server types.
  • If an apply times out and is killed, the next attempt in the same location runs without a destroy first.

offline/cd_demo.sh: same treatment, SERVER_TYPES=("cpx62" "ccx43") (cx53 is not offered in the EU, ccx43 keeps 16 vCPU), location order aligned, destroy only once a location is exhausted.

cx* server types are no longer offered in any EU location, and hel1 lacks
cpx52/62. Use the same matrix in cd.sh and cd_staging.sh with cpx types
first and dedicated ccx types as fallback, and restore LOCATIONS in cd.sh.

Only run terraform destroy once all server type pairs of a location are
exhausted. Within a location, already provisioned servers are kept
(server_type is ignored on them) and only missing ones are created with
the next pair.

Also add the missing ignore_changes on the staging datanode.
@lwille
lwille requested review from a team and julialongtin as code owners November 16, 2026 15:48
lwille and others added 2 commits November 16, 2026 16:48
cx53 is not offered in any EU location and hel1 lacks cpx62. Use cpx62
with the dedicated ccx43 (same 16 vCPU) as fallback, align the location
order with the other CD scripts, and only destroy once a location is
exhausted.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant