Commit Graph

10658 Commits

Author SHA1 Message Date
Fabiano Fidêncio
08d10d38be
Merge pull request #7048 from sprt/sprt/fix-gha
gha: Fix gha-run.sh and unbreak CI
2023-06-07 23:40:02 +02:00
James O. D. Hunt
452f286552
Merge pull request #6764 from byron-marohn/fix_5401
kata-ctl: Switch to slog logging; add --log-level and --json-logging arguments
2023-06-07 16:08:53 +01:00
Aurélien Bombo
69668ce87f tests: gha-run: Use correct env variable for repo
s/DOCKER_IMAGE/DOCKER_REPO

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-06-06 11:54:43 -07:00
Aurélien Bombo
f487199edf gha: aks: Fix argument in call to gha-run.sh
Fixes: #7047

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-06-06 11:51:18 -07:00
GabyCT
5ad8aaf9df
Merge pull request #7035 from GabyCT/topic/logparserdoc
log-parser: Update log parser link at README
2023-06-06 12:02:25 -06:00
Fabiano Fidêncio
de2e507483
Merge pull request #6972 from sprt/sprt/gha-run-script
gha: aks: Extract `run` commands to a script
2023-06-06 14:54:03 +02:00
Fabiano Fidêncio
eb1bfa922b
Merge pull request #6980 from nubificus/feat_sharefs_files
runtime-rs: handle copy files when share_fs is not available
2023-06-06 12:26:55 +02:00
Chao Wu
b0c6cd05a2
Merge pull request #7033 from openanolis/fix-agent-ctl
agent-ctl: fix the compile error
2023-06-06 11:55:15 +08:00
Gabriela Cervantes
980d084f47 log-parser: Update log parser link at README
This PR updates the link to the correspondent Developer Guide at the
enabling full containerd debug that we have for kata 2.0 documentation.

Fixes #7034

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-05 15:59:52 +00:00
Yushuo
410bc18143 agent-ctl: fix the compile error
When the version of libc is upgraded to 0.2.145, older getrandom could not adapt
to new API, and this will make agent-ctl fail to compile.

We upgrade the version of `rand`, so the low version of getrandom will no longer
need.

Fixes: #7032

Signed-off-by: Yushuo <y-shuo@linux.alibaba.com>
2023-06-05 21:48:36 +08:00
Jayant Singh
77519fd120 kata-ctl: Switch to slog logging; add --log-level, --json-logging args
Fixes: #5401, #6654

- Switch kata-ctl from eprintln!()/println!() to structured logging via
  the logging library which uses slog.
- Adds a new create_term_logger() library call which enables printing
  log messages to the terminal via a less verbose / more human readable
  terminal format with colors.
- Adds --log-level argument to select the minimum log level of printed messages.
- Adds --json-logging argument to switch to logging in JSON format.

Co-authored-by: Byron Marohn <byron.marohn@intel.com>
Co-authored-by: Luke Phillips <lucas.phillips@intel.com>
Signed-off-by: Jayant Singh <jayant.singh@intel.com>
Signed-off-by: Byron Marohn <byron.marohn@intel.com>
Signed-off-by: Luke Phillips <lucas.phillips@intel.com>
Signed-off-by: Kelby Madal-Hellmuth <kelby.madal-hellmuth@intel.com>
Signed-off-by: Liz Lawrens <liz.lawrens@intel.com>
2023-06-02 20:13:22 +00:00
Aurélien Bombo
aab6030962 gha: aks: Extract run commands to a script
Github Actions reads and runs workflow files from the main branch,
rather than from the PR branch. This means that PRs that modify workflow
files aren't being tested with the updated workflows coming from the PR,
but rather with the old workflows from the main branch. AFAIK, this
behavior isn't avoidable for workflow files (but is for other scripts).

