Skip to content

test(e2e): smoke-test multiple VM daemons over SSH tunnels - #709

Merged
vladimirrott merged 4 commits into
lacs-project:mainfrom
QinXi-ai:test/677-multi-vm-smoke
Oct 30, 2026
Merged

vladimirrott merged 4 commits into
lacs-project:mainfrom
QinXi-ai:test/677-multi-vm-smoke

Conversation

@QinXi-ai

@QinXi-ai QinXi-ai commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Add a controller-side smoke script that builds sysknife, opens a separate SSH Unix-socket tunnel to each selected Ubuntu guest, and runs doctor --json through it. It defaults to jammy, noble and resolute; every selected host must answer. Replies and failures name the release, waits are bounded, and cleanup reaps the SSH processes and removes their sockets on exit or termination.

The CLI path comes from Cargo's build-artifact output, so custom target directories work and a stale sysknife on PATH cannot be selected. SSH uses ExitOnForwardFailure=yes and StreamLocalBindUnlink=yes.

Validation: 13 offline cases with real local sockets and stub SSH/Cargo/CLI cover success, stale sockets, failed/absent/hanging forwards, failed/hanging calls, build failure, explicit subsets, invalid/duplicate releases, repeated SSH ports and signal cleanup. Removing either forwarding option or switching to the PATH binary makes the suite fail. ShellCheck, strict YAML/Markdown lint and test-reachability checks pass. CI invokes the new offline suite; two existing comment-spacing warnings in the edited workflow are also corrected without changing action pins.

Live three-VM execution and a full Rust/workspace CI run were not performed locally. The three guest SSH ports are unavailable; an attempted offline CLI build could not resolve the locked rmcp-macros 3.8.0 from the local dependency cache. The offline orchestration results do not establish live-VM connectivity.

Fixes #677.

@vladimirrott

Copy link
Copy Markdown
Member

Heads-up on a change that landed after you opened this: main now requires a DCO sign-off on every commit (#713, merged in #732). Each commit needs a Signed-off-by: Your Name <[email protected]> trailer whose address matches the commit's author, and the new dco check blocks this branch until its commits carry one. From your branch:

git fetch https://github.com/lacs-project/sysknife.git main
git rebase --signoff FETCH_HEAD
git push --force-with-lease

That also brings the branch up to date with main, and git commit -s adds the trailer to new commits. Sorry for changing the rules mid-review; nothing else about this PR changes.

@vladimirrott vladimirrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is careful work. Every trap #677 listed is handled and pinned by a case: ExitOnForwardFailure against a stub that exits 0 without binding, StreamLocalBindUnlink against a real stale socket, the pid of ssh itself rather than a subshell, and the CLI path read from Cargo's compiler-artifact message so a sysknife on PATH can never answer. The SIGTERM case, which checks that every tunnel is reaped in the middle of a call, goes past what the issue asked for.

What I checked at 94a75eb3:

  • tests/e2e/multi-vm-smoke.test.sh in a container with no network: 13 offline cases passed.
  • Three mutants of multi-vm-smoke.sh, each red:
    • without -o ExitOnForwardFailure=yes: [jammy] tunnel failed to bind
    • without -o StreamLocalBindUnlink=yes: [jammy] ConnectionRefusedError: [Errno 111] Connection refused
    • binary taken from PATH: [jammy] must not use PATH sysknife
  • sysknife doctor --json exits 4 when the daemon does not answer (runner::run_doctor), so "all selected hosts answered" cannot pass over a dead tunnel.
  • The host-key options match the ones tests/e2e/ubuntu-vm.sh already uses for the same guests, and the ci.yml change adds one step and fixes comment spacing on two pins without touching a SHA.

One blocking item, and it is mechanical: the DCO sign-off that became required after you opened this. From your branch:

git fetch https://github.com/lacs-project/sysknife.git main
git rebase --signoff FETCH_HEAD
git push --force-with-lease

I'm approving this head and arming the merge. When you push, I merge without another round if the rebased diff matches the one I verified, the three mutants above still fail on the new head, every check is green with dco included, and this approval still stands. A push that changes anything else gets a fresh review.

Optional: the live three-VM run you could not do locally. If you bring the guests up later, the output pasted here would be the first multi-VM evidence on record. No CHANGELOG entry needed for a test-only change.

Once this lands, the next pieces of #617's first phase are the pinned inventory (#654) and grouped previews (#678), and I'll point you at whichever frees up first.

@QinXi-ai
QinXi-ai force-pushed the test/677-multi-vm-smoke branch from 94a75eb to f77852a Compare October 30, 2026 04:45
@vladimirrott
vladimirrott merged commit be2e23c into lacs-project:main Oct 30, 2026
14 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.

Multi-VM smoke: one controller reaching the jammy, noble and resolute daemons over ssh -L tunnels

2 participants