Cloud Composer GKE Node upgrade results in Airflow task randomly failing

9/17/2018

The problem:

I have a managed Cloud composer environment, under a 1.9.7-gke.6 Kubernetes cluster master. I tried to upgrade it (as well as the default-pool nodes) to 1.10.7-gke.1, since an upgrade was available.

Since then, Airflow has been acting randomly. Tasks that were working properly are failing for no given reason. This makes Airflow unusable, since the scheduling becomes unreliable. Here is an example of a task that runs every 15 minutes and for which the behavior is very visible right after the upgrade: airflow_tree_view

On hover on a failing task, it only shows an Operator: null message (null_operator). Also, there is no log at all for that task.

I have been able to reproduce the situation with another Composer environment in order to ensure that the upgrade is the cause of the dysfunction.

What I have tried so far :

I assumed the upgrade might have screwed up either the scheduler or Celery (Cloud composer defaults to CeleryExecutor).

I tried restarting the scheduler with the following command:

kubectl get deployment airflow-scheduler -o yaml | kubectl replace --force -f -

I also tried to restart Celery from inside the workers, with

kubectl exec -it airflow-worker-799dc94759-7vck4 -- sudo celery multi restart 1

Celery restarts, but it doesn't fix the issue. So I tried to restart the airflow completely the same way I did with airflow-scheduler.

None of these fixed the issue.

Side note, I can't access Flower to monitor Celery when following this tutorial (Google Cloud - Connecting to Flower). Connecting to localhost:5555 stay in 'waiting' state forever. I don't know if it is related.

Let me know if I'm missing something!

-- Aurélien Valade
airflow
google-cloud-composer
google-cloud-platform
google-kubernetes-engine

1 Answer

10/1/2018

1.10.7-gke.2 is available now [1]. Can you further upgrade to 1.10.7-gke.2 to see if the issue persists?

[1] https://cloud.google.com/kubernetes-engine/release-notes

-- Jinjun
Source: StackOverflow