You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/04/02 06:12:10 UTC

[GitHub] [airflow] TPapajCin opened a new issue #15149: Kubernetes Executor does not delete pods stuck at creating because of volume mount errors

TPapajCin opened a new issue #15149:
URL: https://github.com/apache/airflow/issues/15149


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**: 2.0.1 Git Version:.release:2.0.1+beb8af5ac6c438c29e2c186145115fb1334a3735
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): 1.17.17-gke.2800
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: GKE (Kubernetes)
   - **OS** (e.g. from /etc/os-release): Debian GNU/Linux 10 (buster) - docker image python:3.8-slim-buster
   - **Kernel** (e.g. `uname -a`): Linux bd0d5605654a 4.15.0-140-generic #144-Ubuntu SMP Fri Mar 19 14:12:35 UTC 2021 x86_64 GNU/Linux
   - **Install tools**: pip
   - **Others**: Python 3.8, Kubernetes Executor, Docker
   
   **What happened**:
   Pod template contained non existing volume which caused pod to be impossible to run. The volume existed before but was deleted. Task in Airflow was also stuck at "queued".
   Even after clearing task these pods stayed stuck in container creating and it seems that they need to be manually deleted.
   
   Pods are stuck with
   ```
   Unable to attach or mount volumes: unmounted volumes=[secret-volume], unattached volumes=[google-key airflow-logs secret-volume]: timed out waiting for the condition
   MountVolume.SetUp failed for volume "secret-volume" : secret "airflow-secret-14610" not found
   ```
   
   Configuration:
   ```
   AIRFLOW__KUBERNETES__DELETE_WORKER_PODS=True
   AIRFLOW__KUBERNETES__DELETE_WORKER_PODS_ON_FAILURE=True
   
   ```
   
   <!-- (please include exact error messages if you can) -->
   
   **What you expected to happen**:
   I would expect Airflow to delete pods that are not possible to be created, at least after clearing the task.
   
   <!-- What do you think went wrong? -->
   
   **How to reproduce it**:
   Create a pod template with a volume and later delete that volume without pausing DAGs
   <!---
   
   As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.
   
   If you are using kubernetes, please attempt to recreate the issue using minikube or kind.
   
   ## Install minikube/kind
   
   - Minikube https://minikube.sigs.k8s.io/docs/start/
   - Kind https://kind.sigs.k8s.io/docs/user/quick-start/
   
   If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action
   
   You can include images using the .md style of
   ![alt text](http://url/to/img.png)
   
   To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.
   
   --->
   
   
   **Anything else we need to know**:
   It happens all the time and pods are not being deleted.
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #15149: Kubernetes Executor does not delete pods stuck at creating because of volume mount errors

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #15149:
URL: https://github.com/apache/airflow/issues/15149#issuecomment-826734755


   This shoudl be closed by https://github.com/apache/airflow/pull/15263


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #15149: Kubernetes Executor does not delete pods stuck at creating because of volume mount errors

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #15149:
URL: https://github.com/apache/airflow/issues/15149#issuecomment-812341649


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil closed issue #15149: Kubernetes Executor does not delete pods stuck at creating because of volume mount errors

Posted by GitBox <gi...@apache.org>.
kaxil closed issue #15149:
URL: https://github.com/apache/airflow/issues/15149


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #15149: Kubernetes Executor does not delete pods stuck at creating because of volume mount errors

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #15149:
URL: https://github.com/apache/airflow/issues/15149#issuecomment-812702178


   Oh yea looks like it, https://github.com/apache/airflow/pull/14810 should fix it, which will be in 2.0.2.
   
   > is this the same issue as #14556 ?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] eladkal commented on issue #15149: Kubernetes Executor does not delete pods stuck at creating because of volume mount errors

Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #15149:
URL: https://github.com/apache/airflow/issues/15149#issuecomment-812686924


   is this the same issue as https://github.com/apache/airflow/issues/14556 ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] jedcunningham commented on issue #15149: Kubernetes Executor does not delete pods stuck at creating because of volume mount errors

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on issue #15149:
URL: https://github.com/apache/airflow/issues/15149#issuecomment-813678440


   This is related to, but not a duplicate of that other one. This issue identifies that the poison pill (e.g. "Mark failed") doesn't clean up the pending pod.
   
   Basically, the root problem is that once the scheduler creates the worker pod and sticks the TI in queued, it only listens to k8s events. If the pod will be 'forever pending' due to missing volume, well, it gets stuck forever. We probably want some timeout to handle these. I've opened #15218 to address this.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil closed issue #15149: Kubernetes Executor does not delete pods stuck at creating because of volume mount errors

Posted by GitBox <gi...@apache.org>.
kaxil closed issue #15149:
URL: https://github.com/apache/airflow/issues/15149


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org