mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-05 23:44:21 +01:00
This PR fixes wrong serialization of OCI state object. OCI hooks end up with a JSON string with double quotes in `state` field. This happens because of confusion `Debug` and `Display` traits. Debug trait returns a string representation with double quotes. Ideally we should not use Debug as a part of serialization process, so a bit more safer fix would be to move container states to `oci` crate and simply disallow wrong values in that field. `ContainerState` in go spec: https://github.com/opencontainers/runtime-spec/blob/master/specs-go/state.go#L4 Fixes: #1404 Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>