Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
64e44ec0
M
minikube
项目概览
Chu Peng 楚鹏
/
minikube
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
minikube
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
64e44ec0
编写于
5月 19, 2020
作者:
P
Priya Wadhwa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Respect --wait flag on soft start
上级
755c9246
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
34 deletion
+20
-34
pkg/minikube/node/start.go
pkg/minikube/node/start.go
+2
-5
test/integration/functional_test.go
test/integration/functional_test.go
+18
-29
未找到文件。
pkg/minikube/node/start.go
浏览文件 @
64e44ec0
...
...
@@ -153,11 +153,8 @@ func Start(starter Starter, apiServer bool) (*kubeconfig.Settings, error) {
prepareNone
()
}
// TODO: existing cluster should wait for health #7597
if
!
starter
.
PreExists
{
if
err
:=
bs
.
WaitForNode
(
*
starter
.
Cfg
,
*
starter
.
Node
,
viper
.
GetDuration
(
waitTimeout
));
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"Wait failed"
)
}
if
err
:=
bs
.
WaitForNode
(
*
starter
.
Cfg
,
*
starter
.
Node
,
viper
.
GetDuration
(
waitTimeout
));
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"Wait failed"
)
}
}
else
{
if
err
:=
bs
.
UpdateNode
(
*
starter
.
Cfg
,
*
starter
.
Node
,
cr
);
err
!=
nil
{
...
...
test/integration/functional_test.go
浏览文件 @
64e44ec0
...
...
@@ -38,7 +38,6 @@ import (
"github.com/google/go-cmp/cmp"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/localpath"
"k8s.io/minikube/pkg/util/retry"
...
...
@@ -294,37 +293,27 @@ func validateMinikubeKubectl(ctx context.Context, t *testing.T, profile string)
func
validateComponentHealth
(
ctx
context
.
Context
,
t
*
testing
.
T
,
profile
string
)
{
defer
PostMortemLogs
(
t
,
profile
)
f
:=
func
()
(
bool
,
error
)
{
rr
,
err
:=
Run
(
t
,
exec
.
CommandContext
(
ctx
,
"kubectl"
,
"--context"
,
profile
,
"get"
,
"cs"
,
"-o=json"
))
if
err
!=
nil
{
t
.
Logf
(
"failed to get components. args %q: %v"
,
rr
.
Command
(),
err
)
return
false
,
nil
}
cs
:=
api
.
ComponentStatusList
{}
d
:=
json
.
NewDecoder
(
bytes
.
NewReader
(
rr
.
Stdout
.
Bytes
()))
if
err
:=
d
.
Decode
(
&
cs
);
err
!=
nil
{
t
.
Logf
(
"failed to decode kubectl json output: args %q : %v"
,
rr
.
Command
(),
err
)
return
false
,
nil
}
rr
,
err
:=
Run
(
t
,
exec
.
CommandContext
(
ctx
,
"kubectl"
,
"--context"
,
profile
,
"get"
,
"cs"
,
"-o=json"
))
if
err
!=
nil
{
t
.
Fatalf
(
"failed to get components. args %q: %v"
,
rr
.
Command
(),
err
)
}
cs
:=
api
.
ComponentStatusList
{}
d
:=
json
.
NewDecoder
(
bytes
.
NewReader
(
rr
.
Stdout
.
Bytes
()))
if
err
:=
d
.
Decode
(
&
cs
);
err
!=
nil
{
t
.
Fatalf
(
"failed to decode kubectl json output: args %q : %v"
,
rr
.
Command
(),
err
)
}
for
_
,
i
:=
range
cs
.
Items
{
status
:=
api
.
ConditionFalse
for
_
,
c
:=
range
i
.
Conditions
{
if
c
.
Type
!=
api
.
ComponentHealthy
{
continue
}
status
=
c
.
Status
}
if
status
!=
api
.
ConditionTrue
{
t
.
Logf
(
"unexpected status: %v - item: %+v"
,
status
,
i
)
return
false
,
nil
for
_
,
i
:=
range
cs
.
Items
{
status
:=
api
.
ConditionFalse
for
_
,
c
:=
range
i
.
Conditions
{
if
c
.
Type
!=
api
.
ComponentHealthy
{
continue
}
status
=
c
.
Status
}
if
status
!=
api
.
ConditionTrue
{
t
.
Errorf
(
"unexpected status: %v - item: %+v"
,
status
,
i
)
}
return
true
,
nil
}
if
err
:=
wait
.
PollImmediate
(
10
*
time
.
Second
,
40
*
time
.
Second
,
f
);
err
!=
nil
{
t
.
Fatalf
(
"error: %v"
,
err
)
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录