This repository has been archived by the owner on May 12, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qemu: no state to save if QEMU isn't running
On pod delete, we were looking to read files that we had just deleted. In particular, stopSandbox for QEMU was called (we cleanup up vmpath), and then QEMU's save function was called, which immediately checks for the PID file. Let's only update the persist store for QEMU if QEMU is actually running. This'll avoid Error messages being displayed when we are stopping and deleting a sandbox: ``` level=error msg="Could not read qemu pid file" ``` I reviewed CLH, and it looks like it is already taking appropriate action, so no changes needed. Ideally we won't spend much time saving state to persist.json unless there's an actual error during stop/delete/shutdown path, as the persist will also be removed after the pod is removed. We may want to optimize this, as currently we are doing a persist store when deleting each container (after the sandbox is stopped, VM is killed), and when we stop the sandbox. This'll require more rework... tracked in: kata-containers/kata-containers#1181 Fixes: #1179 Signed-off-by: Eric Ernst <[email protected]>
- Loading branch information