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>
Commit 89e0dfae11 ("qemu: stop qemu process when virtiofsd quits")
stops sandbox when virtiofsd quits so that virtiofs mount inside guest
won't hang. But commit d5a3d0a61c ("virtiofs: use virtiofsd
--fd=FDNUM") deleted this monitor logic.
Add the Scanner back to monitor virtiofsd's stderr and stop sandbox if
Scanner returns error.
Note that we don't monitor the virtiofsd process itself is because
virtiofsd may be live-upgraded (when available) and the original
process may quit, but virtiofs service is still running.
Fixes: #2315
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
New command-line parameter for firecracker v0.19.0, named `--config-file`,
which represents the path to a file that contains a JSON which can be
used for configuring and starting a microVM without sending any API
requests.
Fixes: #2199
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
func checkVersion could be called anywhere, not always after
DescribeInstance `\` API request, so it should be more independent.
We could also get version number from `firecracker --version` command.
Fixes: #2199
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Since we decide to adopt config file to configure, we could bypass
API Ready state.
Here, we also create a new config ready state: `cfReady`, to represent
configuration part is done.
Fixes: #2199
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Checkout tag for packaging repo based on env variable NEW_VERSION
or kata_version with kata_version taking precedence.
With this, we checkout to the right version of packaging repo before
applying kernel patches.
Fixes#849
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Althought, we changed the script "gen_versions_txt.sh" to accept a tag
rather than a branch, this change is not sufficient.
This script generates the right version file based on a tag, but
function `get_from_kata_deps` does not use this, and ends up using the
master branch instead. This is because this function looks at an env
variable called $BRANCH and ends up using master branch if the variable
is not defined.
Pass the tag/new version to the build scripts, so that this tag is
passed along to `get_from_kata_dep`.
With this change, the correct version information is consumed by the
build scripts for the various hypervisors and kernel.
Fixes#831
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Due to the option '--directory' just added from 'cpio' v2.12, so the
osbuilder will failed with old version 'cpio' before v2.12, such as in
Centos 7 with v2.11.
Fix it by replacing this option with '(cd ...; cat ...)'.
Fixes: #384
Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com>
we need to do patch update for kernel bump to v4.19.86.
Fixes: #806
Depends-on: github.com/kata-containers/runtime#2185
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
I am seeing tests fail at times waiting for label cleanup. Let's improve
the error message when this fails, and give the control plane a bit more
time, to improve stability of this test.
Fixes: #846
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
This will test that is possible to install the obs packages in different
distributions.
Fixes#621
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
While running the build-kernel.sh script with no arguments, the help is
printed twice. This PR will fix that.
Fixes#433
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
If no virtioFsCache type set in configuration file, virtiofsd will
not starts, which makes kata-container start fail if virtio-fs
as its shared file system.
Fixes: #2279
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
Recent runs of setting up aks with github workflows shows that a timeout
of 5m is not always sufficent fot aks control plane to come up.
Increase this from 5m to 10m.
Fixes#839
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
1) pass reference instead of value when possible.
2) simplify code.
3) rename get_device_pci_address() as get_pci_device_address() to keep
consistency get_pci_device_name().
4) refine get_device_name() for maintenance.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Function set_sandbox_storage() is designed to return true when the
reference count drops from 1 to 0. But current implementation always
return true no matter the reference count is, which may cause removing
an in use mountpoint.
Fixes: #88
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Add a standard `SetLogger()` call to allow the `compatoci` package to be
provided a base logger which it can then customise.
Fixes: #2305.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Refine uevent.rs for better maintenance:
1) use dedicated function to handle uevents.
2) use dedicated function to handle blk add events.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.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
Improve loger implementation by:
1) avoid unnecessary clone() operations.
2) change Arc<Mutex<slog::Level>> to Mutex<slog::Level>. We should use
atomic<usize> instead of Mutex<slog::Level> for better performance here.
But with slog_async::Async drainer in the pipeline, RuntimeLevelFilter
drainer will only get from a single-thread context, so keep it as is.
3) minor syntax cleanups.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>