← Back to Pull requests

Name the Server and the disk a pull filled, containerd's store included (#3155, #2881) #3179

Closed
unknown closed this pull request without merging on Oct 23, 2026 04:05 UTC
View on GitHub
unknown unknown commented on Oct 23, 2026 03:09 UTC
Author

Fixes #3155
Fixes #2881

Summary

When a deploy's image pull fills a Server's disk, the error now names the Server and the disk that is actually full.

  • #3155. Docker keeps images in containerd's store, /var/lib/containerd. A Server with a small root disk and /var/lib/docker on a big data disk fills the root disk. The error still pointed at the nearly empty Docker root: The Server's disk is full: 39789 MB free under /var/lib/docker.

  • #2881. On a multi-Server deploy the headline said The Server's disk is full and didn't say which Server.
  •  ployzd pull_failure: where it measures free space
    -  the Docker root (docker info)
    +  the Docker root, or /var/lib/containerd when the error wrote under it
    
     deploy headline (Store's failure reason)
    -  api: The Server's disk is full: 39789 MB free under /var/lib/docker.
    +  api: Server machine-1's disk is full: 0 MB free under /var/lib/containerd.
    

  • pull_failure (crates/ployzd/src/docker/images.rs) now takes the Docker root and containerd's store, each with its free bytes. It names the store only when Docker's error wrote under it: a path starting /var/lib/containerd/, such as write /var/lib/containerd/…. Otherwise it names the Docker root, as before. containerd can keep its store elsewhere, so an unused /var/lib/containerd takes no blame.

  • It also classifies the error before it reads docker info. A pull that fails for a reason no full disk explains, such as manifest unknown, no longer waits up to 3 s on Docker. This is CodeRabbit's follow-up from #3086.

  • Failure::on (crates/ployz-store/src/deployment/rows.rs) is Failure::of for an operation that ran on a known Machine. Both headlines pass the failed operation's Machine, so a full disk reads Server <name>'s disk is full: the Store's Deployment reason, and the CLI's own deploy report (deploy/report.rs, used by server init and ingress setup). The per-row lines already say api on machine-1, and they keep The Server's.

  • Docs: docs/user/troubleshooting/deployments.md "My server's disk is full" shows the new message. It says images live under /var/lib/containerd, which can sit on a different disk from /var/lib/docker, and that a data disk for Docker belongs at both.
  • Stable promise and wire

  • No shape change. details.disk_full stays {docker_root, free_bytes}. docker_root now carries the directory on the full disk, which is /var/lib/containerd when that disk is the fuller one. The field keeps its shipped name, and its doc comment says what it holds.

  • Older CLIs render the right directory. A 0.3.x CLI formats disk_full with DiskFull's Display (rows.rs, error.disk_full()), so a 0.3.x CLI talking to this daemon prints free under /var/lib/containerd too. A new CLI talking to an old daemon gets the Docker root, as today.

  • Additions only in the API. DiskFull::on(server) and Failure::on(error, operations, machine) are new. Failure::of and DiskFull's Display are unchanged.

  • Reason text. The Deployment's stored reason for a full disk changes from The Server's disk is full… to Server <name>'s disk is full…. Nothing in dashboard/ matches on that text.
  • DESIGN.md bets

  • 4. Partial results are outcomes. The failed Deployment records which Server filled, and on which disk, so the user can act without running df on every Server.
  • Evidence

  • Rung 2, crate units. Each failed before the change.

  • - ployzd docker::images::a_pull_names_the_disk_that_ran_out_not_the_docker_roots: /var/lib/docker has 39.8 GB free, /var/lib/containerd 0, and the issue's ENOSPC is in the error. disk_full names /var/lib/containerd. The earlier rule read only the Docker root.
    - ployz-store tests/deployment.rs::a_full_disk_names_the_server_that_ran_out. Before: The Server's disk is full: …. After: Server machine-3's disk is full: ….
    - ployz deploy::report::a_full_disk_names_the_server_that_ran_out, the CLI's own report. Before: error: web: The Server's disk is full: ….
    - a_layer_write_names_no_disk_the_pull_did_not_write_to and a_store_moved_under_another_directory_is_not_the_default_one. A low, unused /var/lib/containerd is not blamed, including when the real store is /mnt/data/var/lib/containerd.
    - a_pull_failure_does_not_wait_on_a_stalled_docker_info now requires under 1 s, so the old 3 s wait fails it.
    - All 22 image tests, 132 store deployment tests, 42 store lib deployment tests, 33 CLI deploy::report tests and 16 core rpc tests pass. cargo clippy -p ployz-core -p ployz-store -p ployzd -p ployz --all-targets --all-features is clean.
  • Real Machines. Incus, 2 Standalone Machines, this checkout's daemon and CLI.

  • - Setup: machine-1's /var/lib/docker was moved onto a separate 12 GiB disk, as in the issue. Its root disk was then filled to 58 MB free.
    - Steps: service add api --image node:22-bookworm-slim, set api.replicas=2, deploy.
        $ df -h / /var/lib/docker          # machine-1
        /dev/sda2   24G   24G   58M 100% /
        /dev/sdb    12G  357M   11G   4% /var/lib/docker
    
        1 failed · across 2 servers
        error: api: Server machine-1's disk is full: 0 MB free under /var/lib/containerd.
          cause: Docker stream error: failed to extract layer (…): mount callback failed on /var/lib/containerd/tmpmounts/…: write …/usr/bin/dpkg-maintscript-helper: no space left on device
        error: api on machine-1: The Server's disk is full: 0 MB free under /var/lib/containerd.
        

    - After the filler was removed, the same deploy succeeded (1 deployed · across 2 servers).
    - The Incus run used the first commit. The later review fixes only narrow which directory is named. This error writes under /var/lib/containerd/ after a space, so the final rule names the same disk, and Codex checked that in round 3.
    - Before. The issue's v0.3.1 output: The Server's disk is full: 39789 MB free under /var/lib/docker. The released 0.3.2 daemon on the same cluster printed only pull image failed. 0.3.2 is a hotfix from release/0.3 without #3086, and its retry was a peer copy. I didn't cold-build main for a second before run; the unit test pins the old rule.

    Review

  • Round 1 (Codex + Opus).

  • - BUG (Codex): always measuring /var/lib/containerd could blame an unused directory when containerd's root is elsewhere. Fixed: a store is named only when the error wrote under it.
    - GAP (both): the CLI's own deploy report still said The Server's. Fixed and tested.
    - GAP (both): the stalled-docker info test allowed 5 s, which the old 3 s wait passed. Tightened to 1 s.
    - Opus confirmed the wire shape, the #2875/#2455 rules, and that the Machine named is the one that pulled (RemoveVolume never reaches the pull branch).
  • Round 2 (Codex, fix diff). BUG: {dir}/ also matched /mnt/data/var/lib/containerd/…. Fixed: the match must start where a path starts.

  • Round 3 (Codex, fix diff). No BUG-class findings. It checked open, lstat, mkdir, quoted paths and the Incus error.
  • Merge Danger

    Door: two-way

    Blast Radius: deploy

    Only a pull that fails on a full disk changes. It names containerd's store only when the error wrote under it, and the Docker root otherwise, as before. The Store's reason names the Server, and a pull that fails for any other reason skips the disk read.

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: nick-potts Review duration: 56m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3179"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.5% · Safe to merge
    22.5%
    Repository