Set every container's log config from the daemon#1464

merged6
main
obs/1-log-config
openedOct 8, 2026byNNick
View on GitHubGitHub import enabledPR last imported 21d ago

Summary

The daemon sets Docker's local log driver with uncompressed 10 MB rotation and three files for new Service, hook, ingress, Unregistry and Corrosion containers. Specs no longer choose a log driver. Existing Service containers keep their settings until recreated, and Global container identity stays unchanged.

diff
1- log_config = spec.log_driver or Docker default
2+ log_config = local, max-size=10m, max-file=3, compress=false

First of four native stacked PRs. Next is #1463. The stack incorporates current main's persistent Corrosion and DNS lifecycle. Corrosion's digest includes the log options, so a legacy or differently configured container is replaced once; unchanged subsequent starts keep it.

Evidence

  • Current published-head CI passes. The independent source reconciliation and final runtime receipt audits pass with notes.
  • Original real-Machine lanes verify new container settings, Global identity, rotation and CLI output. Those source paths retain independent applicability after reconciliation.
  • A fresh release Machine confirms actual Service and Corrosion settings and stable Corrosion identity/start time across daemon stop/start. Private DNS and the observer continue serving. The existing Unregistry library integration fixture confirms unchanged reopen, stopped-container repair and cleanup; direct inspection confirms its actual log options and digest. That debug fixture predates release replacement and the dispatcher correction, with identical library source.
  • Independent reconciliation review passes. Final strict all-target/all-feature workspace Clippy and formatting pass. Daemon library tests pass 541 and binary tests pass 161. Current published-head CI passes.

Merge Danger

Door: two-way.

Blast Radius: containers.

New Ployz containers use local even when Docker's default forwards logs elsewhere. External readers of Docker JSON log files must account for that change. Build-helper containers retain their existing configuration. A Corrosion container without the new desired digest is replaced once on convergence.

Checks

14 successful ยท 1 skipped
All checks passed
7029f1c

Added 5 commits

  • Drop comments that restate the code2a19395
  • Assert every container kind gets the log config58059cb
  • Pin trunk's serving-shape token for a spec without a log driver9774e16
  • Set every container's log config from the daemona6c405c
  • Pin the container log config valuesd748a73

Added 1 commit

  • Reconcile log configuration with persistent serving infrastructure7029f1c
Synced from GitHub

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
๐Ÿ“ Code Reviewโœ… Completed 2026-10-10T09:46:44.340473Z7029f1cDraft marked ready
โ„น๏ธ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with ๐Ÿ‘€ while any review is running, comments if it has suggestions, and reacts with ๐Ÿ‘ once all reviews finish with no findings.

Cchatgpt-codex-connectorBotreviewed ยท 2 inline threadsOct 10, 2026
Synced from GitHub

๐Ÿ’ก Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7029f1c3ac

โ„น๏ธ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with ๐Ÿ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

โ€ฆโ€ฆ@@ -3180,7 +3178,7 @@ hostname: ContainerHostname | null,
31813179 * Container-local Docker `/etc/hosts` entries.
31823180 */
3183-extra_hosts: Array<ExtraHost>, cap_add: Array<string>, cap_drop: Array<string>, healthcheck: HealthcheckSpec | null, pull_policy: PullPolicy, init: boolean | null, user: string | null, working_directory: ContainerPath | null, tty: boolean, open_stdin: boolean, privileged: boolean, pid_mode: PidMode | null, log_driver: LogDriver | null, resources: ContainerResources, stop_timeout_secs: number | null, sysctls: { [key in string]: string }, restart: RestartPolicy, };
3181+extra_hosts: Array<ExtraHost>, cap_add: Array<string>, cap_drop: Array<string>, healthcheck: HealthcheckSpec | null, pull_policy: PullPolicy, init: boolean | null, user: string | null, working_directory: ContainerPath | null, tty: boolean, open_stdin: boolean, privileged: boolean, pid_mode: PidMode | null, resources: ContainerResources, stop_timeout_secs: number | null, sysctls: { [key in string]: string }, restart: RestartPolicy, };

P1 Badge Preserve the published log_driver field

Removing log_driver from the generated ServiceContainerSpec is a breaking API change in version 0.2.3: TypeScript consumers that construct a spec with this previously published field will fail excess-property checking after updating the SDK, and serialized CLI/RPC output also silently drops the field. Keep the deprecated nullable field in the wire/SDK shape while ignoring its value when creating containers; core/CODING_STANDARDS.md:57 explicitly requires JSON fields to be additive from 0.2.0 onward.

AGENTS.md reference: AGENTS.md:L3-L5

Useful? React with ๐Ÿ‘ย / ๐Ÿ‘Ž.

Not changing this. Ployz has no external users yet, and breaking JSON changes past v0.2.0 are allowed without shims. Stored specs that still carry log_driver are covered: serving_shape_of_a_stored_spec_with_a_log_driver_ignores_it checks that the field is ignored.

core/crates/ployzd/src/docker/create.rslines 27โ€“31Open thread
โ€ฆโ€ฆ@@ -22,6 +22,17 @@ use super::{
28+ config: Some(HashMap::from([
29+ ("max-size".into(), "10m".into()),
30+ ("max-file".into(), "3".into()),
31+ ("compress".into(), "false".into()),
Cchatgpt-codex-connectorBoton lines 27โ€“31Oct 10, 2026

P2 Badge Document the daemon-owned log retention policy

For every newly created or recreated service container, these options override Docker's daemon defaults, but the shipped user docs still say that pre-existing Docker log settings decide retention and instruct users to edit daemon.json when disks fill (docs/user/observe/logs.md:37-40 and docs/user/troubleshooting/servers.md:275-277). That advice no longer changes these containers and hides the new fixed 10 MB ร— 3 policy, so update the user documentation with this behavior change.

AGENTS.md reference: AGENTS.md:L6-L6

Useful? React with ๐Ÿ‘ย / ๐Ÿ‘Ž.

Fixed later in this stack, in #1484. docs/user/troubleshooting/servers.md now describes the fixed policy of three 10 MB files set on each container, and says log-opts in daemon.json doesn't apply. The stack lands together, so the old text never ships.