Skip to content

deploy: capture cloud state on manager ssh fail - #2929

Merged
berendt merged 1 commit into
mainfrom
deploy-manager-fip-diagnostics
Jul 15, 2026
Merged

deploy: capture cloud state on manager ssh fail#2929
berendt merged 1 commit into
mainfrom
deploy-manager-fip-diagnostics

Conversation

@ideaship

@ideaship ideaship commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

What

Adds read-only cloud-side diagnostics to the manager bring-up rescue
block in playbooks/deploy.yml. When manager bring-up fails, the rescue path
now captures and prints, using the build's own OS_CLOUD credentials:

  • openstack floating ip show <manager address> — its port_id shows
    whether the floating IP is associated to the expected manager port
    (control-plane) vs a correct association that is mis-routed at L2 (stale
    ARP/conntrack).
  • openstack server/port/floating ip list — leftover or unexpected
    resources in the shared project (e.g. leaked managers).
  • a live ssh-keyscan … | ssh-keygen -lf fingerprint of the manager address
    — which host actually answered, to compare against the captured
    serial-console host keys.

All tasks are read-only and best-effort (changed_when/failed_when: false),
run only in the rescue path (no overhead on a passing deploy), and need no
CI credential access — the evidence lands in the job log.

Why (motivation, not scope)

A recurring failure: the ssh probe "Wait until ssh public key authentication
to the manager works"
aborts with REMOTE HOST IDENTIFICATION HAS CHANGED.
Log analysis of two occurrences shows the manager booted once with a
stable key and the floating IP reached it correctly early in the probe, yet
the same floating IP reached a different host by the time the probe
gave up — the FIP is re-routed mid-build to a host that is not the manager
this build booted. Neither a stale known_hosts entry nor the purge in the
earlier fix explains that:

We would rather collect more decisive data before attempting another fix.
The earlier attempt addressed the wrong layer, and guessing again risks doing
the same. The single most decisive datum is the floating IP's port_id at
failure time (control-plane mis-association vs L2 mis-routing); these
diagnostics exist to capture it — and related state — from the next
occurrence, so any follow-up fix targets the layer that is actually at fault.
They are general enough to keep long-term.

Occurrences (Zuul)

Both ran on orchestrator zuul-testbed04.

🤖 Generated with Claude Code

@ideaship
ideaship marked this pull request as ready for review July 15, 2026 07:59
@ideaship
ideaship marked this pull request as draft July 15, 2026 08:02
Add durable, read-only cloud diagnostics to the manager bring-up rescue
block so that manager bring-up failures are diagnosable from the job log
alone. CI credentials are not otherwise accessible, but the build itself
holds the cloud credentials (OS_CLOUD), so the rescue block queries and
prints the relevant cloud-side state on failure:

- "floating ip show <manager address>": its port_id shows whether the
  floating IP is associated to the expected manager port, distinguishing
  a control-plane mis-association from a correct association that is
  mis-routed at L2 (stale ARP/conntrack).
- "server/port/floating ip list": surfaces leftover or unexpected
  resources in the shared project (e.g. leaked managers).
- a live ssh-keyscan fingerprint of the manager address: records which
  host actually answered, for comparison with the captured serial
  console host keys.

All queries run from terraform_path (as the console-log query does) so
the client finds terraform/clouds.yaml, and each display shows both
stdout and stderr so an auth or API error is visible rather than an
empty result.

The immediate motivation is a recurring failure where the ssh probe
("Wait until ssh public key authentication to the manager works") aborts
with REMOTE HOST IDENTIFICATION HAS CHANGED: the manager booted once
with a stable key and the floating IP reached it correctly early in the
probe, yet the same floating IP reached a different host by the time the
probe gave up. Neither a stale known_hosts entry nor the purge in
PR #2928 explains that; the fault is in floating-IP routing, which these
captures are meant to characterise. The tasks are general enough to keep
long-term: they run only in the rescue path, add no overhead on success,
and cannot affect a passing deploy.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Roger Luethi <luethi@osism.tech>
@ideaship
ideaship force-pushed the deploy-manager-fip-diagnostics branch from 36dda18 to 2f55a67 Compare July 15, 2026 09:08
@ideaship
ideaship marked this pull request as ready for review July 15, 2026 09:16
@ideaship ideaship moved this from New to In review in Human Board Jul 15, 2026
@ideaship
ideaship requested review from berendt and Copilot and removed request for Copilot July 15, 2026 09:17
@berendt
berendt merged commit 338a0e8 into main Jul 15, 2026
3 checks passed
@berendt
berendt deleted the deploy-manager-fip-diagnostics branch July 15, 2026 09:50
@github-project-automation github-project-automation Bot moved this from In review to Done in Human Board Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants