Skip to content

fix(CO-38): replace removed Hetzner datacenters API with locations - #946

Open
lwille wants to merge 4 commits into
masterfrom
CO-38/fix-deployment-pipeline
Open

lwille wants to merge 4 commits into
masterfrom
CO-38/fix-deployment-pipeline

Conversation

@lwille

@lwille lwille commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Since 2026-10-01 Hetzner Cloud returns HTTP 410 Gone (deprecated_api_endpoint) for the Datacenters API (changelog). All three CD terraform modules read data "hcloud_datacenters" for the location pre-flight check, so every terraform plan fails and all retries in cd*.sh are exhausted (e.g. https://github.com/wireapp/wire-server-deploy/actions/runs/38375138298).

Ticket: https://wearezeta.atlassian.net/browse/CO-38

Changes

  • wiab-demo-hetzner, wiab-staging-hetzner, wire-server-deploy-offline-hetzner: replace hcloud_datacenters with hcloud_locations; location validation logic unchanged.
  • Pin hetznercloud/hcloud to ~> 1.70 (previously unconstrained, CI always pulled latest).
  • offline/cd.sh, cd_demo.sh, cd_staging.sh: iterate server types inside locations, so all server types are tried in hel1 before falling back to the German locations (which rarely have capacity).
  • offline.yml: only run the Hetzner cleanup steps if terraform was installed; previously a failed build made cleanup fail with terraform: command not found.
  • wire-server-deploy-offline-hetzner/setup_nodes.yml: wait for SSH on the adminhost (public, then private IP) before the first play, as fix: WPB-25755 fix for workflows when pulling images and connecting to new VMs #919 does for wiab-staging. Without it the default verify can fail right after VM creation with Connection timed out during banner exchange on adminhost_local (seen twice in https://github.com/wireapp/wire-server-deploy/actions/runs/42643467944).
  • Changelog entry in changelog.d/5-bug-fixes/.

The MinIO mirror fix needed for the build to pass is on master via #943; this PR is rebased onto it.

Testing

  • terraform validate passes for all three modules (provider 1.70.2).
  • build-all run https://github.com/wireapp/wire-server-deploy/actions/runs/42073445002: all jobs green (dev, min, default build; default + wiab-staging Hetzner verify; container). All deployments landed in hel1.
  • Staging needed one job re-run: first attempt failed after a successful deploy and setup playbook, when the adminhost closed an scp connection pre-auth (Connection closed by ... port 22). The re-run passed; looks transient, unrelated to this change.

@lwille
lwille requested a review from julialongtin as a code owner November 5, 2026 14:19
@lwille
lwille requested a review from a team as a code owner November 5, 2026 14:19
Comment thread offline/cd.sh

for server_type_index in $(seq 0 $((server_type_count - 1))); do
for location_index in $(seq 0 $((location_count - 1))); do
for location_index in $(seq 0 $((location_count - 1))); do

@lwille lwille Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ I'm changing the logic here to always try deploying to HEL1 first, since the German datacenters are at capacity.

Hetzner removed the Datacenters API on 2026-10-01; requests now return
HTTP 410 (deprecated_api_endpoint), breaking every CD plan. Switch the
location pre-flight check to the hcloud_locations data source and pin
the hcloud provider to ~> 1.70 so provider upgrades are deliberate.
The retry loop iterated locations inside server types, so a capacity
miss for the first server type in hel1 fell through to fsn1/nbg1, where
VMs are rarely available. Iterate server types inside locations so hel1
is exhausted first.
The cleanup steps ran with `if: always()`, so when an earlier step
(e.g. the dev build) failed they ran before setup-terraform and died
with `terraform: command not found`. Only run them once terraform was
installed; if it wasn't, nothing can have been deployed.
setup_nodes.yml connected to adminhost_local (private IP, through the
public adminhost) right after the VMs were created and failed with
'Connection timed out during banner exchange'. Wait for SSH first, as
#919 does for wiab-staging.

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