Skip to content

Sweep leaked test networks at job start - #475

Open
Sayan- wants to merge 2 commits into
mainfrom
hypeship/ci-network-janitor
Open

Sweep leaked test networks at job start#475
Sayan- wants to merge 2 commits into
mainfrom
hypeship/ci-network-janitor

Conversation

@Sayan-

@Sayan- Sayan- commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Runs that die mid-test (crash, timeout, cancellation) leak their bridge and route, and the pile eventually collides with test subnets, which took the fleet fully red on Aug 26 and Sep 3. Each job now sweeps before it starts: interfaces matching hypeman's naming that are DOWN, portless, and older than 1h are deleted (a live bridge waits at most one 20m go-test timeout for its TAP, leaks are hours old; unreadable age spares the interface, and the step never fails the job).

Testing

CI

Tests create a bridge and route per VM and clean up on success, but runs
that die mid-test leak them, and cancel-in-progress made mid-test death
routine. The pile eventually collides with test subnets and every run
fails on SUBNET CONFLICT, which has taken the fleet red twice in eight
days. Each job now deletes interfaces that are DOWN with no attached
ports across two snapshots, skipping the settle delay when the host is
healthy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Sayan-
Sayan- marked this pull request as ready for review September 3, 2026 17:36
@Sayan-
Sayan- force-pushed the hypeship/ci-network-janitor branch from 73e44ac to 71e580c Compare September 3, 2026 17:36

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 71e580c. Configure here.

Comment thread .github/workflows/test.yml
Bugbot caught a real hole in the double-snapshot design: a live bridge
sits DOWN with no ports from Initialize until the TAP attaches after
the rootfs build, which can exceed any settle window, so under enough
concurrency the sweep could delete live bridges. Age discriminates
where liveness cannot: a live bridge waits at most one go-test timeout
for its TAP, while leaks are hours old. Sweep only interfaces older
than an hour, read from the sysfs dir timestamp, sparing anything
whose age cannot be read. This also deletes the snapshot, sleep, and
threshold machinery outright.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Sayan-
Sayan- requested a review from sjmiller609 September 3, 2026 19:29
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.

2 participants