我想在我的kube操作符中编写先进的重试机制。
opr_kube = KubernetesPodOperator(
namespace="development",
image='bla',
node_selectors={"servertype": "worker", "env": "development"},
resources=pod.Resources(request_memory='{{task_instance.try_number}}g', limit_memory='{{task_instance.try_number}}g'),
name="bla",
task_id='bla',
default_args=default_args,
dag=dag
)- on-retry hook is not relevant here because there is no option to trigger the operator again with more memory.
- when I add inline function, inside the parameter, the scheduler will execute this function every X seconds and I want to execute it once the task failed.
发布于 2019-07-03 15:31:40
我想了解错误是否是由于内存不足事件造成的:
由于任务实例失败的原因,请检查气流网络接口=> DAG的图视图
关于Kubernetes操作符重试选项,这里是一个例子,但您应该首先了解失败任务背后的原因。在没有验证问题的真正原因的情况下,没有理由建立增量内存重试机制。请确保通过KubernetesPodOperator运行的工作负载无论如何都有足够的资源(您也可以参考“确保为您的环境提供适当资源”指南,更具体地针对托管版本的气流)。
https://stackoverflow.com/questions/56837731
复制相似问题