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>
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>
It's should use string.eq() to match option's
key words exactly instead of using string.starts_with()
for single key options and for "key=value" options it's
bettet to match "key=" instead of "key" with string.starts_with()
which would match wrongly such as passed options "agent.log_vsock"
which would match "agent.log" with string.starts_with()
and trigger parsing issues.
Fixes: #96
Signed-off-by: lifupan <lifupan@gmail.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>
Try to move all the common bash logic from the actions toml file
to separate scripts and call these scripts instead.
Note the repo itself is now checked out to get access to
these scripts.
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
Once kata-deploy completes successfully, this job will upload
kata static tarball to the release page using GIT_UPLOAD_TOKEN
secret.
Signed-off-by: Jose Carlos Venegas Munoz<jose.carlos.venegas.munoz@intel.com>
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
For now, we will encounter `failed to get available address from
bridges` error when launching kata containers from cache factory.
Although we've already passed bridges info to clients from cache factory
server, we still missed the setting part when creating vm.
Fixes: #2272
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
For now, when we're using cache factory to launch kata containers,
we would encounter nil pointer runtime panic.
Fixes: #2272
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Many changes introduced by Archana Shinde.
This workflow will:
1. get a list of artifacts from the packaging repo
2. In parallel, build each of the applicable artifacts
3. Consolidate the build artifacts from <2>
4. Test the artifacts in a docker image on AKS
5. Push the verified docker image to dockerhub
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
Signed-off-by: Archana Shinde <archana.m.shinde@intel.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>