Jon Davies created AIRFLOW-2726:
-----------------------------------

             Summary: 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


If one runs:

```
~/git/incubator-airflow/scripts/ci/kubernetes$ kubectl apply 
--namespace=testing-airflow -f kube/
```

The container fails with:

```
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not 
translate host name "postgres-airflow" to address: Name or service not known
```

...and then the pod tries to go into a Running state before 
CrashLoopBackOff'ing about:

```
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...
```

The init container should catch the unavailable DB and retry.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to