Skip to content
This repository was archived by the owner on Apr 3, 2018. It is now read-only.

Commit 711783f

Browse files
author
Sebastien Boeuf
committed
agent: hyperstart: Tear down properly the pod
By using stopPod() to call into DESTROYPOD command, we make sure the pod inside the VM is properly torn down. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
1 parent 42ab5f7 commit 711783f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

hyperstart.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,15 @@ func (h *hyper) startPod(pod Pod) error {
440440

441441
// stopPod is the agent Pod stopping implementation for hyperstart.
442442
func (h *hyper) stopPod(pod Pod) error {
443+
proxyCmd := hyperstartProxyCmd{
444+
cmd: hyperstart.DestroyPod,
445+
message: nil,
446+
}
447+
448+
if _, err := h.proxy.sendCmd(proxyCmd); err != nil {
449+
return err
450+
}
451+
443452
return nil
444453
}
445454

0 commit comments

Comments
 (0)