Skip to content

bug: built-in provisionerds should honour CODER_CACHE_DIRECTORY if specified #7200

Closed
@johnstcn

Description

@johnstcn

Problem:

Given:

  • Running coder on Kubernetes
  • coder.securityContext.readOnlyRootFileSystem=true is set in Helm values
  • coder.env contains { "name": "CODER_CACHE_DIRECTORY", "value": "/path/to/tmpfs" }
  • coder.volumes specifies a writable volume not under /tmp

If you try running coder on Kubernetes with and set CODER_CACHE_DIRECTORY to /cache, pods will still fail with an error similar to:

create provisioner daemon: mkdir /tmp/provisionerdXXXXXXXXXXX: read-only file system

It appears that the built-in provisionerd server just writes to /tmp and this is non-configurable.
My expectation would be that the built-in provisionerd servers would honour CODER_CACHE_DIRECTORY.

Workaround:

Mount a writable volume on /tmp e.g.

coder:
  volumes:
  - name: "tmp"
    emptyDir: {}
  volumeMounts:
  - name: "tmp"
    mountPath "/tmp"
    readOnly: false

Metadata

Metadata

Assignees

Labels

s3Bugs that confuse, annoy, or are purely cosmetic

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions