气流卡住,在运行PaperMiller Operator时永远不会完成

yuvru6vn  于 2022-09-20  发布在  Kubernetes
关注(0)|答案(1)|浏览(162)

我正在尝试运行一个DAG,其任务是运行一台jupyter笔记本电脑。每项任务都做得很好,直到送到造纸厂操作员手中。进度条保持为0,任务永远不会完成。当查看Pod内部时,会发现:

  1. AirflowException : "Celery command failed on host <airflow-worker id>"
  2. i'm using airflow 2.3.3 and the pod have papermill(2.4.0) and ipykernel(6.15.2) installed
  3. Arflow is running on openshift
mqxuamgl

mqxuamgl1#

解决方案是为Pod提供更多的资源(CPU和内存)。

在你的DAG里:

  1. from kubernetes.client import models as k8s
  2. task_ressource = k8s.V1ResourceRequirements(limits={"cpu": "800m", "memory": "5Gi"}, request={"cpu": "200m", "memory": "2Gi"})
  3. task = KubernetesPodOperator('task_id'='task_id',image='your image',resources=task_ressource)

相关问题