Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

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: #1726

Signed-off-by: Hui Zhu <[email protected]>
(cherry picked from commit 7bf6c67)
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
  • Loading branch information
teawater authored and Ganesh Maharaj Mahalingam committed Jun 4, 2019
1 parent 6434414 commit 5eecdae
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 5eecdae

Please sign in to comment.