@@ -37,6 +37,7 @@ import (
37
37
kconst "k8s.io/kubernetes/cmd/kubeadm/app/constants"
38
38
"k8s.io/minikube/pkg/minikube/bootstrapper"
39
39
"k8s.io/minikube/pkg/minikube/command"
40
+ "k8s.io/minikube/pkg/minikube/config"
40
41
"k8s.io/minikube/pkg/minikube/cruntime"
41
42
"k8s.io/minikube/pkg/minikube/logs"
42
43
)
@@ -45,15 +46,15 @@ import (
45
46
const minLogCheckTime = 30 * time .Second
46
47
47
48
// WaitForAPIServerProcess waits for api server to be healthy returns error if it doesn't
48
- func WaitForAPIServerProcess (r cruntime.Manager , bs bootstrapper.Bootstrapper , cr command.Runner , start time.Time , timeout time.Duration ) error {
49
+ func WaitForAPIServerProcess (r cruntime.Manager , bs bootstrapper.Bootstrapper , cfg config. ClusterConfig , cr command.Runner , start time.Time , timeout time.Duration ) error {
49
50
glog .Infof ("waiting for apiserver process to appear ..." )
50
51
err := wait .PollImmediate (time .Millisecond * 500 , timeout , func () (bool , error ) {
51
52
if time .Since (start ) > timeout {
52
53
return false , fmt .Errorf ("cluster wait timed out during process check" )
53
54
}
54
55
55
56
if time .Since (start ) > minLogCheckTime {
56
- announceProblems (r , bs , cr )
57
+ announceProblems (r , bs , cfg , cr )
57
58
time .Sleep (kconst .APICallRetryInterval * 5 )
58
59
}
59
60
@@ -142,7 +143,7 @@ func podStatusMsg(pod core.Pod) string {
142
143
}
143
144
144
145
// WaitForSystemPods verifies essential pods for running kurnetes is running
145
- func WaitForSystemPods (r cruntime.Manager , bs bootstrapper.Bootstrapper , cr command.Runner , client * kubernetes.Clientset , start time.Time , timeout time.Duration ) error {
146
+ func WaitForSystemPods (r cruntime.Manager , bs bootstrapper.Bootstrapper , cfg config. ClusterConfig , cr command.Runner , client * kubernetes.Clientset , start time.Time , timeout time.Duration ) error {
146
147
glog .Info ("waiting for kube-system pods to appear ..." )
147
148
pStart := time .Now ()
148
149
@@ -151,7 +152,7 @@ func WaitForSystemPods(r cruntime.Manager, bs bootstrapper.Bootstrapper, cr comm
151
152
return false , fmt .Errorf ("cluster wait timed out during pod check" )
152
153
}
153
154
if time .Since (start ) > minLogCheckTime {
154
- announceProblems (r , bs , cr )
155
+ announceProblems (r , bs , cfg , cr )
155
156
time .Sleep (kconst .APICallRetryInterval * 5 )
156
157
}
157
158
@@ -179,7 +180,7 @@ func WaitForSystemPods(r cruntime.Manager, bs bootstrapper.Bootstrapper, cr comm
179
180
}
180
181
181
182
// WaitForHealthyAPIServer waits for api server status to be running
182
- func WaitForHealthyAPIServer (r cruntime.Manager , bs bootstrapper.Bootstrapper , cr command.Runner , start time.Time , ip string , port int , timeout time.Duration ) error {
183
+ func WaitForHealthyAPIServer (r cruntime.Manager , bs bootstrapper.Bootstrapper , cfg config. ClusterConfig , cr command.Runner , start time.Time , ip string , port int , timeout time.Duration ) error {
183
184
glog .Infof ("waiting for apiserver healthz status ..." )
184
185
hStart := time .Now ()
185
186
@@ -189,7 +190,7 @@ func WaitForHealthyAPIServer(r cruntime.Manager, bs bootstrapper.Bootstrapper, c
189
190
}
190
191
191
192
if time .Since (start ) > minLogCheckTime {
192
- announceProblems (r , bs , cr )
193
+ announceProblems (r , bs , cfg , cr )
193
194
time .Sleep (kconst .APICallRetryInterval * 5 )
194
195
}
195
196
@@ -212,8 +213,8 @@ func WaitForHealthyAPIServer(r cruntime.Manager, bs bootstrapper.Bootstrapper, c
212
213
}
213
214
214
215
// announceProblems checks for problems, and slows polling down if any are found
215
- func announceProblems (r cruntime.Manager , bs bootstrapper.Bootstrapper , cr command.Runner ) {
216
- problems := logs .FindProblems (r , bs , cr )
216
+ func announceProblems (r cruntime.Manager , bs bootstrapper.Bootstrapper , cfg config. ClusterConfig , cr command.Runner ) {
217
+ problems := logs .FindProblems (r , bs , cfg , cr )
217
218
if len (problems ) > 0 {
218
219
logs .OutputProblems (problems , 5 )
219
220
time .Sleep (kconst .APICallRetryInterval * 15 )
0 commit comments