Open vavallee opened 3 years ago
I don't think it's the K8S version that's the problem because I recently rebuilt my setup on that version.
It looks like the key part is file=/prometheus/queries.active err="open /prometheus/queries.active: permission denied"'.
Have you upgraded from a previous chart version and kept the same persistent volume? I wonder if a major version of the container has gone from using the root user to a non-root user... If this is the case, do you know the version you when from and to? You should be able to get this with 'helm history Prometheus'.
Just re-read your post. Sorry I see you didn't change Prometheus versions.
Maybe k3s changed local persistent volume permissions between versions. I'll see what permissions my working setup are using and maybe you can find the directory and chown it.
Thanks for looking into this. In fact I did destroy all the pvcs before installing, so it appears this happens from scratch. Incidentally, I get the same result without setting a version in the helm deploy.
I spent an hour trying to get an initContainer:
up to fix the permissions, but haven't had any success.
So can confirm that this is a perms issue on the mount.
I created a separate pod with busybox, mounted the volume under /home/prom and did a chmod -R 777 /home/prom
now the service is coming up correctly with the below files created
/home/prom/prometheus-db # ls -l
total 28
drwxr-xr-x 2 1000 2000 4096 Feb 16 19:49 chunks_head
-rw-r--r-- 1 1000 2000 20001 Feb 16 19:50 queries.active
drwxr-xr-x 2 1000 2000 4096 Feb 16 19:49 wal
Oddly, I have had this chart running without issue on my 3 raspberry pis. I have upgraded to "v1.20.2+k3s1" and suddenly I am seeing this error on the prometheus container.
I've installed the helm chart as per instructions, and in this case used the same version.