Instead of build a command, use Cloud Hypervisor http API.
Fixes: #2165
Signed-off-by: Bo Chen <chen.bo@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
dep ensure to update new deps from openapi client
golang.org/x/oauth2
Signed-off-by: Bo Chen <chen.bo@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
cloud-hypervisor provides an API server to send commands
in a qmp and Firecracker style over an Unix socket.
The API is defined via OpenAPI, this commit adds
scripts to help to generate a client using:
https://github.com/OpenAPITools/openapi-generator
This will make easy to update any change related with the API
in the future.
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
We can use map from Source to Mount as ignoredMounts representation.
Inner loop in kataAgent#removeIgnoredOCIMount is removed.
Fixes#2299
Signed-off-by: Ted Yu yuzhihong@gmail.com
tabs should only appear in rules, not in ifeq/ifneq blocks
(since otherwise make can get very confused on error).
Signed-off-by: Julio Montes <julio.montes@intel.com>
Emacs (the good and infalible text editor) detects a suspicious line in
Makefile, this line contains both space and tab (something that could be
introduced by a less sophisticated text editor) that is not correct
for a Makefile.
fixes#2286
Signed-off-by: Julio Montes <julio.montes@intel.com>
- added clh unit tests
- removed some inconsistencies in the cli builder to enable unit tests
- suppressed version check for in startSandbox to enable unit tests
- added clh related constants and methods to virtcontainer test
- small corrections after review applied
Fixes: #2205
Signed-off-by: Johan Kuijpers <johan.kuijpers@ericsson.com>
Don't hot add again non-running container resources to avoid having extra
and useless resources
fixes#2186
Signed-off-by: Julio Montes <julio.montes@intel.com>
GetOCISpec returns a patched version of the original OCI spec, it was modified
to support:
* capabilities
* Ephemeral storage
* k8s empty dir
In order to avoid consusions and make api clear, rename GetOCISpec
to GetPatchedOCISpec and ContainerConfig.Spec to ContainerConfig.CustomSpec
fixes#2252
Signed-off-by: Julio Montes <julio.montes@intel.com>
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>
BlockIndex should not increment in case of error.
Similar issue applies to decrementSandboxBlockIndex where the symptom may be more severe - in worst case, the block index may become negative.
Fixes#2244
Signed-off-by: Ted Yu <yuzhihong@gmail.com>