From 0fa7d43cba700d5364d9dab39730c3e8bb7d9e56 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 16 Nov 2022 14:10:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=86=E7=BE=A4=E8=A2=AB=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=88=96=E8=80=85=E4=B8=8D=E5=8F=AF=E7=94=A8=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=81=A5=E5=BA=B7=E6=A3=80=E6=9F=A5=E6=97=B6=E4=B8=8D=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/tasks/health_check_executor.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/tasks/health_check_executor.go b/internal/tasks/health_check_executor.go index b542f77d..f90ae103 100644 --- a/internal/tasks/health_check_executor.go +++ b/internal/tasks/health_check_executor.go @@ -38,8 +38,9 @@ func (this *HealthCheckExecutor) Run() ([]*HealthCheckResult, error) { if err != nil { return nil, err } - if cluster == nil { - return nil, errors.New("can not find cluster with id '" + strconv.FormatInt(this.clusterId, 10) + "'") + if cluster == nil || !cluster.IsOn { + // 如果节点已经被删除,则不提示错误 + return nil, nil } if !cluster.HealthCheck.IsNotNull() { return nil, errors.New("health check config is not found")