v2.18 runs into file system errors in Kubernetes #3523
Replies: 21 comments
-
Same issue with |
Beta Was this translation helpful? Give feedback.
-
Can't reproduce the error on a new docker-compose deployment. @al-lac I'm assuming your is also an upgrade from 2.17 to 2.18? |
Beta Was this translation helpful? Give feedback.
-
@franciscao633, happens with both fresh installs and updates for me. This is the docker-compose.yml I am using (via Umbrel): https://github.com/getumbrel/umbrel-apps/blob/35fded41f7d1b165054d0994364b06186d026bc1/umami/docker-compose.yml |
Beta Was this translation helpful? Give feedback.
-
@al-lac Does Umbrel need to run on user 1000:1000? If you remove that line from the Umbrel compose file, it should run fine. Alternatively you need to create permissions to prisma for that user. In the DockerFile we have below
|
Beta Was this translation helpful? Give feedback.
-
using docker (upgrading from 2.17) i am getting a failed start. had to manually revert to v2.17 and then restore the DB from snapshot bc even after i reverted the |
Beta Was this translation helpful? Give feedback.
-
@franciscao633 It does not need to run as user And indeed, the app is working after I removed the user line. However, this seems like a step back and a bug that should be fixed. |
Beta Was this translation helpful? Give feedback.
-
Upgrading from v2.17. Not sure if it's a related issue.
I have a custom |
Beta Was this translation helpful? Give feedback.
-
@desw0lf Could you please create another issue, sharing more details about your setup? Seems like you're building you own image? (Issue is probably caused by People here have permissions issues, and it's most likely not new btw, high probability that their setups already failed in previous versions if runned with |
Beta Was this translation helpful? Give feedback.
-
this is my docker compose and it fails when i try to upgrade to 2.18. its def not a permissions issue:
|
Beta Was this translation helpful? Give feedback.
-
@serversathome, this issue is about permissions errors, you might have another issue then, do you have any logs ( |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@serversathome Thanks, definitely is another issue, it looks like there was a problem with @thiagoalmeidasa I had a look on your revert commit, your security context might causing your problems:
Umami container can't have a read only filesystem. But now, there's always a need for write operations with the pnpm switch and the routes manifest customization. Maybe you have the same setting @AlexBartlAA? |
Beta Was this translation helpful? Give feedback.
-
I'm also having this problem in the upgrade to 2.18
Here's my docker compose config, which has been working for over a year: umami_postgres:
image: postgres:15-alpine
restart: always
container_name: umami_postgres
volumes:
- ${PRIMARY_MOUNT}/postgres_15:/var/lib/postgresql/data
environment:
POSTGRES_DB: umami
POSTGRES_USER: umami
POSTGRES_PASSWORD: umami
networks:
- umami-private-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
umami:
image: ghcr.io/umami-software/umami:postgresql-latest
restart: always
container_name: umami
user: 1000
depends_on:
umami_postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql://umami:umami@umami_postgres:5432/umami
DATABASE_TYPE: postgresql
APP_SECRET: ${DNS_DOMAIN_ZONE_ID}
labels:
- traefik.enable=true
- traefik.docker.network=umami-net
- traefik.http.services.umami-svc.loadbalancer.server.port=3000
- traefik.http.routers.umami-rtr.rule=Host(`umami.${DNS_DOMAIN}`)
- traefik.http.routers.umami-rtr.entrypoints=websecure
- traefik.http.routers.umami-rtr.tls=true
networks:
- umami-net
- umami-private-net
healthcheck:
test: ["CMD-SHELL", "curl http://localhost:3000/api/heartbeat"]
interval: 5s
timeout: 5s
retries: 5 SolutionThose chowns are the problem. If I remove my user line, the server starts up. Kubernetes is likely changing the execution user as well. It would be nice if you could run as whatever user you wanted, and I don't really understand why the application wants to write into Anyway, make sure you're running as 1001 and this should go away. I think this is a bug in the umami docker image, but that's the workaround. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your inputs! I've tested some more based on the discussion here. From what I can tell, v2.18 requires to run as root, any non-root user ID will fail. Running the container as root isn't allowed in our cluster and for good reason. So I guess the minimal reproducible example is to use the docker-compose from the umami repo and just add Should I rename this ticket to |
Beta Was this translation helpful? Give feedback.
-
It's not exactly that, to resume:
As to why write operations are needed: -For eventual -I didn't have a deep look into it, but it looks like the engine used by the ORM isn't included anymore with the pnpm switch. Engine + routes manifest writes are the new things in 2.18 which bring up permissions issues in custom configs. |
Beta Was this translation helpful? Give feedback.
-
Ah, sorry, then I missummarized. So the dockerfile comes with a hardcoded 1001 user ID and whenever the user ID is set externally, it needs to match that. I can confirm that with 1001:1001 I don't run into the same issue. Thanks for your support. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the insights @Maxime-J! Also works for us now by setting the user to |
Beta Was this translation helpful? Give feedback.
-
@subdavis , regarding your error:
I got the same and created a separate issue for it (#3422). For some Kubernetes distros, it is not possible or wanted to run as a specific user (e.g. OpenShift), so for them it is not possible to set the user to
I have investigated whether it is possible to configure the path Prisma uses when downloading its engine at runtime, but this doesn't seem to be possible. But when that was fixed, I ran into the problem mentioned in the first post here, |
Beta Was this translation helpful? Give feedback.
-
The problem occurs because the file The runtime creation of |
Beta Was this translation helpful? Give feedback.
-
@mikaello Given your OpenShift setup, you could build you own image adding this instruction in Dockerfile before the USER line:
(as per OpenShift docs) It could be more fine-grained, but it would work. OR going your way, you might as well copy the entire app folder, I guess it would work too.
|
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 60 days with no activity. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the Bug
First of all, thanks a lot for the new version -
data-before-send
looks like it is exactly what we need and saves us from implementing a custom tracker wrapper.Unfortunately, I haven't been able to deploy the image (
docker.umami.is/umami-software/umami:postgresql-v2.17.0
) into our Kubernetes cluster yet. I get the file-system-permission-related error below in the migration step, more precisely when runningapplyMigration()
. If I skip the migration step, it fails a bit later writing the manifest (log output also below).I can't say for sure that the issue isn't on our side, but everything is working fine with v2.17.0. Unfortunately, I haven't been able to reproduce the issue locally (on Mac, if that's relevant), running the image via docker-compose works. Sorry I can't produce a minimal reproducible example.
Database
PostgreSQL
Relevant log output
Which Umami version are you using? (if relevant)
v2.18.0
Which browser are you using? (if relevant)
irrelevant
How are you deploying your application? (if relevant)
Kubernetes via helm chart
Beta Was this translation helpful? Give feedback.
All reactions