This makes it very hard to reliably test workflow changes before they're
actually merged into main and leads to issues that we have to hotifx
(see #6983, #6995).

This PR aims to mitigate that by extracting the commands used in
workflows to a separate script file. The way our CI is set up, those
script files are read from the PR branch and thus changes would be
reflected in the CI checks.

Fixes: #6971

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-06-02 10:22:35 -07:00
Fupan Li
465f5a5ced
Merge pull request #4748 from lifupan/main_fix
agent: fix the issue of exec hang with a backgroud process
2023-06-02 10:46:43 +08:00
Chao Wu
2128fa2b4e
Merge pull request #7013 from xuejun-xj/xuejun/bugfix
runtime-rs: bugfix: update Cargo.lock
2023-06-02 10:08:27 +08:00
Anastassios Nanos
e4eb664d27 runtime-rs: update rust to 1.69.0
We are probably hitting this:
https://github.com/rust-lang/rust/issues/63033

Seems like it is worth a try to upgrade to 1.69.0

Signed-off-by: Anastassios Nanos <ananos@nubificus.co.uk>
2023-06-01 21:40:56 +00:00
Anastassios Nanos
ed37715e05 runtime-rs: handle copy files when share_fs is not available
In hypervisors that do not support virtiofs we have to copy files in
the VM sandbox to properly setup the network (resolv.conf, hosts, and hostname).

To do that, we construct the volume as before, with the addition of an extra
variable that designates the path where the file will reside in the sandbox.

In this case, we issue a `copy_file` agent request *and* we patch the spec
to account for this change.

Fixes: #6978

Signed-off-by: Anastassios Nanos <ananos@nubificus.co.uk>
Signed-off-by: George Pyrros <gpyrros@nubificus.co.uk>
2023-06-01 21:40:56 +00:00
Fabiano Fidêncio
18b1a019d4
Merge pull request #7011 from jepio/fix-aks-cluster-name
gha: aks: Use short SHA in cluster name
2023-06-01 15:56:20 +02:00
Fabiano Fidêncio
5ab42d87fb
Merge pull request #7009 from fidencio/topic/display-badge-for-the-publish-artefacts-job
README: Display badge for the "Publish Artefacts" job and update the Kata Containers logo
2023-06-01 15:13:41 +02:00
Fabiano Fidêncio
eb1f44f111
Merge pull request #7007 from fidencio/topic/try-to-fix-ubuntu-k8s-key-not-available
kata-deploy: Change how we get the Ubuntu k8s key
2023-06-01 15:13:22 +02:00
xuejun-xj
5f6fc3ed76 runtime-rs: bugfix: update Cargo.lock
When dragonball update dbs-boot crate in commit
64c764c147, the Cargo.lock in runtime-rs
should also be updated.

Fixes: #6969

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
2023-06-01 20:25:35 +08:00
Jeremi Piotrowski
1c6d22c803 gha: aks: Use short SHA in cluster name
Full SHA is 40 characters, while AKS cluster name has a limit of 63. Trim the
SHA to 12 characters, which is widely considered to be unique enough and is
short enough to be used in the cluster name

Fixes: #7010
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-06-01 14:03:53 +02:00
Fabiano Fidêncio
3c1f6d36dc readme: Update Kata Containers logo
Let's use the horizontal logo, as it occupies better the space the we
have.

The logo comes from:
https://openinfra.dev/brand/logos

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-06-01 12:25:13 +02:00
Fabiano Fidêncio
3886841131 readme: Add status badge for the "Publish Artefacts" job
Let's start adding the status of our jobs as part of our main page, so
folks monitoring those can easily check whether they're okay, or if
someone has to be pinged about those.

Fixes: #7008

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-06-01 12:25:01 +02:00
Fabiano Fidêncio
26f7520387 kata-deploy: Change how we get the Ubuntu k8s key
The current method has been failing every now and then, and was reported
on https://github.com/kubernetes/release/issues/2862.

Ding poked me and suggested to do this change here, so here we go. :-)

