Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add exec timeout support #2946

Merged
merged 1 commit into from
Jul 17, 2019

Conversation

ZYecho
Copy link
Contributor

@ZYecho ZYecho commented Jul 11, 2019

Signed-off-by: zhangyue zy675793960@yeah.net

Ⅰ. Describe what this PR did

if exec hang, we need a way to to clean up the resource.
use ctx to judge if timeout, if happen,try to kill with SIGKILL first, then try to kill with SIGTERM

Ⅱ. Does this pull request fix one issue?

fix #2916

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

wait for CI

Ⅳ. Describe how to verify it

wait for CI

Ⅴ. Special notes for reviews

None

@codecov
Copy link

codecov bot commented Jul 11, 2019

Codecov Report

Merging #2946 into master will decrease coverage by 8.33%.
The diff coverage is 84.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2946      +/-   ##
==========================================
- Coverage   68.25%   59.92%   -8.34%     
==========================================
  Files         291      291              
  Lines       18347    18351       +4     
==========================================
- Hits        12523    10997    -1526     
- Misses       4366     5929    +1563     
+ Partials     1458     1425      -33
Flag Coverage Δ
#criv1alpha2_test 34.77% <63.15%> (+0.01%) ⬆️
#integration_test_0 ?
#integration_test_1 35.47% <63.15%> (-0.08%) ⬇️
#integration_test_2 ?
#integration_test_3 ?
#node_e2e_test ?
#unittest 27.95% <0%> (-0.01%) ⬇️
Impacted Files Coverage Δ
daemon/mgr/container.go 45.28% <ø> (-15.03%) ⬇️
cri/v1alpha2/cri.go 55.87% <0%> (-8.41%) ⬇️
cri/stream/runtime.go 67.85% <0%> (ø) ⬆️
apis/server/exec_bridge.go 55.81% <100%> (-8.14%) ⬇️
daemon/mgr/container_exec.go 78.04% <100%> (-1.63%) ⬇️
ctrd/container.go 42.5% <87.87%> (-11.42%) ⬇️
daemon/logger/logmessage.go 0% <0%> (-100%) ⬇️
hookplugins/containerplugin/update_hook.go 0% <0%> (-100%) ⬇️
cri/stream/remotecommand/websocket.go 0% <0%> (-81.54%) ⬇️
daemon/mgr/container_stats.go 0% <0%> (-71.35%) ⬇️
... and 75 more

ctrd/container.go Outdated Show resolved Hide resolved
@ZYecho ZYecho force-pushed the add-exec-timeout branch 4 times, most recently from 14fac8c to 98da71a Compare July 11, 2019 12:57
ctrd/container.go Outdated Show resolved Hide resolved
ctrd/container.go Outdated Show resolved Hide resolved
ctrd/container.go Outdated Show resolved Hide resolved
Signed-off-by: zhangyue <zy675793960@yeah.net>
@ZYecho
Copy link
Contributor Author

ZYecho commented Jul 17, 2019

@fuweid @zhuangqh PTAL

Copy link
Contributor

@zhuangqh zhuangqh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhuangqh zhuangqh merged commit 7dd5daf into AliyunContainerService:master Jul 17, 2019
@ZYecho ZYecho deleted the add-exec-timeout branch July 20, 2019 02:28
Ace-Tang pushed a commit that referenced this pull request Aug 20, 2019
Signed-off-by: zhangyue <zy675793960@yeah.net>
(cherry pick from #2946)

Signed-off-by: huaihuan.zy <huaihuan.zy@alibaba-inc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] exec with timeout
4 participants