I trigger my DAG and then I upload the file such that the poke will return True. The sensor task gets submitted to the sensor dags/service but it never returns. The DAG gets stuck in sensing phase.
I am running this on kubernetes.
[2021-04-27 02:35:05,572] {scheduler_job.py:941} INFO - 1 tasks up for execution:
<TaskInstance: test_dag.sensor 2021-04-27 02:35:04.218394+00:00 [scheduled]>
[2021-04-27 02:35:05,580] {scheduler_job.py:970} INFO - Figuring out tasks to run in Pool(name=default_pool) with 122 open slots and 1 task instances ready to be queued
[2021-04-27 02:35:05,580] {scheduler_job.py:998} INFO - DAG test_dag has 0/16 running and queued tasks
[2021-04-27 02:35:05,580] {scheduler_job.py:1063} INFO - Setting the following tasks to queued state:
<TaskInstance: test_dag.sensor 2021-04-27 02:35:04.218394+00:00 [scheduled]>
[2021-04-27 02:35:05,583] {scheduler_job.py:1105} INFO - Sending TaskInstanceKey(dag_id='test_dag', task_id='sensor', execution_date=datetime.datetime(2021, 4, 27, 2, 35, 4, 218394, tzinfo=Timezone('UTC')), try_number=1) to executor with priority 2 and queue default
[2021-04-27 02:35:05,583] {base_executor.py:82} INFO - Adding to queue: ['airflow', 'tasks', 'run', 'test_dag', 'sensor', '2021-04-27T02:35:04.218394+00:00', '--local', '--pool', 'default_pool', '--subdir', '/opt/airflow/dags/repo/dags/test_dag.py']
[2021-04-27 02:35:05,600] {kubernetes_executor.py:492} INFO - Add task TaskInstanceKey(dag_id='test_dag', task_id='sensor', execution_date=datetime.datetime(2021, 4, 27, 2, 35, 4, 218394, tzinfo=Timezone('UTC')), try_number=1) with command ['airflow', 'tasks', 'run', 'test_dag', 'sensor', '2021-04-27T02:35:04.218394+00:00', '--local', '--pool', 'default_pool', '--subdir', '/opt/airflow/dags/repo/dags/test_dag.py'] with executor_config {}
[2021-04-27 02:35:05,601] {kubernetes_executor.py:277} INFO - Kubernetes job is (TaskInstanceKey(dag_id='test_dag', task_id='sensor', execution_date=datetime.datetime(2021, 4, 27, 2, 35, 4, 218394, tzinfo=Timezone('UTC')), try_number=1), ['airflow', 'tasks', 'run', 'test_dag', 'sensor', '2021-04-27T02:35:04.218394+00:00', '--local', '--pool', 'default_pool', '--subdir', '/opt/airflow/dags/repo/dags/test_dag.py'], None, None)
[2021-04-27 02:35:05,717] {kubernetes_executor.py:147} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 had an event of type ADDED
[2021-04-27 02:35:05,717] {kubernetes_executor.py:202} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 Pending
[2021-04-27 02:35:05,718] {scheduler_job.py:1199} INFO - Executor reports execution of test_dag.sensor execution_date=2021-04-27 02:35:04.218394+00:00 exited with status queued for try_number 1
[2021-04-27 02:35:05,726] {scheduler_job.py:1226} INFO - Setting external_id for <TaskInstance: test_dag.sensor 2021-04-27 02:35:04.218394+00:00 [queued]> to 4615
[2021-04-27 02:35:05,728] {kubernetes_executor.py:147} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 had an event of type MODIFIED
[2021-04-27 02:35:05,728] {kubernetes_executor.py:202} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 Pending
[2021-04-27 02:35:05,756] {kubernetes_executor.py:147} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 had an event of type MODIFIED
[2021-04-27 02:35:05,757] {kubernetes_executor.py:202} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 Pending
[2021-04-27 02:35:07,490] {kubernetes_executor.py:147} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 had an event of type MODIFIED
[2021-04-27 02:35:07,490] {kubernetes_executor.py:202} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 Pending
[2021-04-27 02:35:08,525] {kubernetes_executor.py:147} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 had an event of type MODIFIED
[2021-04-27 02:35:08,526] {kubernetes_executor.py:210} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 is Running
[2021-04-27 02:35:20,861] {kubernetes_executor.py:147} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 had an event of type MODIFIED
[2021-04-27 02:35:20,861] {kubernetes_executor.py:207} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 Succeeded
[2021-04-27 02:35:21,116] {kubernetes_executor.py:353} INFO - Attempting to finish pod; pod_id: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4; state: None; annotations: {'dag_id': 'test_dag', 'task_id': 'sensor', 'execution_date': '2021-04-27T02:35:04.218394+00:00', 'try_number': '1'}
[2021-04-27 02:35:21,118] {kubernetes_executor.py:528} INFO - Changing state of (TaskInstanceKey(dag_id='test_dag', task_id='sensor', execution_date=datetime.datetime(2021, 4, 27, 2, 35, 4, 218394, tzinfo=tzlocal()), try_number=1), None, 'testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4', 'airflow', '10427317') to None
[2021-04-27 02:35:21,137] {kubernetes_executor.py:147} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 had an event of type MODIFIED
[2021-04-27 02:35:21,137] {kubernetes_executor.py:207} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 Succeeded
[2021-04-27 02:35:21,140] {kubernetes_executor.py:577} INFO - Deleted pod: TaskInstanceKey(dag_id='test_dag', task_id='sensor', execution_date=datetime.datetime(2021, 4, 27, 2, 35, 4, 218394, tzinfo=tzlocal()), try_number=1) in namespace airflow
[2021-04-27 02:35:21,141] {scheduler_job.py:1199} INFO - Executor reports execution of test_dag.sensor execution_date=2021-04-27 02:35:04.218394+00:00 exited with status None for try_number 1
[2021-04-27 02:35:21,143] {kubernetes_executor.py:147} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 had an event of type DELETED
[2021-04-27 02:35:21,144] {kubernetes_executor.py:207} INFO - Event: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4 Succeeded
[2021-04-27 02:35:21,294] {kubernetes_executor.py:353} INFO - Attempting to finish pod; pod_id: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4; state: None; annotations: {'dag_id': 'test_dag', 'task_id': 'sensor', 'execution_date': '2021-04-27T02:35:04.218394+00:00', 'try_number': '1'}
[2021-04-27 02:35:21,296] {kubernetes_executor.py:353} INFO - Attempting to finish pod; pod_id: testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4; state: None; annotations: {'dag_id': 'test_dag', 'task_id': 'sensor', 'execution_date': '2021-04-27T02:35:04.218394+00:00', 'try_number': '1'}
[2021-04-27 02:35:21,297] {kubernetes_executor.py:528} INFO - Changing state of (TaskInstanceKey(dag_id='test_dag', task_id='sensor', execution_date=datetime.datetime(2021, 4, 27, 2, 35, 4, 218394, tzinfo=tzlocal()), try_number=1), None, 'testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4', 'airflow', '10427318') to None
[2021-04-27 02:35:21,304] {kubernetes_executor.py:577} INFO - Deleted pod: TaskInstanceKey(dag_id='test_dag', task_id='sensor', execution_date=datetime.datetime(2021, 4, 27, 2, 35, 4, 218394, tzinfo=tzlocal()), try_number=1) in namespace airflow
[2021-04-27 02:35:21,305] {kubernetes_executor.py:528} INFO - Changing state of (TaskInstanceKey(dag_id='test_dag', task_id='sensor', execution_date=datetime.datetime(2021, 4, 27, 2, 35, 4, 218394, tzinfo=tzlocal()), try_number=1), None, 'testdagsensor.c91c2da85abc43a9b0f3c968b07f7af4', 'airflow', '10427320') to None
[2021-04-27 02:35:21,311] {kubernetes_executor.py:577} INFO - Deleted pod: TaskInstanceKey(dag_id='test_dag', task_id='sensor', execution_date=datetime.datetime(2021, 4, 27, 2, 35, 4, 218394, tzinfo=tzlocal()), try_number=1) in namespace airflow
[2021-04-27 02:35:21,312] {scheduler_job.py:1199} INFO - Executor reports execution of test_dag.sensor execution_date=2021-04-27 02:35:04.218394+00:00 exited with status None for try_number 1
[2021-04-27 02:38:59,159] {scheduler_job.py:1834} INFO - Resetting orphaned tasks for active dag runs
[2021-04-27 02:38:59,163] {scheduler_job.py:1856} INFO - Marked 1 SchedulerJob instances as failed
[2021-04-27 02:43:59,307] {scheduler_job.py:1834} INFO - Resetting orphaned tasks for active dag runs
[2021-04-27 02:48:59,472] {scheduler_job.py:1834} INFO - Resetting orphaned tasks for active dag runs
[2021-04-27 02:53:59,612] {scheduler_job.py:1834} INFO - Resetting orphaned tasks for active dag runs
Apache Airflow version 2.0.1:
Kubernetes version 1.18.14
Environment: Azure - AKS
What happened:
I created a sensor:
and a DAG
My airflow.cfg:
[core] colored_console_log = False dags_folder = {{.Values.dagsPath}}/repo/dags executor = KubernetesExecutor load_examples = False [smart_sensor] use_smart_sensor = True shard_code_upper_limit = 10000 shards = 5 sensors_enabled = ModifiedWasbBlobSensor ...I trigger my DAG and then I upload the file such that the poke will return True. The sensor task gets submitted to the sensor dags/service but it never returns. The DAG gets stuck in sensing phase.
I am running this on kubernetes.
task_sensorlogs:All my sensor dags have similar logs:
Scheduler logs
Is the smart sensor supposed to work with Kubernetes Executor?