salabs / Epimetheus

Frontend for your test results
https://testmanagerfront.azurewebsites.net/
Apache License 2.0
19 stars 2 forks source link

Default database initialisation by backend server #114

Open tfrisk opened 4 years ago

tfrisk commented 4 years ago

Is your feature request related to a problem? Please describe. When creating a new installation from scratch, backend server fails to start if using fresh postgresql installation without any databases added.

Describe the solution you'd like It would be nice if epimetheus backend server would create database with sensible defaults if it does not exist. This would help with our attempts to create an openshift template for epimetheus.

Describe alternatives you've considered Alternative is to notice database is empty, notify user and frontend and then keep the backend server running. That would satisfy openshift as the pod would be kept running instead of going into crash loop.

Additional context We are writing openshift template for epimetheus and this issue/feature is blocking our efforts.

tfrisk commented 4 years ago

Backend works fine if I just remove this exit from backend code: https://github.com/salabs/Epimetheus/blob/d88b16db05fcacd9a87265b6752b5c2e805282c3/backend_server/database.py#L35