Skip to content

Commit

Permalink
cache: Call vm.Disconnect() when close vm
Browse files Browse the repository at this point in the history
After previous commit, found that kata-proxy is not quit
when vmcache server is stopped by ctrl-c.
The cause is current kata-proxy is setsid when it exec.  It will
not get the signal ctrl-c.

Call vm.Disconnect() when close vm in cache factory to handle
this issue.

Fixes: kata-containers#1726

Signed-off-by: Hui Zhu <[email protected]>
  • Loading branch information
teawater committed May 23, 2019
1 parent 19115ef commit 7bf6c67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions virtcontainers/factory/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func New(ctx context.Context, count uint, b base.FactoryBase) base.FactoryBase {
case <-closed:
c.removeFromVmm(vm)
vm.Stop()
vm.Disconnect()
c.wg.Done()
return
}
Expand Down

0 comments on commit 7bf6c67

Please sign in to comment.