Commit Graph

12261 Commits

Author SHA1 Message Date
Greg Kurz
bc4c66caaf release: Migrate tag_repos.sh to GitHub CLI
The hub tool is deprecated. Convert this script to use the
official GitHub CLI gh instead of hub.

A typical gh setup is able to access repos using HTTPS along with
GitHub credentials. It is only needed to patch the remote url when
using SSH.

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-10-31 15:11:28 +01:00
Greg Kurz
e331102ba3 release: Migrate update-repository-version.sh to GitHub CLI
The hub tool is deprecated. Convert this script to use the
official GitHub CLI gh instead of hub.

A couple of adjustments had to be made :
- the notes.md temporary file is moved to ${tmp_dir} in order to silent gh,
  otherwise it complains about an untracked file,
- title of a PR no longer goes to the notes.md file since gh requires the
  title to be passed with a dedicated --title option.

Fixes #8303

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-10-31 15:10:50 +01:00
Greg Kurz
b83a7149ee release: Introduce helper to get GitHub CLI
If gh isn't installed already, download it from GitHub.

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-10-31 15:09:24 +01:00
Fabiano Fidêncio
53cda12a71
Merge pull request #8311 from TimePrinciple/log-system-enhancement
runtime-rs: Log system enhancement
2023-10-31 10:14:41 +01:00
Greg Kurz
ceeabe3714 release: Allow to test release scripts with an alternate repo
We don't want to mess with the official repo when testing a change
in the release scripts. Adapt `update-repository-version.sh` to
be able to use an alternate repo just like `tag_repos.sh` already
does.

This means that the following command :

$ OWNER="$SOME_ORG" ./update-repository-version.sh -p "$NEW_VERSION" "$BRANCH"

will only create a PR in this repo :

http://github.com/$SOME_ORG/kata-containers.git

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-10-31 09:49:27 +01:00
Archana Shinde
148c565b2f
Merge pull request #8289 from BbolroC/skip-create-tmpfs-s390x
agent: Skip flaky create_tmpfs on s390x
2023-10-30 22:26:28 -07:00
Ruoqing He
4ad2cfe0c2 runtime-rs: Log system enhancement
By modifying RuntimeLevelFilter drain to improve logging control,
enabling isolation of change effect of the loggers between components,
tuning clh logs to be logged according to their log levels
given by cloud-hypervisor.

Fixes: #8310

Signed-off-by: Ruoqing He <linuxwatcher@outlook.com>
2023-10-31 04:57:46 +00:00
David Esparza
2a17d3889e
Merge pull request #8334 from amshinde/ipvlan-nerdctl-fix
network: Fix network attach for ipvlan and macvlan
2023-10-30 16:00:32 -06:00
David Esparza
5573705800
Merge pull request #8202 from dborquez/enable_fio_checkmetrics
Enable fio checkmetrics
2023-10-30 15:55:37 -06:00
David Esparza
c232869af9
metrics: removes double-quotes in checkemtrics when parsing results
This PR removes double quotes in jq output to return raw strings
as input of checkmetrics tool.

Fixes: #8331

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-10-30 09:43:03 -06:00
David Esparza
c42a2f2eda
metrics: increase the number of attempts to stop kata
This PR increases the number of attempts to stop kata components
when it is required usually before starting a metrics test.

Fixes: #8307

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-10-30 09:43:03 -06:00
David Esparza
1626253d9e
metrics: FIO ci test enablement
This PR enables the new FIO test based on the containerd client
which is used to track the I/O metrics in the kata-ci environment.

Additionally this PR fixes the parsing of results.

Fixes: #8199

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-10-30 09:42:54 -06:00
David Esparza
873386a349
metrics: update iodepth and job size fio parameters to improve workload
This PR updates the values of the fio parameters for iodepth
requests and for the number of jobs, in order to increase the
number of sequential operations.

Additionally, it adds the list of packages needed to parse the
results.

Fixes: #8198

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-10-30 08:43:06 -06:00
James O. D. Hunt
d93275224b
Merge pull request #8323 from jodh-intel/utils-kata-manager-fix-version-checks
utils: kata manager: Fix version checks
2023-10-30 12:25:51 +00:00
Chao Wu
7d26604061
Merge pull request #7831 from lisongqian/feat/dragonball_trace
dragonball: add tracing feature for dragonball
2023-10-30 17:27:30 +08:00
James O. D. Hunt
d7e410ad2b
Merge pull request #8314 from jodh-intel/kata-ctl-show-confidential-guest
kata-runtime/kata-ctl: Add security details to output
2023-10-30 07:41:22 +00:00
Songqian Li
2f533c3003 dragonball: add tracing feature for dragonball
This PR adds the tracing capability for dragonball and it depends on the tracing::Subscriber of the upper layer.

Fixes: #7249

