Skip to content
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

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

Open
larssb opened this issue Dec 20, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@larssb
Copy link

larssb commented Dec 20, 2023

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

  • When MariaDB is fully up. Restart the Bookstack Pod >> it gets the connection to MariaDB and runs its database migrations successfully.

Long term preferred fix

  • That the Bookstack Pod stack continuously polls the MariaDB configured backend. For some acceptable max value. 5 minutes e.g. Keeps trying until max is hit ( e.g. 5 minutes ).

values.yaml

No response

Relevant log output

No response

@larssb larssb added the bug Something isn't working label Dec 20, 2023
@gabe565
Copy link
Owner

gabe565 commented Dec 24, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants