3liz/py-qgis-server

Default user when running under k8s is now 9001 breaking volume mounts

bjornharrtell opened this issue · 5 comments

Looks like when I upgrade from 3.26 image to 3.28 I get into trouble because the start up logs says this:

Running as 9001:9001
ERROR: /data do not exists or is not readable

So to me it looks like the changes done at 794ca8a is causing a breaking change, at least when running on k8s.

What is your opinion on this @dmarteau?

9001:9001 has always been the default user if do not specify QGSRV_USER - or from the --user with docker.

Your error message above come from 794ca8a#diff-7cfc2aa3796f096105480a1a669658cfc12d2688b6300eef89d9ce94eef44e26R75, this test that the directory passed with QGSRV_CACHE_ROOTDIR is indeed writeable instead failing later with more cryptic message.

Tests are using QGSRV_CACHE_ROOTDIR and there was no problems reported from the change above. If you can, check the read permission from inside another running container and report what you get, that would would give us some hints.

Thanks @dmarteau that makes it a bit more clear.. however I'm still confused how it then can work with the 3.26 image. And even more confused that in my deployment the directory (which is a volume mounted in k8s) seems to be group owner 2004 which I have no clue how it came to be. I.e doing ls -al shows the /data dir entry as follows:

drwxrws--x 3 root 2004 6144 Apr 10 13:33 data

my deployment the directory (which is a volume mounted in k8s) seems to be group owner 2004

Sorry I cannot help you with, that

it then can work with the 3.26 image

The 3.26 image has no such check, and I don't know nothing about how k8s handle mounted volumes.

@dmarteau after some digging it looks that it's likely a peculiarity of an old/obsolete storageclass to make the volume and mount. Sorry for the noise.