AliyunContainerService / pouch

An Efficient Enterprise-class Container Engine
https://pouchcontainer.io
Apache License 2.0
4.64k stars 949 forks source link

feature: cli support add kill command #2924

Closed lang710 closed 2 years ago

lang710 commented 5 years ago

Signed-off-by: Lang Chi 21860405@zju.edu.cn

Ⅰ. Describe what this PR did

cli support add kill command

Ⅱ. Does this pull request fix one issue?

fixes #2917

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

Added

Ⅳ. Describe how to verify it

root@compatibility:~# pouch run -d busybox top df0487e6cc386f9340d27e62ab8a3797e5ccccb5d199bbebb87a0155aa69a84f root@compatibility:~# pouch kill df0487e6cc386f9340d27e62ab8a3797e5ccccb5d199bbebb87a0155aa69a84f df0487e6cc386f9340d27e62ab8a3797e5ccccb5d199bbebb87a0155aa69a84f root@compatibility:~# pouch run -d busybox top 75d8d902f78315b065c41e81a2a9967f7a3edf891c36bd50f36ab3b1691d9c73 root@compatibility:~# pouch kill -s 0 75d8d902f78315b065c41e81a2a9967f7a3edf891c36bd50f36ab3b1691d9c73 Error: {"message":"Invalid signal: 0"}

Ⅴ. Special notes for reviews

codecov[bot] commented 5 years ago

Codecov Report

Merging #2924 into master will decrease coverage by 2.05%. The diff coverage is 51.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2924      +/-   ##
==========================================
- Coverage   68.23%   66.17%   -2.06%     
==========================================
  Files         291      293       +2     
  Lines       18328    18445     +117     
==========================================
- Hits        12506    12206     -300     
- Misses       4368     4761     +393     
- Partials     1454     1478      +24     
Flag Coverage Δ
#criv1alpha2_test 34.59% <0.98%> (-0.24%) :arrow_down:
#integration_test_0 35.99% <51.96%> (-0.08%) :arrow_down:
#integration_test_1 35.80% <0.98%> (+0.30%) :arrow_up:
#integration_test_2 ?
#integration_test_3 35.34% <0.98%> (-0.30%) :arrow_down:
#node_e2e_test 33.94% <0.98%> (-0.42%) :arrow_down:
#unittest 27.78% <0.00%> (-0.21%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
client/container_kill.go 0.00% <0.00%> (ø)
daemon/mgr/container.go 59.10% <ø> (-1.25%) :arrow_down:
pkg/errtypes/errors.go 76.00% <0.00%> (-15.31%) :arrow_down:
daemon/mgr/container_kill.go 43.75% <43.75%> (ø)
pkg/utils/utils.go 82.35% <60.00%> (-0.92%) :arrow_down:
ctrd/container.go 52.37% <68.00%> (-1.93%) :arrow_down:
apis/server/container_bridge.go 88.64% <80.00%> (-1.36%) :arrow_down:
apis/server/router.go 91.56% <100.00%> (+0.05%) :arrow_up:
storage/volume/modules/tmpfs/tmpfs.go 28.20% <0.00%> (-47.44%) :arrow_down:
daemon/events/filter.go 60.00% <0.00%> (-40.00%) :arrow_down:
... and 42 more
ZYecho commented 5 years ago

add more input:https://github.com/alibaba/pouch/issues/2733

pouchrobot commented 5 years ago

ping @lang710 Conflict happens after merging a previous commit. Please rebase the branch against master and push it back again. Thanks a lot.

CLAassistant commented 4 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

cxz66666 commented 2 years ago

ping @lang710 Can you have time to update those questions? Or I will closed this PR. Thank you for your response!

cxz66666 commented 2 years ago

Seem that author doesn't response for a long time, I open another PR but some different details(don't skip hooks), so I will close PR.