Repository navigation
test(host): run java_mcp's container MCP scenario against Docker - #55
Merged
Merged
Conversation
With worker.container.auto-restart on, the OCI pair watcher reaped the dead pair and then called DeploymentService::reconcile_stored, which deploys every stored active record again. The live pairs of the other modules were prepared a second time, failed with "runtime already exists for module revision", and were left DEGRADED with a sticky reason. Their uninstall then failed with "runtime does not exist". Protean's container watcher restarts only the container that exited, and the worker crash watch here already does the same through redeploy_after_crash. The OCI trigger now calls redeploy_reaped_after_crash: it redeploys that module's persisted signed record without stopping the runtime it already reaped. When the revision is no longer active there is nothing to restore. Found by the container MCP scenario (S7 opt-in, then cleanup). Tags: oci, gate, parity Co-Authored-By: htjulia <htjulia1@gmail.com>
SCENARIO-container-mcp.md is the worker runbook plus the OS boundary: hardened containers, docker kill as the crash, and the docker wait self-heal behind worker.container.auto-restart. The runner now prepares an OCI host the way an operator would: the worker and gateway images, an internal network, a control secret the container user can read, and a signed gateway profile in the host's artifact store. Two new actions inspect and kill a module's newest container. S1, S2 (read-only rootfs, CapDrop ALL, no-new-privileges, pids and memory caps), S4, S5, S6, S7, S7 opt-in and cleanup pass. S7 opt-in also checks that the neighbouring module keeps serving, which is the regression the previous commit fixes. The test needs Docker and builds the production worker image, so it is #[ignore] like the other OCI tests. PROTRUS_OCI_WORKER_IMAGE reuses a prebuilt image. Tags: host, scenario, oci Co-Authored-By: htjulia <htjulia1@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Runs
java_mcp/SCENARIO-container-mcp.mdagainst the productionprotrus-hostbinary in OCI mode, with real Docker containers (design 20 §6).Runner
execution_mode: "oci", the runner prepares the host the way an operator would:PROTRUS_OCI_WORKER_IMAGEreuses a prebuilt worker image; otherwise it buildsDockerfile.runtime)--internalnetworkcontainer:docker inspectof the module's newest running container (404 if none).kill_container:docker killof that container.Manifest
container-mcp.jsonmode: container, routed through the proxy,list_runtimesmodecontainer, the container is runningHostConfig:ReadonlyRootfs,CapDrop: [ALL],no-new-privileges,PidsLimit 1024,Memory 512mGATE_FAILED(policy), route 404, no container starteddocker killwk-calc: main and ip-echo keep serving, wk-calc 502worker.container.auto-restarton: wk-calc comes back by itself; ip-echo keeps serving and staysactivewith no sticky reason (the #54 regression)Not applicable:
modules-per-worker=1.Verification
PROTRUS_OCI_WORKER_IMAGE=protrus-runtime-worker:scenario cargo test -p protrus-host --test mcp_scenarios -- --include-ignored: all 5 scenarios pass (in-process, worker, configuration, config-reload, container).docker ps -aanddocker network lsshow nothing left over.