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 2020/08/06 13:22:43 UTC

[GitHub] [airflow] battlesnake opened a new issue #10197: pool_slots seems to be ignored

battlesnake opened a new issue #10197:
URL: https://github.com/apache/airflow/issues/10197


   <!--
   
   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.
   This questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**: 1.10.9 (apache-airflow[crypto,celery,postgres,hive,jdbc,mysql,ssh,slack]==1.10.9)
   
   **Python version**: 3.7.6 (docker: python:3.7.6-slim-buster)
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: Tested locally and on AWS
   - **OS** (e.g. from /etc/os-release): Debian 10 (buster) and Ubuntu 18.04.4 LTS (Bionic Beaver)
   - **Kernel** (e.g. `uname -a`): 5.7.8 and 4.15.0
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   
   pool_slots appears to be fixed at 1.
   If I set a higher slot count for tasks that are in a 10-slot pool, Airflow still runs 10 of them at once.
   
   **What you expected to happen**:
   
   Sum(pool_slots) for all tasks currently executing in some pool should not exceed the total number of slots in that pool
   
   <!-- What do you think went wrong? -->
   
   **How to reproduce it**:
   
   1. Start Airflow 1.10.9 (this may occur on other versions too, but was only tested on 1.10.9).
   
   2. Create pool:
   ```
   airflow pool -s pool_slots_test 10 'pool_slots test pool'
   ```
   
   3. Enable+trigger DAG:
   ```
   import time
   from datetime import timedelta
   import dateutil.parser
   
   import airflow
   from airflow.models import DAG
   from airflow.operators.python_operator import PythonOperator
   
   dag = DAG(
       dag_id=f'__pool_slots_test',
       start_date=dateutil.parser.parse('2020-01-01T00:00:00Z'),
       schedule_interval=None,
       catchup=False,
       default_args={}
   )
   
   for x in range(2, 15):
       PythonOperator(
           dag=dag,
           task_id=f'slots_{x}',
           execution_timeout=timedelta(minutes=5),
           op_args=[200],
           op_kwargs={},
           python_callable=lambda secs: time.sleep(secs),
           pool='pool_slots_test',
           pool_slots=x,
       )
   ```
   
   Enable + trigger the DAG, then notice that 10 tasks run at a time in parallel, and Admin⇒Pools summary shows 10 slots in use for the pool (out of 10 slots).
   
   It appears that each task in the DAG requires 1 slot from Airflow's point of view; `pool_slots` value has been ignored.
   
   
   <!---
   
   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 sytle 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**:
   
   <!--
   
   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] boring-cyborg[bot] commented on issue #10197: pool_slots seems to be ignored

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


   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] battlesnake commented on issue #10197: pool_slots seems to be ignored

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


   Solved, `pool_slots` arrived in 1.10.10, according to Git.
   
   I'd misread the changelog somenow.


----------------------------------------------------------------
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] battlesnake closed issue #10197: pool_slots seems to be ignored

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


   


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