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 <julio.montes@intel.com>
This commit is contained in:
Julio Montes 2019-11-22 20:45:17 +00:00
parent fea166d8eb
commit 336edf75ea

View File

@ -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.