Run Cloud web and worker as node, and skip the cloud metadata detectors #3134
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.48) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 538 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.376
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3134"
general
weight: 0.35
nick-potts
Fixes #2993.
Summary
Ployz Cloud's web and worker images now run as
node(uid 1000), not root. They also stop probing cloud metadata servers on boot.The OpenTelemetry auto-instrumentation's default detectors include the Alibaba, AWS, Azure and GCP ones. On every boot they call a metadata address such as 169.254.169.254. Self-hosters saw that as unexpected outbound traffic. The image now names the six detectors that read only the local host and container.
Both Dockerfiles change: the root
Dockerfile(self-host) andDockerfile.cloud(built and published by CI).Dockerfile.cloudgains# syntax=docker/dockerfile:1for the symbolic--chmod. The CI image smoke step now asserts uid ≠ 0 and the exact detector list.This sits on top of #3109's schema guard. The guard's files are written as root at build time, and at runtime the guard only reads.
Evidence
process.getuid()in the image is0, andgetResourceDetectors()includesAlibabaCloudEcsDetector…GcpDetector(all 10 cloud detectors).Dockerfilelocally from a cleangit archiveof this branch:Dockerfile.cloudthe same way and confirmed with tcpdump that the image sends nothing to 169.254.169.254 on boot.Dockerfile.cloud.Ops
Hosted Cloud (np1): yes, this applies. Self-host compose and hosted Cloud both run
ghcr.io/getployz/ployz-cloud, which CI builds fromDockerfile.cloudon every push to main. So np1's web and worker run as uid 1000 from the first image built after this merges./tmpand$HOME/.npm(/home/node, owned by node). A mount on web or worker that root wrote stays readable when its files are 644 or 755. A write into it fails with EACCES, and so does a read of a 600 file. The fix is a one-timechown -R 1000:1000 <path>, oruser: "0"on that service until the chown is done. I can't see np1's compose (it lives ingetployz/ops), so whether np1 mounts anything on web or worker is still open.docker execnow enters asnode. Maintenance that needs root usesdocker exec -u 0.user:override without HOME. A composeuser:with no passwd entry leaves HOME at/, andnpm startthen fails writing~/.npm/_logs.OTEL_NODE_RESOURCE_DETECTORS=allbrings back the cloud detectors. No Cloud code or doc readscloud.*attributes, and np1 runs on Hetzner, where none of them matched anyway.--chmodneeds BuildKit with Dockerfile frontend 1.14 or later. Both files pindocker/dockerfile:1. A legacy builder fails at build time, not at runtime.Existing self-host installs: no manual step.
dashboard/self-host/compose.ymlmounts no volume on web or worker, only on postgres and redis, which keep their own images and users. Pulling the new tag and runningdocker compose up -dis enough.Bets
None of the Engine bets in
core/DESIGN.mdare touched. This is image packaging only, with no schema, RPC or stored-format change.Merge Danger
Door: two-way. Revert the PR and the images run as root again.
Blast Radius: deploy. A host whose web or worker writes to a root-owned mount fails on its first write after upgrading. The Ops notes above cover it.