From 336edf75eade114d315d6c6bf6436df56d20f868 Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Fri, 22 Nov 2019 20:45:17 +0000 Subject: [PATCH] virtcontainers: honour ContainerConfig struct comment and not save Spec Currently kata-runtime saves the Container OCI Spec even when it's not needed and a comment in `ContainerConfig struct` specifically indicates that it won't be saved to disk. Use '-' as json tag instead of '_' to indicates that `Spec` field shouldn't be saved to disk. fixes #2256 Signed-off-by: Julio Montes --- virtcontainers/container.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtcontainers/container.go b/virtcontainers/container.go index 6f6e160fa4..c890de9afb 100644 --- a/virtcontainers/container.go +++ b/virtcontainers/container.go @@ -252,7 +252,7 @@ type ContainerConfig struct { Resources specs.LinuxResources // Raw OCI specification, it won't be saved to disk. - Spec *specs.Spec `json:"_"` + Spec *specs.Spec `json:"-"` } // valid checks that the container configuration is valid.