Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tmp directory configurable #84

Open
okgolove opened this issue Dec 15, 2024 · 0 comments
Open

Make tmp directory configurable #84

okgolove opened this issue Dec 15, 2024 · 0 comments

Comments

@okgolove
Copy link
Contributor

Hello. I use your helm chart to spin up the service.

During startup it get an error:

ℹ Cleaning up cache entries older than 7d with schedule 0 0 * * * (next run: 12/16/2024, 12:00:00 AM)                        cache-server 2:30:53 PM
ℹ 🚀 Starting GitHub Actions Cache Server (v4.0.1)                                                                           cache-server 2:30:53 PM
ℹ Using database driver: sqlite                                                                                              cache-server 2:30:53 PM
(node:94) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
ℹ Migrating database...                                                                                                      cache-server 2:30:53 PM
⚙ Migration results []                                                                                                       cache-server 2:30:54 PM
✔ Database migrated                                                                                                          cache-server 2:30:54 PM
ℹ Using storage driver: filesystem                                                                                           cache-server 2:30:54 PM

 ERROR  Failed to initialize storage driver: EROFS: read-only file system, mkdtemp 'github-actions-cache-serverXXXXXX'                     2:30:54 PM

  at async Object.mkdtemp (node:internal/fs/promises:1178:10)
  at async Object.setup (server/chunks/runtime.mjs:5637:21)
  at async initializeStorage (server/chunks/runtime.mjs:5924:20)
  at async server/chunks/runtime.mjs:6099:3
  at async createNitroApp (server/chunks/runtime.mjs:6474:7)
  at async server/chunks/runtime.mjs:6482:18

As far as I understand the issue is in mkdtemp function.

We mount ephemeralStorage to /tmp in deployment but app is run in /app directory which is RO because of this setting. I believe the issue is temp directory is not configurable. If it was we would have just point cache directory to /tmp.

Workaround: remove readOnlyRootFilesystem: true setting and set runAsUser: 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant