[
https://issues.apache.org/jira/browse/AIRFLOW-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jon Davies updated AIRFLOW-2726:
--------------------------------
Description:
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.
was:
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.
> 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)