From 740ba3f552344b5680fbcbdced981d0dc0bd86e3 Mon Sep 17 00:00:00 2001 From: LiZhenCheng9527 Date: Tue, 8 Aug 2023 19:18:04 +0800 Subject: [PATCH] undefiend log in function deleteWorkerPods Signed-off-by: LiZhenCheng9527 --- pkg/cluster-operator/customcluster_controller.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/cluster-operator/customcluster_controller.go b/pkg/cluster-operator/customcluster_controller.go index 259692cc0..4c5051f3e 100644 --- a/pkg/cluster-operator/customcluster_controller.go +++ b/pkg/cluster-operator/customcluster_controller.go @@ -417,6 +417,8 @@ func (r *CustomClusterController) reconcileDelete(ctx context.Context, customClu // deleteWorkerPods delete all the manage worker pods, including those for initialization, scaling up, scaling down, and other related tasks. func (r *CustomClusterController) deleteWorkerPods(ctx context.Context, customCluster *v1alpha1.CustomCluster) error { + log := ctrl.LoggerFrom(ctx) + // Delete the init worker. if err := r.ensureWorkerPodDeleted(ctx, customCluster, CustomClusterInitAction); err != nil { log.Error(err, "failed to delete init worker", "name", customCluster.Name, "namespace", customCluster.Namespace)