Signed-off-by: Songqian Li <mail@lisongqian.cn>
2023-10-28 19:52:24 +08:00
Chao Wu
f1f4410537
Merge pull request #7695 from lisongqian/feat/legacy_metrics
dragonball: add metrics support for legacy device
2023-10-28 16:48:57 +08:00
Archana Shinde
f53f86884f network: Fix network attach for ipvlan and macvlan
We used the approach of cold-plugging network interface for pre-shimv2
support for docker.Since the hotplug approach was not required,
we never really got to implementing hotplug support for certain network
endpoints, ipvlan and macvlan being among them.

Since moving to shimv2 interface as the default for
runtime, we switched to hotplugging the network interface for supporting
docker and nerdctl. This was done for veth endpoints only.

Implement the hot-attach apis for ipvlan and macvlan as well to support
ipvlan and macvlan networks with docker and nerdctl.

Fixes: #8333

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-10-27 21:42:37 -07:00
Peng Tao
52a014d9cd
Merge pull request #8033 from h56983577/6715/shared-mount
agent: use open_tree()/move_mount() to set up bind mounts between containers directly.
2023-10-28 10:57:34 +08:00
Songqian Li
da77b19449 dragonball: output legacy device metrics to runtime
Legacy device manager adds device metrics to METRICS when a device is created and removes metrics when a device is dropped.

Fixes: #7248

Signed-off-by: Songqian Li <mail@lisongqian.cn>
2023-10-27 14:09:42 +08:00
Songqian Li
65213e9fbe dragonball: unify the metric interface of legacy device
Fixes: #7248

Signed-off-by: Songqian Li <mail@lisongqian.cn>
2023-10-27 14:09:42 +08:00
Chao Wu
b508091305
Merge pull request #8322 from wainersm/git_helper-fix
tests/git-helper: cancel any previous rebase left halfway
2023-10-27 14:07:16 +08:00
Spencer von der Ohe
fee97e219c docs: Fix Dragonball link
Update dragonball link to be the current repo (from archived repo)

Fixes #8324

Signed-off-by: Spencer von der Ohe <s.vonderohe40@gmail.com>
2023-10-26 21:12:31 -06:00
Archana Shinde
f5c17f89a3
Merge pull request #8250 from amshinde/runtime-rs-clh-config
runtime-rs: Add default configuration file for cloud-hypervisor
2023-10-26 14:54:47 -07:00
Chelsea Mafrica
0608e20a01 docs: Fix broken links
Update broken links so that static checks pass.

Fixes #8254

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-10-26 10:17:01 -07:00
Chelsea Mafrica
4ede63fa4d
Merge pull request #8317 from cmaf/gha-spellcheck-reqs
gha: add dependencies for spell checker
2023-10-26 10:11:26 -07:00
James O. D. Hunt
ae3ea1421d utils: kata-manager: Fix containerd version check
Contained release files include the version number without a "v" prefix.
However, the tag for the equivalent release does include it so handle
this distinction and also tighten up the Kata check by specifying an
explicit version number in the regex.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-10-26 16:34:56 +01:00
James O. D. Hunt
346f195532 utils: kata-manager: Fix whitespace
Use tabs consistently.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-10-26 16:06:51 +01:00
Wainer dos Santos Moschetta
0ce0abffa6 tests/git-helper: cancel any previous rebase left halfway
In bare-metal machines the git tree might get on unstable state with the
previous rebase left halfway. So let's attempt to abort any rebase before.

