oxidecomputer / oxidecomputer/propolis

PHD: fail active serial console waits if the serial websocket connection is lost

Open
#181 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement testing
Dominant language
Rust
Stars
270
Forks
42
Avg merge
4d 5h
Merged PRs (30d)
6

Description

The serial console wait logic (see below) has no affordance to stop waiting and return an error if the serial console connection is lost.

https://github.com/oxidecomputer/propolis/blob/5a6a3323a8a586fda836b2945f3bf07881b5b04a/phd-tests/framework/src/serial/vt100.rs#L122-L131

While wait-for-serial operations have a timeout, this can be long (5 minutes in the wait-to-boot case), so it's a bummer to have to wait it out if the VM is just totally gone (e.g. because the test did something that made the server panic).

The serial console websocket listener (below) can detect this case and send a message on its output_tx telling the VT processor (which actually handles the waits) that the connection is gone, allowing the listener to send a failure message/close its end of the channel/whatever behavior we decide is most appropriate.

https://github.com/oxidecomputer/propolis/blob/5a6a3323a8a586fda836b2945f3bf07881b5b04a/phd-tests/framework/src/serial/mod.rs#L29-L41

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the wait logic in phd-tests/framework/src/serial/vt100.rs around lines 122-131, then read the serial websocket listener in phd-tests/framework/src/serial/mod.rs around lines 29-41. Trace how output_tx reaches the VT processor and determine how a lost connection should report failure. Done means active serial waits fail promptly instead of waiting for their timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.