Skip to content

Commit

Permalink
virtcontainers: honour ContainerConfig struct comment and not save Spec
Browse files Browse the repository at this point in the history
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 kata-containers#2256

Signed-off-by: Julio Montes <julio.montes@intel.com>
  • Loading branch information
Julio Montes committed Nov 22, 2019
1 parent fea166d commit 336edf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virtcontainers/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 336edf7

Please sign in to comment.