containers / virtcontainers

A Go package for building hardware virtualized container runtimes
Apache License 2.0
139 stars 43 forks source link

pod: Improve pod stop/delete sequence #482

Closed sboeuf closed 7 years ago

sboeuf commented 7 years ago

This PR first improves the way the tear down of the pod is performed from the agent. Until now, nothing was done and the VM was stopped without tearing down properly the things previously set up inside the VM. Then, it modifies the QEMU implementation for the stopPod() method, by not waiting for the VM to exit. Instead, it send a SHUTDOWN through QMP but it does not wait for the VM since there is really nothing it can do.

sboeuf commented 7 years ago

This PR is blocked by https://github.com/clearcontainers/agent/pull/158 and https://github.com/clearcontainers/agent/pull/160 to be merged in order to behave properly.

sameo commented 7 years ago

LGTM

Approved with PullApprove Approved with PullApprove

sboeuf commented 7 years ago

@sameo Now everything is passing! I'd like you to give this a second review since I have added patches to solve the issue introduced by the fact we're not waiting for the end of the VM anymore.

mcastelino commented 7 years ago

@amshinde @sameo @sboeuf the only worry I have with this change is disk cache flushes when using virtio-blk. @amshinde do we do a flush in the VM prior to shutdown? It would be prudent to ensure we do flush before we tore down the VM.

mcastelino commented 7 years ago

@sboeuf thanks for https://github.com/clearcontainers/agent/pull/169

LGTM

sameo commented 7 years ago

LGTM