reanahub / reana-cluster

REANA cluster management
http://reana-cluster.readthedocs.io/
5 stars 23 forks source link

db: manual creation #104

Closed tiborsimko closed 5 years ago

tiborsimko commented 6 years ago

@diegodelemos @dinosk I am able to reproduce the DB creation problem from last Friday using LATEST cluster configuration and master versions of everything. Here is a quick recap.

After bringing the cluster up for the first time, the DB is not created:

$ kubectl logs server-b6494546-vmhcc 
Something went wrong: (psycopg2.OperationalError) could not connect to server: Connection timed out
    Is the server running on host "db" (10.109.35.221) and accepting
    TCP/IP connections on port 5432?
 (Background on this error at: http://sqlalche.me/e/e3q8)
Something went wrong: (psycopg2.OperationalError) could not connect to server: Connection timed out
    Is the server running on host "db" (10.109.35.221) and accepting
    TCP/IP connections on port 5432?
 (Background on this error at: http://sqlalche.me/e/e3q8)
 * Serving Flask app "/code/reana_server/app.py"
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)

After I manually delete the pod, things are OK:

$ kubectl delete pod server-b6494546-vmhcc                                                    
pod "server-b6494546-vmhcc" deleted
$ kubectl logs server-b6494546-5cf6b
DB Created.
Created 1st user with access_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 * Serving Flask app "/code/reana_server/app.py"
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)

Perhaps we should switch to requiring to create the DB "manually" already in v0.3.0, so that the admins would also have the possibility to create their own user persona explicitly?

diegodelemos commented 6 years ago

This problem has been solved by:

Though, this PRs partially address this issue since no manual database creation will be added to v0.3.0.

diegodelemos commented 5 years ago

Closing as in lastest master REANA-Server retries until the DB service is available.