Skip to content

AR03.3: docker volume rm undo via inline-bytes tar#45

Merged
mfwolffe merged 4 commits into
trunkfrom
ar03.3-docker-volume-rm-undo
May 24, 2026
Merged

AR03.3: docker volume rm undo via inline-bytes tar#45
mfwolffe merged 4 commits into
trunkfrom
ar03.3-docker-volume-rm-undo

Conversation

@espadonne
Copy link
Copy Markdown
Contributor

@espadonne espadonne commented May 24, 2026

Summary

  • AR03.3 — extends AR03.2's container-event plumbing to docker volume rm. Capture path runs docker run --rm -v <vol>:/src:ro busybox tar -C /src -czf - . to gzip-tar the volume contents, blake3-hashes, ships inline via encode_frame_large. Daemon ingests + journals via the existing container_track::handle VolumeRm arm (no daemon-side changes needed — already wired in PR AR03.2: docker rmi undo via inline-bytes stash (DR-CR-26 PR-B) #43).
  • Inverse path (already in ContainerExecutor::apply_volume_rm): docker volume createdocker run --rm -i ... busybox tar -xzf - with the captured bytes on stdin.
  • Smoke asserts byte-identity of a probe file pre- and post-undo.
  • Best-effort docker volume inspect --format='{{.Driver}}' records non-default drivers in extras so the recreate honors them.

Scope

  • Implements: docker volume rm <vol> full round-trip with inline tarball capture.
  • Out of scope: multi-volume batching (docker volume rm v1 v2 v3 ships one event per invocation, volume[0] only); podman volume rm (no podman on hosted runners — AR03.5 territory).
  • Reuses verbatim from AR03.2: docker-wrapper, container_track inline-bytes ingest, MAX_LARGE_FRAME_SIZE, length-prefix-first ctl read, DaemonContainerRunner.

Test plan

  • cargo build --workspace --release green
  • cargo fmt --all -- --check clean
  • cargo clippy --workspace --all-targets --all-features -- -D warnings clean
  • cargo test -p shit-helper --bin shit-helper container::event — 5 tests pass
  • dr-smoke / docker-volume-rm-undo job green on this PR (validates full round-trip + byte-identity)
  • No regressions on existing dr-smoke jobs including docker-rmi-undo (AR03.2 stays green)
  • linux-kernel-capture matrix stays green

espadonne added 4 commits May 23, 2026 22:59
…finds real binary

The previous guard used 'command -v -- docker | grep -v wrapper-dir | head -n1'
which only returned the FIRST PATH match (the wrapper itself), then filtered
it out leaving nothing. AR03.2's docker save tolerated this because the
helper didn't set SHIT_DURING_UNDO; AR03.3's volume capture does, exposing
the bug. Switch to the same PATH-stripping pattern the non-undo branch
already uses.
@mfwolffe mfwolffe merged commit 0cf8fcc into trunk May 24, 2026
23 checks passed
@mfwolffe mfwolffe deleted the ar03.3-docker-volume-rm-undo branch May 24, 2026 03:23
espadonne added a commit that referenced this pull request May 24, 2026
…dman pre

The podman wrapper had only the recursion guard fix from PR #45
(AR03.3) but never received the helper-invocation block that the
docker wrapper got in PR #43. Result: podman commands routed
through the wrapper but the helper was never called, so no
ContainerOp event ever reached the daemon. AR03.5's smoke timed
out waiting for the journal entry. Port the block from the docker
wrapper verbatim (only s/docker/podman/); the classifier handles
the cross-runtime delegation server-side.
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