Fixes #8318
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2023-10-26 11:50:12 -03:00
James O. D. Hunt
2ac7ac1dd2 utils: kata-manager: Fix "Cannot determine download URL" issue
The archive names for x86_64 [Kata releases](https://github.com/kata-containers/kata-containers/releases)
used to include the tag `x86_64`, but that has now been changed to
`amd64`, which unfortunately broke `kata-manager.sh`:

```
kata-static-3.1.3-x86_64.tar.xz
                  ~~~~~~
                  expected

kata-static-3.2.0-alpha3-x86_64.tar.xz
                         ~~~~~~
                         expected

kata-static-3.2.0-alpha4-amd64.tar.xz
                         ~~~~~
                         changed
```

Fixes: #8321.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-10-26 15:27:37 +01:00
James O. D. Hunt
59bd534827 utils: kata-manager: Lint fixes
Improve the code by fixing some lint issues:

- defining variables before using them.
- Using `grep -E` rather than `egrep`.
- Quoting variables.
- Adding a check for invalid CLI arguments.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-10-26 15:24:46 +01:00
HanZiyao
a3b003c345 agent: support bind mounts between containers
This feature supports creating bind mounts directly between containers through annotations.

Fixes: #6715

Signed-off-by: HanZiyao <h56983577@126.com>
2023-10-26 16:34:50 +08:00
Archana Shinde
1b8ec08278
Merge pull request #8281 from amshinde/add-clh-config-kata-manager
kata-manager: Add clh config to containerd config file
2023-10-25 13:44:53 -07:00
Chelsea Mafrica
c20aadd7a8 gha: add dependencies for spell checker
In the migration from the tests repo to the kata containers repo we
missed two huspell dictionaries for static checks; add them.

Fixes #8315

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-10-25 12:49:09 -07:00
James O. D. Hunt
d707fa2c0d kata-runtime/kata-ctl: Add security details to output
Add the hypervisor security details to the output of the `kata-runtime
env` and `kata-ctl env` commands so the user can see, amongst other
things, the value of `confidential_guest`.

Fixes: #8313.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-10-25 16:34:42 +01:00
Chao Wu
29d863350f
Merge pull request #7697 from lisongqian/feat/balloon_metrics
dragonball: add metrics support for balloon device
2023-10-25 02:42:14 -05:00
Fabiano Fidêncio
328ba0da99
Merge pull request #7647 from jongwu/use_pcie_virt
AArch64: runtime: use pcie root port to do pci/pcie device hotplug
2023-10-25 09:17:13 +02:00
Archana Shinde
f99de4d5a1 runtime-rs: Make default kernel params as empty
The default kernel params passed to any hypervisor except dragonball is
empty.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-10-24 15:50:12 -07:00
Archana Shinde
a813012785 runtime-rs: Add default configuration file for clouf-hypervisor
The config template file for clh is in the new format for runtime-rs.
It is a result of merging the new format file and options supportted by
cloud-hypervisor.

Some config options from the golang runtime are missing as they may not
be currently supported by the rust runtime. An example of this is the
selinux options, rate limiting options as these are not currently
supported or verified with the rust runtime.

Fixes: #8249

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-10-24 15:17:24 -07:00
Chao Wu
43675bd485
Merge pull request #8294 from ZizhengBian/jason/for-master
runtime-rs: fix a typo in device manager
2023-10-24 04:52:04 -05:00
Songqian Li
dce365d5b4 dragonball: add conditional compilation for BalloonDeviceMetrics
Fixes: #7248

Signed-off-by: Songqian Li <mail@lisongqian.cn>
2023-10-24 13:33:39 +08:00
GabyCT
4c3a664358
Merge pull request #8278 from GabyCT/topic/udpparallel
metrics: Add parallel udp iperf3 benchmark
2023-10-23 10:30:53 -06:00
Fabiano Fidêncio
a001021721
Merge pull request #8292 from fidencio/topic/release-ensure-gh-is-used-from-a-git-repo
release: Always use actions/checkout to ensure we're in a git repo
2023-10-23 15:16:12 +02:00
Songqian Li
3819f0ee6f dragonball: output balloon device metrics to runtime
Balloon device manager adds balloon device metrics to METRICS when a device is created and remove metrics when a device is dropped.

Fixes: #7248

Signed-off-by: Songqian Li <mail@lisongqian.cn>
2023-10-23 21:15:22 +08:00
Zizheng Bian
7d7c25c1d6 runtime-rs: fix a typo in device manager
Fixes: #8293
Signed-off-by: Zizheng Bian <zizheng.bian@linux.alibaba.com>
2023-10-23 20:33:47 +08:00
Fabiano Fidêncio
c5cfad7023 actions: Move all the checkout actions to v4
It's been released for a while now, and we need to keep consistency
between what we used.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-10-23 14:01:53 +02:00
Fabiano Fidêncio
b32c6bf805 release: Always use actions/checkout to ensure we're in a git repo
Otherwise we'll face issues like:
```
Run tag=$(echo $GITHUB_REF | cut -d/ -f3-)
  tag=$(echo $GITHUB_REF | cut -d/ -f3-)
  tarball="kata-static-$tag-amd64.tar.xz"
  mv kata-static.tar.xz "$GITHUB_WORKSPACE/${tarball}"
  pushd $GITHUB_WORKSPACE
  echo "uploading asset '${tarball}' for tag: ${tag}"
  GITHUB_TOKEN=*** gh release upload "${tag}" "${tarball}"
  popd
  shell: /usr/bin/bash -e {0}
~/work/kata-containers/kata-containers ~/work/kata-containers/kata-containers
uploading asset 'kata-static-3.3.0-alpha0-amd64.tar.xz' for tag: 3.3.0-alpha0
failed to run git: fatal: not a git repository (or any of the parent directories): .git
```

Fixes: #8286 (or better, just a follow up of that)

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-10-23 14:00:39 +02:00
Fabiano Fidêncio
8fe88696c0
Merge pull request #8287 from fidencio/topic/release-use-gh-cli-instead-of-hub
actions: release: Use GH cli instead of hub
2023-10-23 12:40:22 +02:00
Hyounggyu Choi
a0746c8d7b agent: Skip flaky create_tmpfs on s390x
This is to skip a flaky test `create_tmpfs()` on s390x until a root cause is identified and fixed.

Fixes: #4248

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-10-23 11:22:14 +02:00