Skip to content

gigabyte-ampere-cuttlefish-installer: wait for the vm to finish booting - #2961

Merged
dimorinny merged 2 commits into
google:mainfrom
dimorinny:ci-ssh-wait-fix
Aug 4, 2026
Merged

gigabyte-ampere-cuttlefish-installer: wait for the vm to finish booting#2961
dimorinny merged 2 commits into
google:mainfrom
dimorinny:ci-ssh-wait-fix

Conversation

@dimorinny

Copy link
Copy Markdown
Contributor

The qemu test jobs treat the serial console login prompt as "vm is ready" and ssh into the guest right away. The prompt only means getty started: the guest is still booting, so the ssh handshake gets reset (kex_exchange_identification: read: Connection reset by peer) and, once that is past, dns is not up yet for the first command needing it.

The console is polled every 30s, so the ssh always lands at the same point after boot and whether it works is luck. Four of twelve job instances across six recent runs failed this way, on both jobs and regardless of which kernel the installer had put on the vm.

Wait until systemd reports the boot finished before using the vm.

Bug: 537008147

@dimorinny
dimorinny requested review from grandpaul and rmuthiah August 4, 2026 11:10
@dimorinny

Copy link
Copy Markdown
Contributor Author

Succeeded 10/10 times here: https://github.com/dimorinny/android-cuttlefish/commits/ci-ssh-wait-trial

1/10 runs had to wait more then 1 iteration in order to connect, so this confirms the fix works and useful.

The workflow still referenced actions by tag, which the zizmor blanket
policy rejects as soon as the file is touched. Pin them to the hashes
the tags currently point at, keeping the same major versions so the
artifact upload and download stay compatible.

Bug: 537008147
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
The qemu test jobs treat the serial console login prompt as "vm is
ready" and ssh into the guest right away. The prompt only means getty
started: the guest is still booting, so the ssh handshake gets reset
(kex_exchange_identification: read: Connection reset by peer) and, once
that is past, dns is not up yet for the first command needing it.

The console is polled every 30s, so the ssh always lands at the same
point after boot and whether it works is luck. Four of twelve job
instances across six recent runs failed this way, on both jobs and
regardless of which kernel the installer had put on the vm.

Wait until systemd reports the boot finished before using the vm.

Bug: 537008147
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
@dimorinny dimorinny added the kokoro:run Run e2e tests. label Aug 4, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Aug 4, 2026
@dimorinny
dimorinny enabled auto-merge August 4, 2026 14:41
@dimorinny
dimorinny added this pull request to the merge queue Aug 4, 2026
Merged via the queue into google:main with commit d267a1b Aug 4, 2026
50 of 52 checks passed
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.

3 participants