Skip to content

fix(cri): refuse inventable Ready/Running on Stop/Remove/Create (#444) - #444

Merged
ZhiXiao-Lin merged 1 commit into
mainfrom
honesty/444-cri-stop-create-refuse-stale-ready-running
Sep 16, 2026
Merged

ZhiXiao-Lin merged 1 commit into
mainfrom
honesty/444-cri-stop-create-refuse-stale-ready-running

Conversation

@ZhiXiao-Lin

Copy link
Copy Markdown

Summary

Test plan

  • Linux CI a3s-box-cri for remove/stop invent-refusal + auth happy paths
  • Confirm stale Ready without VM allows Remove and demotes on Stop
  • Confirm authenticated Ready still rejects Remove and drives workload Stop

…eck (#444)

RemovePodSandbox and StopPodSandbox must not invent live Ready from durable
store alone; CreateContainer late re-check and sibling Running guards must
re-prove VM health (#444 / #443/#437/#434). Does not invent Live digests or flip B2.

Co-authored-by: Cursor <[email protected]>
@ZhiXiao-Lin
ZhiXiao-Lin merged commit e06137d into main Sep 16, 2026
0 of 7 checks passed
@ZhiXiao-Lin
ZhiXiao-Lin deleted the honesty/444-cri-stop-create-refuse-stale-ready-running branch September 16, 2026 03:30
ZhiXiao-Lin added a commit that referenced this pull request Sep 16, 2026
…445/#446) (#445)

* fix(cri): refuse inventable Running force-stop on RemoveContainer (#445)

Durable Running alone must not invent force-stop of a live container.
Reconcile reported container before the CRI force-remove stop path so
inventable Running demotes first (#445 / #444/#434). Does not invent Live
digests or flip B2.

Co-authored-by: Cursor <[email protected]>

* fix(cri): refuse inventable Running stop/teardown on StopContainer (#446)

Durable Running alone must not invent live stop, sandbox VM teardown,
NotReady, or network disconnect. Reconcile reported container before the
stop path so inventable Running demotes first (#446 / #445/#434). Does not
invent Live digests or flip B2.

Co-authored-by: Cursor <[email protected]>

* style(runtime): rustfmt exec heartbeat timeout match in lifecycle

Keep cargo fmt --check green on tip; collapse the heartbeat timeout
if-let so Format CI matches local rustfmt.

Co-authored-by: Cursor <[email protected]>

* test: fix Clippy/compile gates blocking honesty CI

Replace expect_err on non-Debug VmManager with is_err assert, and
correct unused/required mut on unix health/resume fixtures so Clippy
-D warnings compiles on tip.

Co-authored-by: Cursor <[email protected]>

* test(runtime): declare mut VmManager for resume exec_socket clear

Unix microvm_resume fixture assigns exec_socket_path; Clippy/compile
requires mut on the local binding.

Co-authored-by: Cursor <[email protected]>

* test(runtime): use assert! for paused health invent-refusal

clippy: :bool_assert_comparison rejects assert_eq!(..., false) on the
Co-authored-by: Cursor <[email protected]>
#424 Paused health probe; keep the invent-refusal assertion, fix the lint.

* fix(cri): disposable VMM stub PID so destroy cannot SIGTERM cargo test

Attaching std::process::id() made Stop/Remove teardown kill the a3s_box_cri
test binary (#445 CI SIGTERM). Use a sleep child as the shim stand-in.

Co-authored-by: Cursor <[email protected]>

* docs(changelog): note CRI disposable VMM stub harness fix for #445

Co-authored-by: Cursor <[email protected]>

* style(cri): drop unused mut on disposable VMM stub spawn

Co-authored-by: Cursor <[email protected]>

* fix(cri): avoid Child::wait hang after destroy waitpid-reaps stub

Attached ShimHandler::stop waitpid-reaps the disposable sleep PID; a later
blocking Child::wait in Drop hung the suite after the SIGTERM self-kill fix.

Co-authored-by: Cursor <[email protected]>

* fix(cri): forget disposable stub Child to avoid waitpid reaper hang

Keep only the PID; never Child::wait after ShimHandler attached stop may
have already reaped the sleep process.

Co-authored-by: Cursor <[email protected]>

* fix(cri): keepalive exec fixture without 3600s Data sleep

Invent-refusal helpers used spawn_exec_stream_server with a one-hour exit
delay; any Data frame against that socket froze CI. Use a heartbeat-only
keepalive server, ignore signal-main Control without ACK, and never wait
on stub Drop after waitpid may have reaped.

Co-authored-by: Cursor <[email protected]>

* fix(cri): instant-stop handler for invent-refusal destroy (#445 CI)

Replace host sleep/DisposableVmm stubs with an in-process InstantStop
handler after attach so Stop/Remove destroy cannot SIGTERM cargo-test
or hang on waitpid; keepalive Control fails closed without ACK.

Co-authored-by: Cursor <[email protected]>

* fix(cri): concurrent Accept on workload exec fixtures (#445 CI)

Health re-proof heartbeats must not block behind an open Data stream;
sequential fixture Accept caused invent-refusal demote (exit 255) on
Stop/Attach. Align PortForward unready assert with sandbox invent gate.

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Cursor <[email protected]>
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.

1 participant