Do not kill all on task delete by default

- Still KillAll if the task uses the hosts pid namespace
 - Test for both host pid namespace and normal cases

Co-authored-by: Oliver Stenbom <ostenbom@pivotal.io>
Co-authored-by: Georgi Sabev <georgethebeatle@gmail.com>
Signed-off-by: Oliver Stenbom <ostenbom@pivotal.io>
This commit is contained in:
Tom Godkin
2018-08-30 15:58:33 +01:00
committed by Oliver Stenbom
parent 0649e38c57
commit b5ccc66c2c
4 changed files with 83 additions and 16 deletions

View File

@@ -249,7 +249,6 @@ func (p *Init) setExited(status int) {
}
func (p *Init) delete(context context.Context) error {
p.KillAll(context)
p.wg.Wait()
err := p.runtime.Delete(context, p.id, nil)
// ignore errors if a runtime has already deleted the process