Fixes: #7006

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-06-01 12:10:30 +02:00
Fabiano Fidêncio
9ec2bca101
Merge pull request #7002 from fidencio/topic/follow-up-on-7000
gha: aks: Ensure host_os is used everywhere needed
2023-06-01 08:51:27 +02:00
Fabiano Fidêncio
8cbb80da66
Merge pull request #6929 from LindaYu17/dev
kubernetes: add agnhost command in pod yaml
2023-06-01 08:39:58 +02:00
Fabiano Fidêncio
aebd3b47d9 gha: aks: Ensure host_os is used everywhere needed
We added that to create the cluster name, but I forgot to add that to
the part we get the k8s config file, or to the part where we delete the
AKS cluster.

Fixes: #6999

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-31 20:50:55 +02:00
Fabiano Fidêncio
e01f75723a
Merge pull request #6997 from singhwang/main
main | release: Standardize kata static file name
2023-05-31 15:22:30 +02:00
Fabiano Fidêncio
1ed917a079
Merge pull request #6989 from BbolroC/configurable-build-registry
packaging: make BUILDER_REGISTRY configurable
2023-05-31 15:18:51 +02:00
Fabiano Fidêncio
de22783124
Merge pull request #7000 from fidencio/topic/use-a-different-name-for-the-ubuntu-and-mariner-aks-clusters
gha: aks: Add the host_os as part of the aks cluster's name
2023-05-31 15:18:17 +02:00
Archana Shinde
141c26f307
Merge pull request #6985 from amshinde/kernel-tdx-build
kernel: Modify build-kernel.sh to accomodate for changes in version.yaml
2023-05-31 01:57:20 -07:00
Fabiano Fidêncio
0c8282c224 gha: aks: Add the host_os as part of the aks cluster's name
We need to do so, otherwise we'll create two clusters for testing Cloud
Hypervisor with exactly the same name, one using Ubuntu, and one using
Mariner.

Fixes: #6999

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-31 05:20:04 +02:00
SinghWang
4b89a6bdac release: Standardize kata static file name
The string representing the architecture aarch64 and x86_64 need to be changed to arm64 and amd64 for the release.

Fixes: #6986
Signed-off-by: SinghWang <wangxin_0611@126.com>
2023-05-31 10:24:45 +08:00
Fabiano Fidêncio
51e42a9972
Merge pull request #6995 from sprt/sprt/fix-mariner-ci
gha: Fix Mariner cluster creation
2023-05-31 00:23:36 +02:00
Archana Shinde
9228815ad2 kernel: Modify build-kernel.sh to accomodate for changes in version.yaml
There were recent changes for the tdx kernel in the version.yaml that are
not currently accounted for in the build-kernel.sh script.
Attempts to setup a tdx kernel to build local changes seemed to not download
the tdx kernel. Instead the mainline kernel is downloaded which has no
tdx-related changes.

The version.yaml has a new entry for tdx kernel. Use that instead for
setting up and downloading the tdx kernel.

Fixes: #6984

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-05-30 13:44:58 -07:00
Aurélien Bombo
03027a7399 gha: Fix Mariner cluster creation
While the Mariner Kata host is in preview, we need the `aks-preview`
extension to enable the `--workload-runtime KataMshvVmIsolation` flag.

Fixes: #6994

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-05-30 13:26:49 -07:00
Hyounggyu Choi
43e73bdef7 packaging: make BUILDER_REGISTRY configurable
This PR is to make an environment variable `BUILDER_REGISTRY` configurable
so that those who want to use their own registry for build can set up
the registry.

Fixes: #6988
Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-05-30 14:40:02 +02:00
Fabiano Fidêncio
2e2d7243d2
Merge pull request #6983 from sprt/sprt/fix-gha-ci
gha: Unbreak CI and fix cluster creation step
2023-05-30 12:58:10 +02:00
Zhongtao Hu
8b6cb2cd75
Merge pull request #6806 from xuejun-xj/xuejun/vcpuhotplug
Dragonball: support vcpu hotplug on aarch64
2023-05-30 18:47:50 +08:00
xuejun-xj
ffe3157a46 dragonball: add arm64 patches for upcall
The vcpu hotplug/hotunplug feature is implemented with upcall. This commit
add three patches to support the feature on aarch64. Patches:
> 0005: add support of upcall on aarch64
> 0006: skip activate offline cpus' MSI interrupt
> 0007: set the correct boot cpu number

