Skip to content

Bound application writable disk usage to protect other workloads on the node #347

Closed

Description

@samuelmbabhazi

Problem

Managed application containers have CPU, RAM, PID and log limits, but their writable filesystem layers have no Shipkeep-enforced capacity bound. An application allowed to deploy can exhaust the shared Docker filesystem and disrupt other workloads. Administrator-provided filesystem quotas can mitigate this externally; the default application path does not establish them.

Evidence

  • API container specification omits readOnlyRootfs; the protobuf default is false. A local invocation of the actual action builder confirms false, no mounts, 1 CPU and 512 MiB RAM for the default plan.
  • Docker HostConfig has no writable-layer storage quota setting.
  • Local volume creation likewise does not define a capacity policy. Volume support should be considered separately from the default root filesystem path.

No filesystem was filled and no host outage was attempted. Limits on tmpfs and rotated Docker logs do not bound writes to the writable root filesystem.

Acceptance criteria

  • Decide and document the supported disk-isolation policy, compatibility implications, storage-driver requirements and behavior when the host cannot enforce it.
  • Bound writable application storage, for example through a compatible read-only-rootfs/bounded-writable-path policy or enforced filesystem quotas.
  • Verify on a disposable filesystem that an application reaching a small budget cannot fill the host, while another application and the agent remain healthy.
  • Keep persistent volume limits and image-cache reclamation explicit. Image retention is already tracked separately in [M3.5c] Image retention (deploy.keep_images) #217; this issue must not merely duplicate retention work.
  • Any required proto or model-invariant change follows the repository's ADR/security-review process before implementation.

Activity

  1. samuelmbabhazi commented on Nov 20, 2026

    @samuelmbabhazi
    CollaboratorAuthor

    Done by ADR 0022 (#361) and its implementation: #362 (contract), #363 (agent watcher), #364 (placement), #365 (stop reason shown).

    How each acceptance criterion is met:

    • Policy, compatibility, storage-driver requirements, behavior when the host cannot enforce it: ADR 0022. A disk budget per container (resources.disk, 1 GiB by default), measured by the agent every 60 seconds from Docker's SizeRw, with no storage-driver requirement; run.read_only_root for a hard bound; agents older than the ADR ignore the budget, and the Servers page shows each agent's version. Hard quotas through storage-opt size were considered and left for operators who prepare XFS with project quotas.
    • Bounded writable application storage: a container above its budget is stopped (5-second grace), stays stopped, and its replica says disk_limit. The window is part of the decision: up to about 65 seconds of writes past the budget.
    • Verified with another application and the agent healthy (20 November 2026, a fresh Ubuntu 24.04 server with systemd, nested Docker 29.10, installed in the single-machine form of Implement the rest of ADR 0021: one machine for the control plane and applications #377): an application writing 200 MB with a 64 MiB budget was stopped by the agent within one measurement (stopped a container over its disk budget, budget 67108864, size 209727488); the API lists its replica as exited, disk_limit. Two other applications kept running, the agent and Docker stayed active, and the node stayed ready. Earlier, on another lab node, the stopped replica stayed stopped across agent and Docker restarts.
    • Persistent volumes and image cache kept explicit: volumes are outside the budget (ADR 0022), placement checks free disk with a 2 GiB margin, and image retention stays [M3.5c] Image retention (deploy.keep_images) #217.
    • Proto and model changes through ADR and security review: ADR 0022 was accepted before feat: a disk budget and a read-only root option in the configuration and the agent contract #362.

    The test ran on the host's filesystem, not on a small disposable one: what it shows is the stop and the health of the rest, within the window the ADR accepts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions