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

Add --all flag to kill #1180

Merged
merged 1 commit into from
Nov 9, 2016
Merged

Conversation

crosbymichael
Copy link
Member

This allows a user to send a signal to all the processes in the
container within a single atomic action to avoid new processes being
forked off before the signal can be sent.

This is basically taking functionality that we already use being
delete and exposing it ok the kill command by adding a flag.

Signed-off-by: Michael Crosby crosbymichael@gmail.com

@dqminh
Copy link
Contributor

dqminh commented Nov 8, 2016

LGTM

Approved with PullApprove

@datawolf
Copy link
Contributor

datawolf commented Nov 8, 2016

I think it will be better to update the manual for the new flag at the same time.

@WeiZhang555
Copy link
Contributor

Also the bash completions 😜

@cyphar
Copy link
Member

cyphar commented Nov 8, 2016

I may be confused, but doesn't killing the init of a container guarantee that the container will die? How can a pidns survive without an init?

@rhatdan
Copy link
Contributor

rhatdan commented Nov 8, 2016

If you are sharing the host pid namespace or the pid namespace of another container, it will not kill all processes.

@crosbymichael
Copy link
Member Author

@cyphar ya, what @rhatdan said. This expose the logic we already use on delete to signal as well so you can make atomic operations on containers that are sharing the pidns.

I'll update the man pages and completions for this today.

This allows a user to send a signal to all the processes in the
container within a single atomic action to avoid new processes being
forked off before the signal can be sent.

This is basically taking functionality that we already use being
`delete` and exposing it ok the `kill` command by adding a flag.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
@crosbymichael
Copy link
Member Author

I updated the completions and man pages for this new flag.

@dqminh
Copy link
Contributor

dqminh commented Nov 8, 2016

LGTM

Approved with PullApprove

1 similar comment
@mrunalp
Copy link
Contributor

mrunalp commented Nov 9, 2016

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit 5137186 into opencontainers:master Nov 9, 2016
@crosbymichael crosbymichael deleted the kill-all branch November 9, 2016 21:28
runcom added a commit to projectatomic/runc that referenced this pull request Nov 17, 2016
Fix BZ#1391665
Upstream reference: opencontainers/runc#1180

Signed-off-by: Antonio Murdaca <runcom@redhat.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.

8 participants