-
Notifications
You must be signed in to change notification settings - Fork 83
[bug] Unable to upgrade to v3 #263
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
Comments
The one time I've seen this happen is when postgres is unable to initialize on the initial startup. What is the setup you have with mounting the disk to the container? |
It's a regular volume mount through Kubernetes. Volume is NFS though. I've had issues in the past with NFS volumes and Postgres, so that could be it. But there's not much logs for me to investigate. I'll give it locally on my laptop to troubleshoot |
This definitely look's like a permission issue. On my laptop, I'm able to make it work but I see that the ll .sourcebot
total 16K
drwx------. 19 100069 100069 4,0K 7 avril 13:06 db
drwxr-xr-x. 2 gael gael 4,0K 7 avril 13:06 index
drwxr-xr-x. 2 gael gael 4,0K 7 avril 13:07 redis
drwxr-xr-x. 3 gael gael 4,0K 7 avril 13:06 repos I know NFS is a bit crappy for such things. I've had a look at another setup where we have a NFS volume mount for a Postgres container and we've had to add a couple of configurations to make it work ( Thus I guess it's something related to our infra rather than an issue with Sourcebot. But I would expect Sourcebot to raise a more explicit error that it's an issue with permissions. That being said, for now, I don't have a workaround on my end to make it work. I'll probably switch to another type of volume anyway. |
It's the following line that raises the error https://github.com/sourcebot-dev/sourcebot/blob/bf8b28252d1aacdf9d54e0f5feb8f8994ecb9006/entrypoint.sh#L133C5-L133C52 Even after giving all possible rights to the folder. From inside the container:
|
Thanks for investigating! Yeah seems like the internal postgres deployment doesn't like certain volumes. I don't have too much experience with postgres, so not exactly sure why without further investiagation We should definitely add a better error message when this happens. In the meantime, could you try a different mount? Alternatively, you could spin up an external postgres server and connect sourcebot to it using |
I've had this issue as well and have found a workaround.
This might be related to NFS root squashing? No idea. Workaround
chown 70:70 $path_to_db_directory # 70 = postgres
su postgres -c "initdb -D $DATABASE_DATA_DIR"
The line |
Thanks for finding a workaround @belaw ! We'll try to get this logic backed into the script |
Describe the bug
Hello folks,
I just tried to upgrade to v3 (from 2.8.4) following https://docs.sourcebot.dev/self-hosting/upgrade/v2-to-v3-guide but upon startup of the v3, I've got errors related to Postgres.
I haven't had time to investigate yet, this may be a permission issue on our end.
In doubt, I thought I'd share it :)
Logs during startup:
To reproduce
N/A
Sourcebot deployment information
Sourcebot version (e.g. v3.0.1): v3.0.2
Additional information
No response
The text was updated successfully, but these errors were encountered: