Open sjoubert opened 21 hours ago
Ah, well, I did not do my test correctly on the old version (I forgot to remove my manual table creation in postgresql). So it seems version 2.0.0 also fails with the same error as version 3.0.3
While new versions may have broke, I assume version 2.0.0 that released the initDatabaseJob initially should work. Did I miss something in the setup?
Name and Version
bitnami/seaweedfs 3.0.3
What architecture are you using?
amd64
What steps will reproduce the bug?
Are you using any custom parameters or values?
What is the expected behavior?
The filer should start properly and the database should be setup correctly. Here is a correct filer start from an earlier version (bitnami/seaweedfs 2.0.0):
What do you see instead?
Here is the file logs:
Additional information
My current analysis is the following: upstream seaweedfs now performs database queries on the
filemeta
table during filer startup. This means that the init database job being apost-install
hook now comes too late in the install process. I've tried to annotate it aspre-install
but this fails because it tries to use a service account that (obviously) does not exists yet.Quickly looking at the chart templates I would suggest to remove the init-db Job and place the init database code (create table ...) directly in the
wait-for-db
init container of the filer pod. This container already shares most of its configuration (image, env variables,...) and script code (waiting for database to be ready). Injecting the db init here, if enabled, seems to make sense and there would be no dependency issue between the filer starting and the db setup (after all that's exactly the purpose of an init container).