From 3b10f895b5d8026f69c9f759ebb4781c9018ccf8 Mon Sep 17 00:00:00 2001 From: aby913 Date: Tue, 7 May 2024 20:36:58 +0800 Subject: [PATCH] abnormal termination of zinc service during queries. --- pkg/workload/zinc/helper.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/workload/zinc/helper.go b/pkg/workload/zinc/helper.go index e116938..7453237 100644 --- a/pkg/workload/zinc/helper.go +++ b/pkg/workload/zinc/helper.go @@ -19,10 +19,14 @@ import ( func FindAdminUser(ctx context.Context, client *kubernetes.Clientset) (user, pwd string, err error) { var server *appsv1.StatefulSet + +RETRY: server, err = client.AppsV1().StatefulSets(constants.SystemNamespace).Get(ctx, ZincServerName, metav1.GetOptions{}) if err != nil { klog.Error("find zinc search server error, ", err) - return + // return + time.Sleep(5 * time.Second) + goto RETRY } var secret *corev1.Secret