gabe565 / charts

☸️ A collection of Helm charts, based on the bjw-s common library chart.
https://charts.gabe565.com
Apache License 2.0
97 stars 17 forks source link

[Bookstack with MariaDB] - Potential race condition when bookstack is bootstrapping. #470

Open larssb opened 9 months ago

larssb commented 9 months ago

Chart Name

bookstack

Chart Version

0.13.2

Bug Description

When configuring

mariadb:
  enabled: true
  auth:

A MariaDB database server is bootstrapped. However, Bookstack might come up before MariaDB is ready. Resulting in the database migrations/seeding script that creates proper tables and so on do not run.

Resulting in major errors when trying to access Bookstack. Of course as its entire data foundation layer is not ready yet.


Workaround


Long term preferred fix

values.yaml

No response

Relevant log output

No response

gabe565 commented 9 months ago

You're right. I had originally seen that Bookstack waits for the database to be available so I didn't think this would be an issue, but it seems like the container's startup script fails, then it just continues to serve the site 🫤 It is fixed after a Bookstack pod restart, but that's not great UX.

I should be able to add an initContainer which waits for the database to go healthy to resolve this!