Fixes: #6010

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
2023-05-30 15:51:08 +08:00
xuejun-xj
560442e6ed dragonball: add vcpu_boot_onlined vector
This commit implements the vcpu_boot_onlined vector in get_fdt_vm_info.

"boot_enabled" means whether this vcpu should be onlined at first boot.
It will be used by fdt, which write an attribute called boot_enabled,
and will be handled by guest kernel to pass the correct cpu number to
function "bringup_nonboot_cpus".

Fixes: #6010

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
2023-05-30 15:51:08 +08:00
xuejun-xj
e31772cfea dragonball: add support resize_vcpu on aarch64
This commit add support of resize_vcpu on aarch64. As kvm will check
whether vgic is initialized when calling KVM_CREATE_VCPU ioctl, all the
vcpu fds should be created before vm is booted.

To support resizing vcpu scenario, we use max_vcpu_count for
create_vcpus and setup_interrupt_controller interfaces. The
SetVmConfiguration API will ensure max_vcpu_count >= boot_vcpu_count.

Fixes: #6010

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
2023-05-30 15:51:08 +08:00
xuejun-xj
64c764c147 dragonball: update dbs-boot to v0.4.0
dbs-boot-v0.4.0 refectors the create_fdt interface. It simplifies the
parameters needed to be passed and abstracts them into three structs.

By the way, it also reserves some interfaces for future feature: numa
passthrough and cache passthrough.

Fixes: #6969

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
2023-05-30 15:51:08 +08:00
xuejun-xj
fd9b414646 dragonball: update comment for init_microvm
Rewrite the comment of Vm::init_microvm method for aarch64.

Fixes cargo test warnings on aarch64.

Fixes: #6969

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
2023-05-30 15:51:08 +08:00
Aurélien Bombo
af16d3fca4 gha: Unbreak CI and fix cluster creation step
This fixes the regression introduced by #6686 by properly injecting the
`--os-sku mariner --workload-runtime KataMshvVmIsolation` flags.

Error reference:
https://github.com/kata-containers/kata-containers/actions/runs/5111460297/jobs/9188819103

Fixes: #6982

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-05-29 13:32:47 -07:00
Zhongtao Hu
099b4b0d0e
Merge pull request #6598 from Apokleos/sandbox_bind_mounts
runtime-rs/sandbox_bindmounts: add support for sandbox bindmounts
2023-05-28 12:00:39 +08:00
Zhongtao Hu
cb962b0dc9
Merge pull request #6702 from Apokleos/directvol-common
runtime-rs/kata-ctl: Enhancement of DirectVolumeMount.
2023-05-28 12:00:12 +08:00
Fabiano Fidêncio
44546a4a57
Merge pull request #6686 from sprt/sprt/mariner-ci
gha: Create Mariner host as part of k8s tests
2023-05-27 05:34:28 +02:00
alex.lyn
5ddc4f94c5 runtime-rs/kata-ctl: Enhancement of DirectVolumeMount.
Move the get_volume_mount_info to kata-types/src/mount.rs.
If so, it becomes a common method of DirectVolumeMountInfo
and reduces duplicated code.

Fixes: #6701

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
2023-05-26 11:18:29 +08:00
Fupan Li
25d2fb0fde agent: fix the issue of exec hang with a backgroud process
When run a exec process in backgroud without tty, the
exec will hang and didn't terminated.

For example:

crictl -i <container id> sh -c 'nohup tail -f /dev/null &'

Fixes: #4747

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
2023-05-26 10:56:46 +08:00