Skip to content

Prepare SSH key before provisioning VM instances in test runner#15457

Merged
samuelvl merged 2 commits into
elastic:mainfrom
samuelvl:fix/vm-provision-ssh-key-order
Jul 11, 2026
Merged

Prepare SSH key before provisioning VM instances in test runner#15457
samuelvl merged 2 commits into
elastic:mainfrom
samuelvl:fix/vm-provision-ssh-key-order

Conversation

@samuelvl

@samuelvl samuelvl commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes a bug where integration tests running on cloud VM instances failed because the SSH key used to reach those instances wasn't ready yet when the VM was being provisioned. The provisioning step now waits for the SSH key to exist first, so cloud-based test runs work again.

This was introduced in #15422 and detected in #15449 (comment)

@samuelvl samuelvl requested a review from a team as a code owner July 10, 2026 18:28
@samuelvl samuelvl requested review from blakerouse and swiatekm July 10, 2026 18:28
@samuelvl samuelvl added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog Testing backport-9.5 Automated backport to the 9.5 branch labels Jul 10, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@samuelvl samuelvl enabled auto-merge (squash) July 10, 2026 18:29
@infra-vault-gh-plugin-prod

infra-vault-gh-plugin-prod Bot commented Jul 10, 2026

Copy link
Copy Markdown

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

TL;DR

The available failed job log shows a definitive infrastructure failure during ESS teardown: oblt-cli could not authenticate to https://github.com/elastic/observability-test-environments.git, so cluster destruction failed with exit status 128 (log lines 102-112). This is unrelated to the SSH-key ordering change in pkg/testing/runner/runner.go.

The same job also reports TestMonitoringLivenessReloadable and one other integration failure, but the supplied log contains only cleanup/diagnostic output and no assertion, timeout, or component error, so that failure cannot be reliably attributed to this PR from the available evidence.

Remediation

  • Fix or restore the Buildkite/oblt-cli GitHub authentication used for observability-test-environments, then rerun the failed fleet steps.
  • If TestMonitoringLivenessReloadable still fails after the infrastructure issue is resolved, inspect its uploaded diagnostics and full test report for the missing primary error before changing the runner code.
Investigation details

Root Cause

The failed job linux:amd64:tier1:sudo:fleet reached test cleanup, then ESS teardown failed because Git rejected the credentials: Invalid username or token. Password authentication is not supported for Git operations. The failure is in the external oblt-cli cluster Git wrapper, not in the changed runner path.

Evidence

  • Build: https://buildkite.com/elastic/elastic-agent/builds/42785
  • Job/step: linux:amd64:tier1:sudo:fleet
  • Log: lines 102-112 show authentication failure and the warning that cluster hosted-ess-ea-it-rjlql could not be destroyed.
  • PR diff: the change only moves VM preparation (SSH key and repository archive creation) before Provision; no authentication or teardown code is modified.

Verification

  • Reviewed the supplied Buildkite log, PR diff, existing PR comments, and repository code around Runner.Run and prepare.
  • No local integration test was run; the failure requires Buildkite VM/ESS infrastructure.

Follow-up

The log summary DONE 183 tests, 124 skipped, 2 failures is insufficient to diagnose the second failure because its primary test output is absent from the supplied log.


What is this? | From workflow: PR Buildkite Detective

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@samuelvl samuelvl merged commit 83e497e into elastic:main Jul 11, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-9.5 Automated backport to the 9.5 branch skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants