[
https://issues.apache.org/jira/browse/AIRFLOW-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16536850#comment-16536850
]
Jon Davies commented on AIRFLOW-2726:
-------------------------------------
"set -e" in airflow-test-env-init.sh seems to fix this.
> Kubernetes init container has no resiliency against unavailable DB
> ------------------------------------------------------------------
>
> Key: AIRFLOW-2726
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2726
> Project: Apache Airflow
> Issue Type: Bug
> Reporter: Jon Davies
> Priority: Major
>
> If one runs:
> {code}
> ~/git/incubator-airflow/scripts/ci/kubernetes$ kubectl apply
> --namespace=testing-airflow -f kube/
> {code}
> The container fails with:
> {code}
> sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not
> translate host name "postgres-airflow" to address: Name or service not known
> {code}
> ...and then the pod tries to go into a Running state before
> CrashLoopBackOff'ing about:
> {code}
> sqlalchemy.exc.InvalidRequestError: This Session's transaction has been
> rolled back due to a previous exception during flush. To begin a new
> transaction with this Session, first issue Session.rollback(). Original
> exception was: (psycopg2.ProgrammingError) relation "log" does not exist
> LINE 1: INSERT INTO log (dttm, dag_id, task_id, event, execution_dat...
> {code}
> The init container should catch the unavailable DB and retry.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)