This reverts commit a3e46a369f.
There is still problem with static link, built binary will
segmentfault on clearlinux. So revert this patch for now.
Depends-on: github.com/kata-containers/tests#2293
Fixes: #69
Signed-off-by: Yang Bo <bo@hyper.sh>
Since the codes in logging.rs is weakly related to the project,
separating it from the project will reduce coupling and make it reusable.
Fixes: #131
Signed-off-by: Tim Zhang <tim@hyper.sh>
It should restore to it's previous cwd after it
create container in which it would change it's
cwd to container's bundle path.
Fixes: #126
Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
To check is the oci spec passed in, other wise,
it would crash the agent unwrap it directly.
Fixes: #124
Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
This PR removes a function that is never used as the script that is
referring is also non existing at the test repository.
Fixes#113
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
add oci compatibility test case for src/agent/oci/src/lib.rs
follow by Open Container Initiative Runtime Specification
Fixes: #118
Signed-off-by: quanweiZhou <quanweiZhou@linux.alibaba.com>
When using default cc linker, we will have segfault.
Debugging with `rust-gdb`, the specific error is as follows:
src/string/memcpy.c: No such file or directory.
Only changing linker with `aarch64-linux-musl-gcc`, the
`rust-agent` could be totally statically linked and run successfully.
Fixes: #107
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
The __addtf3, __subtf3 and __multf3 symbols are used by aarch64-musl,
but are not provided by rust compiler-builtins.
For now, the only temporary but functional workaround accepted by rust
communities is to get them from libgcc.
Fixes: #107
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Needed by some CI scripts, like release or to verify stable
branches state.
Fixes: #114
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This adds a basic Makefile where we can use a central go test script
in order to run the tests for the CI.
Fixes#109
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
gather job needs to take all build jobs into account, including
building of the experimental kernel and CLH. Added.
Fixes: #103
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
You cannot pass environment variables easily between steps/jobs.
Updated flow to define and set step outputs, and use the outputs of the
corresponding steps later in the flow, rather than env variables (which
never worked correctly - whoops).
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
These are the unit tests for the sandbox struct. This is the summary
of the most important changes:
- To test containers it was needed to create a `LinuxContainer` type
and this requires root privileges. So, some tests now requires root
user to be run.
- There was a bug in the `unset_sandbox_storage` method. The return
type was wrapped in a `Result` to avoid this problem.
Fixes: #50
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@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>
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>
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>
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>
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>
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>
When call "C" func directly, it's needed to change the string to
CString. To avoid using the unsafe calling, replace it with the
rust safe function to set mode for a file/dir.
Signed-off-by: lifupan <lifupan@gmail.com>