[ 
https://issues.apache.org/jira/browse/AIRFLOW-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16751712#comment-16751712
 ] 

ASF GitHub Bot commented on AIRFLOW-3746:
-----------------------------------------

ashwiniadiga commented on pull request #4583: [AIRFLOW-3746] Fix to prevent 
missing container exit
URL: https://github.com/apache/airflow/pull/4583
 
 
   My PR addresses the following [Airflow 
Jira](https://issues.apache.org/jira/browse/AIRFLOW-3746)
   
   switch from cli.logs to cli.attach to prevent missing container exit
   
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [ ] My PR addresses the following [Airflow 
Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references 
them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
     - https://issues.apache.org/jira/browse/AIRFLOW-XXX
     - In case you are fixing a typo in the documentation you can prepend your 
commit with \[AIRFLOW-XXX\], code changes always need a Jira issue.
   
   ### Description
   
   - [ ] Here are some details about my PR, including screenshots of any UI 
changes:
   
   ### Tests
   
   - [ ] My PR adds the following unit tests __OR__ does not need testing for 
this extremely good reason:
   
   ### Commits
   
   - [ ] My commits all reference Jira issues in their subject lines, and I 
have squashed multiple commits if they address the same issue. In addition, my 
commits follow the guidelines from "[How to write a good git commit 
message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [ ] In case of new functionality, my PR adds documentation that describes 
how to use it.
     - When adding new operators/hooks/sensors, the autoclass documentation 
generation needs to be added.
     - All the public functions and the classes in the PR contain docstrings 
that explain what it does
   
   ### Code Quality
   
   - [ ] Passes `flake8`
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


>  DockerOperator tasks in Airflow celery worker are stuck in "Running" state
> ---------------------------------------------------------------------------
>
>                 Key: AIRFLOW-3746
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3746
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: celery
>            Reporter: Ashwini
>            Priority: Major
>
> With the following DAG and task and using the celery executor, the task runs 
> but never completes.
> *from* *airflow* *import* DAG
> *from* *airflow.operators.bash_operator* *import* BashOperator
> *from* *airflow.operators.docker_operator* *import* DockerOperator
> *from* *datetime* *import* datetime, timedelta
>  
>  
> default_args = {
>     "owner": "airflow",
>     "depends_on_past": False,
>     "start_date": datetime(2018, 12, 31),
>     "email": ["airf...@airflow.com"],
>     "email_on_failure": False,
>     "email_on_retry": False,
>     "retries": 1,
>     "retry_delay": timedelta(minutes=5),
> }
>  
> dag = DAG("celery_test", default_args=default_args, 
> schedule_interval=timedelta(1))
>   DockerOperator(task_id ="test_docker", image = 
> "gitlab-registry.nordstrom.com/merchprice/airflow:hello_python", retries=0, 
> xcom_all=True , dag = dag)
>  
> t2.set_upstream(t1)
> ------------------------
> This is verison of airfow and celery and using
> python 3.6.
> apache-airflow   1.10.1     
> celery           4.1.1      
> docker           3.7.0      
>  
> ------------------------------
> Here is the logs:
> *** Log file does not exist: 
> /home/x9eu/airflow/logs/celery_test/test_docker/2019-01-16T00:00:00+00:00/1.log
> *** Fetching from: 
> http://test.com:8793/log/celery_test/test_docker/2019-01-16T00:00:00+00:00/1.log
>  
> [2019-01-21 20:49:26,260] \{models.py:1361} INFO - Dependencies all met for 
> <TaskInstance: celery_test.test_docker 2019-01-16T00:00:00+00:00 [queued]>
> [2019-01-21 20:49:26,742] \{models.py:1361} INFO - Dependencies all met for 
> <TaskInstance: celery_test.test_docker 2019-01-16T00:00:00+00:00 [queued]>
> [2019-01-21 20:49:26,742] \{models.py:1573} INFO - 
> --------------------------------------------------------------------------------
> Starting attempt 1 of 1
> --------------------------------------------------------------------------------
>  
> [2019-01-21 20:49:26,925] \{models.py:1595} INFO - Executing 
> <Task(DockerOperator): test_docker> on 2019-01-16T00:00:00+00:00
> [2019-01-21 20:49:26,925] \{base_task_runner.py:118} INFO - Running: ['bash', 
> '-c', 'airflow run celery_test test_docker 2019-01-16T00:00:00+00:00 --pickle 
> 20 --job_id 59 --raw --cfg_path /tmp/tmps0u9a_e0']
> [2019-01-21 20:49:27,524] \{base_task_runner.py:101} INFO - Job 59: Subtask 
> test_docker [2019-01-21 20:49:27,523] \{settings.py:174} INFO - 
> setting.configure_orm(): Using pool settings. pool_size=5, pool_recycle=1800
> [2019-01-21 20:49:28,187] \{base_task_runner.py:101} INFO - Job 59: Subtask 
> test_docker [2019-01-21 20:49:28,185] \{__init__.py:51} INFO - Using executor 
> CeleryExecutor
> [2019-01-21 20:49:29,544] \{base_task_runner.py:101} INFO - Job 59: Subtask 
> test_docker [2019-01-21 20:49:29,542] \{cli.py:470} INFO - Loading pickle id 
> 20
> [2019-01-21 20:49:31,140] \{base_task_runner.py:101} INFO - Job 59: Subtask 
> test_docker [2019-01-21 20:49:31,137] \{cli.py:484} INFO - Running 
> <TaskInstance: celery_test.test_docker 2019-01-16T00:00:00+00:00 [running]> 
> on host test.com
> [2019-01-21 20:49:32,603] \{docker_operator.py:182} INFO - Starting docker 
> container from image registry/airflow:hello_python
> [2019-01-21 20:49:48,770] \{docker_operator.py:228} INFO - Hello, %d 0
> Hello, %d 1
> Hello, %d 2
> Hello, %d 3
> Hello, %d 4
> Hello, %d 5
> Hello, %d 6
> Hello, %d 7
> Hello, %d 8
> Hello, %d 9
> Hello, %d 10
> Hello, %d 11
> Hello, %d 12
> Hello, %d 13
> Hello, %d 14
>  
>  



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

Reply via email to