From 9ee5f6bb7e1ca7c562bf041fef44227ef2e392a2 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 2 Aug 2020 17:09:59 -0700 Subject: [PATCH] need to add a delay for the dns to be ready --- controllers/controller_master_statefulset.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/controllers/controller_master_statefulset.go b/controllers/controller_master_statefulset.go index 3edb8a2..4cb4c3d 100644 --- a/controllers/controller_master_statefulset.go +++ b/controllers/controller_master_statefulset.go @@ -85,13 +85,13 @@ func (r *SeaweedReconciler) createMasterStatefulSet(m *seaweedv1.Seaweed) *appsv }, }, Command: []string{ - "weed", - "master", - "-volumePreallocate", - "-volumeSizeLimitMB=1000", - fmt.Sprintf("-ip=$(POD_NAME).%s-master", m.Name), - fmt.Sprintf("-peers=%s-master-0.%s-master:9333,%s-master-1.%s-master:9333,%s-master-2.%s-master:9333", - m.Name, m.Name, m.Name, m.Name, m.Name, m.Name), + "/bin/sh", + "-ec", + fmt.Sprintf("sleep 60; weed master -volumePreallocate -volumeSizeLimitMB=1000 %s %s", + fmt.Sprintf("-ip=$(POD_NAME).%s-master", m.Name), + fmt.Sprintf("-peers=%s-master-0.%s-master:9333,%s-master-1.%s-master:9333,%s-master-2.%s-master:9333", + m.Name, m.Name, m.Name, m.Name, m.Name, m.Name), + ), }, Ports: []corev1.ContainerPort{ {