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 2022/06/10 04:48:28 UTC

[GitHub] [airflow] heliharry commented on issue #24309: Intermittent failures when deleting pods

heliharry commented on issue #24309:
URL: https://github.com/apache/airflow/issues/24309#issuecomment-1151935806

   Hit similar issue:
   
   [2022-06-10, 04:37:34 UTC] {pod_manager.py:253} WARNING - Pod aaa-xxx-baef53b3f96440a8abfc171d3a683e3d log read interrupted but container base still running
   [2022-06-10, 04:37:38 UTC] {kubernetes_pod.py:433} INFO - Deleting pod: aaa-xxx-baef53b3f96440a8abfc171d3a683e3d
   [2022-06-10, 04:37:38 UTC] {taskinstance.py:1889} ERROR - Task failed with exception
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py", line 389, in execute
       follow=True,
     File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/cncf/kubernetes/utils/pod_manager.py", line 244, in fetch_container_logs
       last_log_time = consume_logs(since_time=last_log_time, follow=follow)
     File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/cncf/kubernetes/utils/pod_manager.py", line 221, in consume_logs
       follow=follow,
     File "/home/airflow/.local/lib/python3.7/site-packages/tenacity/__init__.py", line 324, in wrapped_f
       return self(f, *args, **kw)
     File "/home/airflow/.local/lib/python3.7/site-packages/tenacity/__init__.py", line 404, in __call__
       do = self.iter(retry_state=retry_state)
     File "/home/airflow/.local/lib/python3.7/site-packages/tenacity/__init__.py", line 360, in iter
       raise retry_exc.reraise()
     File "/home/airflow/.local/lib/python3.7/site-packages/tenacity/__init__.py", line 193, in reraise
       raise self.last_attempt.result()
     File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 428, in result
       return self.__get_result()
     File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
       raise self._exception
     File "/home/airflow/.local/lib/python3.7/site-packages/tenacity/__init__.py", line 407, in __call__
       result = fn(*args, **kwargs)
     File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/cncf/kubernetes/utils/pod_manager.py", line 331, in read_pod_logs
       **additional_kwargs,
     File "/home/airflow/.local/lib/python3.7/site-packages/kubernetes/client/api/core_v1_api.py", line 23747, in read_namespaced_pod_log
       return self.read_namespaced_pod_log_with_http_info(name, namespace, **kwargs)  # noqa: E501
     File "/home/airflow/.local/lib/python3.7/site-packages/kubernetes/client/api/core_v1_api.py", line 23880, in read_namespaced_pod_log_with_http_info
       collection_formats=collection_formats)
     File "/home/airflow/.local/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 353, in call_api
       _preload_content, _request_timeout, _host)
     File "/home/airflow/.local/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 184, in __call_api
       _request_timeout=_request_timeout)
     File "/home/airflow/.local/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 377, in request
       headers=headers)
     File "/home/airflow/.local/lib/python3.7/site-packages/kubernetes/client/rest.py", line 244, in GET
       query_params=query_params)
     File "/home/airflow/.local/lib/python3.7/site-packages/kubernetes/client/rest.py", line 234, in request
       raise ApiException(http_resp=r)
   kubernetes.client.exceptions.ApiException: (422)
   Reason: Unprocessable Entity
   HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Fri, 10 Jun 2022 04:37:38 GMT', 'Content-Length': '462'})
   HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"PodLogOptions \\"aaa-xxx-baef53b3f96440a8abfc171d3a683e3d\\" is invalid: sinceSeconds: Invalid value: -2: must be greater than 0","reason":"Invalid","details":{"name":"aaa-xxx-baef53b3f96440a8abfc171d3a683e3d","kind":"PodLogOptions","causes":[{"reason":"FieldValueInvalid","message":"Invalid value: -2: must be greater than 0","field":"sinceSeconds"}]},"code":422}\n'
   
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py", line 402, in execute
       remote_pod=remote_pod,
     File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py", line 425, in cleanup
       f'Pod {pod and pod.metadata.name} returned a failure:{error_message}\n{remote_pod}'
   airflow.exceptions.AirflowException: Pod aaa-xxx-baef53b3f96440a8abfc171d3a683e3d returned a failure:
   None
   [2022-06-10, 04:37:38 UTC] {taskinstance.py:1400} INFO - Marking task as FAILED. dag_id=xxx_branch, task_id=aaa_xxx, execution_date=20220610T042959, start_date=20220610T043629, end_date=20220610T043738
   [2022-06-10, 04:37:38 UTC] {standard_task_runner.py:97} ERROR - Failed to execute job 9 for task aaa_xxx (Pod aaa-xxx-baef53b3f96440a8abfc171d3a683e3d returned a failure:
   None; 115)
   [2022-06-10, 04:37:38 UTC] {local_task_job.py:156} INFO - Task exited with return code 1
   [2022-06-10, 04:37:38 UTC] {local_task_job.py:273} INFO - 0 downstream tasks scheduled from follow-on schedule check


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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