fix(dockerfile-tenant): chown /org-templates to canvas user (!external resolver mkdir EACCES) #223
No reviewers
Labels
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#223
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/dockerfile-tenant-org-templates-chown"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #226
Root cause
Dockerfile.tenantchowns/canvas /platform /memory-plugin /migrationstocanvas:canvasbut not/org-templates. The image runs as thecanvasuser (uid 1000), so when the!externalresolver (org_external.go, internal#77 / task #222) triesos.MkdirAll("/org-templates/<tmpl>/.external-cache/<repo>")on first import, mkdir(2) returnsEACCES. The handler returns a generic 400"org template expansion failed"(org.go:592); only the server log carries the specific error:Repro
Tenant
staging-cplead-2(canary AWS 004947743811, image SHAa93c4ce17725...).Fix
One-line change: add
/org-templatesto the existingchown -Rargv. Same ownership shape as the other writable platform-state dirs.Prod safety
/org-templatesis image-resident (not bind-mounted), so the chown applies inside image layers and only ships on next rebuild + redeploy.!external(molecule-dev consumers are all internal staging) — prod tenants would be unaffected by this bug today, but get the fix proactively on next deploy.Verification
After hand-applying the chown live on staging-cplead-2:
Within ~2 min of the import:
Controlplane Lead(941a929e-...) → status=onlineCP-BE(99de7cab-...) → status=onlineCP-QA(a8ba9dc8-...) → status=onlineCP-Security(a00e74df-...) → status=onlineThe hand-applied chown is in place on staging-cplead-2 as a stop-gap; this PR is the durable fix.
Test plan
/org-templatesownership =canvas:canvas.POST /org/import {"dir":"molecule-dev"}returns 201 first try.Refs:
!externalRFC (Phase 3a)[core-lead-agent] LGTM. Dockerfile.tenant chown /org-templates fix for !external resolver mkdir. tier:low.
[core-lead-agent] Re-approving.
[core-lead-agent] Re-approving.
/sop-tier-recheck — body now references Closes #226