Commit Graph

10979 Commits

Author SHA1 Message Date
David Esparza
a3fc673121
Merge pull request #7181 from dborquez/add_blogbench_and_webtooling
metrics: Adds blogbench and webtool metrics tests
2023-07-05 20:37:33 -06:00
Gabriela Cervantes
5a61065ab7 checkmetrics: Add checkmetrics value for memory usage in qemu
This PR adds the checkmetrics value for memory usage in qemu.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-05 19:22:12 +00:00
Gabriela Cervantes
78086ed1fe checkmetrics: Add memory usage value for clh
This PR adds the memory usage value for clh.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-05 19:19:04 +00:00
Gabriela Cervantes
1c3dbafbf0 metrics: Fix function of how to retrieve multiple values
This PR fixes the function of how to add multiple values of pss memory.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-05 18:19:36 +00:00
Gabriela Cervantes
18968f428f metrics: Add function to have uniformity
This PR adds the function name before the function to have uniformity
across all the test.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-05 18:15:31 +00:00
David Esparza
35d096b607
metrics: Adds blogbench and webtool metrics tests
This PR adds blogbench and webtooling metrics checks to this repo.
The function running the test intentionally returns zero, so
the test will be enabled in another PR once the workflow is
green.

Fixes: #7069

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-07-04 14:38:52 -06:00
Gabriela Cervantes
d8f90e89d5 metrics: Rename function at memory usage script
This PR renames the function name for the memory usage script.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-04 19:58:09 +00:00
Gabriela Cervantes
b9d66e0d53 metrics: Fix double quotes variables in memory usage script
This PR usses double quotes in all the variables as well as general fixes
to the memory usage script in order to have uniformity.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-04 19:51:36 +00:00
Gabriela Cervantes
476a11194a tests: Enable memory usage metrics tests
This PR enables the memory usage metrics tests for kata CI.

Fixes #7229

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-04 16:11:54 +00:00
Fabiano Fidêncio
a25d5b9807
Merge pull request #7222 from jepio/fix-dragonball-check
gha: dragonball: Correctly propagate PATH update
2023-07-04 15:59:13 +02:00
Jeremi Piotrowski
b568c7f7d8 tests/integration: Provide default value for KATA_HOST_OS
Non AKS k8s tests (SEV/SNP/TDX) don't currently set KATA_HOST_OS, so provide a
default empty value for the variable so that those tests can run.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-07-04 14:28:29 +02:00
Fabiano Fidêncio
6d2e6ed7b6
Merge pull request #7217 from likebreath/0630/clh_v33.0
versions: Upgrade to Cloud Hypervisor v33.0
2023-07-04 12:52:26 +02:00
Jeremi Piotrowski
d6e96ea06d tests/integration: Use AzureLinux instead of Mariner
as OSSKU value, to get rid of this warning when creating the AKS cluster:

WARNING: The osSKU "AzureLinux" should be used going forward instead of
"CBLMariner" or "Mariner". The osSKUs "CBLMariner" and "Mariner" will
eventually be deprecated.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-07-04 12:49:07 +02:00
Jeremi Piotrowski
40c46c75ed tests/integration: Perform yq install in run_tests()
We only need to install in run_tests() so that the yq install is picked up by
kubernets/setup.sh as well. We also need to either use (sudo &&
INSTALL_IN_GOPATH=false) || (INSTALL_IN_GOPATH=true).

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-07-04 12:49:07 +02:00
Bin Liu
f214058b07
Merge pull request #7202 from wedsonaf/macros
Convert `is_allowed`, `ttrpc_error` and `sl` to functions
2023-07-04 14:23:08 +08:00
Peng Tao
f5658c7833
Merge pull request #7224 from fidencio/topic/gha-release-fix-hub-download
gha: release: Use a specific release of hub
2023-07-04 10:21:17 +08:00
GabyCT
5950df7d95
Merge pull request #7199 from GabyCT/topic/installchem
metrics: Add checkmetrics to gha-run.sh for metrics CI
2023-07-03 17:49:18 -06:00
Gabriela Cervantes
d8b8f7e94d metrics: Enable launch tests time metrics
This PR enables the launch tests metrics for kata CI.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-03 22:38:04 +00:00
Fabiano Fidêncio
72fd562bd6 gha: release: Use a specific release of hub
ideally we should never ever use hub again, and switch to a supported /
release tool instead.  However, in order to get v3.1.3 released, let's
just stick to the last released version of hub, as trying to get its
release is leading to:
```
curl -s "https://api.github.com/repos/github/hub/releases/latest"
{
  "message": "Moved Permanently",
  "url": "https://api.github.com/repositories/401025/releases/latest",
  "documentation_url": "https://docs.github.com/v3/#http-redirects"
}
```

And that breaks the release process. :-/

Fixes: #7223

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-03 22:00:55 +02:00
Fabiano Fidêncio
a7340a63a4
Merge pull request #7209 from GabyCT/topic/fixbuildovmf
packaging: Fix indentation of build.sh script at ovmf
2023-07-03 20:06:29 +02:00
Gabriela Cervantes
0502354b42 checkmetrics: Add checkmetrics json for qemu
This PR adds checkmetrics json file for qemu metrics.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-03 16:47:03 +00:00
Gabriela Cervantes
b481ef1883 makefile: Add -buildvcs=false flag to go build
This PR adds the -buildvcs=false flag to the go build of checkmetrics.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-03 16:42:51 +00:00
Gabriela Cervantes
e94aaed3c7 ci_worker: Add checkmetrics ci worker for cloud hypervisor
This PR adds the checkmetrics ci worker file for cloud hypervisor in
order to check the boot times limit.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-03 16:42:51 +00:00
Gabriela Cervantes
917576e6fb metrics: Add double quotes in all variables
This PR adds double quotes in all variables to have uniformity across
all the gha-run.sh script.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-03 16:42:50 +00:00
Gabriela Cervantes
cc8f0a24e4 metrics: Add checkmetrics to gha-run.sh for metrics CI
This PR adds checkmetrics installation for gha-run.sh in order to compare
results limits as part of the metrics CI.

Fixes #7198

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-03 16:41:31 +00:00
Jeremi Piotrowski
477856c1e3 gha: dragonball: Correctly propagate PATH update
cargo/rust is installed in one step, we need to write the PATH update to
GITHUBENV so that it becomes visible in the next steps.

Fixes: #7221
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-07-03 17:05:12 +02:00
Fupan Li
b6307c2744
Merge pull request #5444 from zvonkok/vra
doc: Add documentation for the virtualization reference architecture
2023-07-03 10:14:20 +08:00
Peng Tao
c85aff7ef4
Merge pull request #6949 from zvonkok/kernel-fixes
gpu: Update kernel building to the latest changes
2023-07-03 09:53:08 +08:00
Peng Tao
581be92b25
Merge pull request #4492 from zvonkok/pcie-topology
runtime: fix PCIe topology for GPUDirect use-case
2023-07-03 09:17:12 +08:00
David Esparza
d01762dc35
Merge pull request #7174 from dborquez/add_memory_footprint_test
metrics: Add memory footprint tests
2023-06-30 16:32:10 -06:00
Fabiano Fidêncio
00b0755e3e
Merge pull request #7200 from fidencio/topic/add-virtiofs-none-option
runtime: Add "none" as a shared_fs option
2023-06-30 22:45:39 +02:00
Aurélien Bombo
1c211cd730 gha: Swap asset/release in build matrix
This simply displays the asset name first in GH's UI, so that the
release name (always "test") is truncated rather than the asset name.
Makes things slightly easier to read.

e.g.

    build-asset (cloud-hypervisor-glibc, te...

instead of

    build-asset (test, cloud-hypervisor-gli...

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-06-30 12:51:40 -07:00
Aurélien Bombo
0152c9aba5 tools: Introduce USE_CACHE environment variable
This allows setting `USE_CACHE=no` to test building e2e during
developmet without having to comment code blocks and so forth.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-06-30 12:51:40 -07:00
Aurélien Bombo
2b59756894 tests: Build CLH with glibc for Mariner
This enables building CLH with glibc and the mshv feature as required
for Mariner. At test time, it also configures Kata to use that CLH
flavor when running Mariner.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-06-30 12:51:40 -07:00
Aurélien Bombo
80c78eadce tests: Use baked-in kernel with Mariner
Mariner ships a bleeding-edge kernel that might be ahead of upstream, so
we use that to guarantee compatibility with the host.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-06-30 12:51:40 -07:00
Aurélien Bombo
532755ce31 tests: Build Mariner rootfs initrd
* Adds a new `rootfs-initrd-mariner` build target.
 * Sets the custom initrd path via annotation in `setup.sh` at test
   time.
 * Adapts versions.yaml to specify a `cbl-mariner` initrd variant.
 * Introduces env variable `HOST_OS` at deploy time to enable using a
   custom initrd.
 * Refactors the image builder so that its caller specifies the desired
   guest OS.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2023-06-30 12:51:40 -07:00
Fabiano Fidêncio
6a21e20c63 runtime: Add "none" as a shared_fs option
Currently, even when using devmapper, if the VMM supports virtio-fs /
virtio-9p, that's used to share a few files between the host and the
guest.

This *needed*, as we need to share with the guest contents like secrets,
certificates, and configurations, via Kubernetes objects like configMaps
or secrets, and those are rotated and must be updated into the guest
whenever the rotation happens.

However, there are still use-cases users can live with just copying
those files into the guest at the pod creation time, and for those
there's absolutely no need to have a shared filesystem process running
with no extra obvious benefit, consuming memory and even increasing the
attack surface used by Kata Containers.

For the case mentioned above, we should allow users, making it very
clear which limitations it'll bring, to run Kata Containers with
devmapper without actually having to use a shared file system, which is
already the approach taken when using Firecracker as the VMM.

Fixes: #7207

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-06-30 20:45:00 +02:00
Bo Chen
5681caad5c versions: Upgrade to Cloud Hypervisor v33.0
Details of this release can be found in ourroadmap project as iteration
v33.0: https://github.com/orgs/cloud-hypervisor/projects/6.

Fixes: #7216

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-06-30 09:37:27 -07:00
David Esparza
b2ce8b4d61
metrics: Add memory footprint tests to the CI
This PR adds memory foot print metrics to tests/metrics/density
folder.

Intentionally, each test exits w/ zero in all test cases to ensure
that tests would be green when added, and will be enabled in a
subsequent PR.

A workflow matrix was added to define hypervisor variation on
each job, in order to run them sequentially.

The launch-times test was updated to make use of the matrix
environment variables.

Fixes: #7066

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-06-30 09:52:27 -06:00
David Esparza
5e3f617cb6
Merge pull request #7197 from GabyCT/topic/fixfunctionname
metrics: Uniformity across function names in gha-run.sh
2023-06-30 09:37:15 -06:00
Zvonko Kaiser
d035955ef5 doc: Add documentation for the virtualization reference architecture
Fixes: #4041

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2023-06-30 12:30:37 +00:00
Zvonko Kaiser
0f454d0c04 gpu: Fixing typos for PCIe topology changes
Some comments and functions had typos and wrong capitalization.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2023-06-30 08:42:55 +00:00
Gabriela Cervantes
6bb2ea8195 packaging: Fix indentation of build.sh script at ovmf
This PR fixes the indentation of build.sh script at ovmf.

Fixes #7208

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-29 15:46:54 +00:00
Fupan Li
4288b935e1
Merge pull request #7104 from openanolis/physical/endpoint
runtime-rs:  support physical endpoint using device manager
2023-06-29 14:43:44 +08:00
GabyCT
19890133e9
Merge pull request #7189 from Apokleos/direct-vol-bugfix
runtime-rs: bugfix for direct volume path's validation.
2023-06-28 12:26:22 -06:00
Wedson Almeida Filho
0504bd7254 agent: convert the sl macros to functions
There is nothing in them that requires them to be macros. Converting
them to functions allows for better error messages.

Fixes: #7201

Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
2023-06-28 14:05:32 -03:00
Wedson Almeida Filho
0860fbd410 agent: convert the ttrpc_error macro to a function
There is nothing in it that requires it to be a macro. Converting it to
a function allows for better error messages.

Fixes: #7201

Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
2023-06-28 14:05:32 -03:00
Wedson Almeida Filho
0e5d6ce6d7 agent: convert the is_allowed macro to a function
Having a function allows for better error messages from the type checker
and it makes it clearer to callers what can happen. For example:

is_allowed!(req);

Gives no indication that it may result in an early return, and no simple
way for callers to modify the behaviour. It also makes it look like
ownership of `req` is being transferred.

On the other hand,

is_allowed(&req)?;

Indicates that `req` is being borrowed (immutably) and may fail. The
question mark indicates that the caller wants an early return on
failure.

Fixes: #7201

Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
2023-06-28 14:05:32 -03:00
Wedson Almeida Filho
f680fc52be agent: change AGENT_CONFIG's lazy type to just AgentConfig
Since it is never modified, it doesn't really need a lock of any kind.
Removing the `RwLock` wrapper allows us to remove all `.read().await`
calls when accessing it.

Additionally, `AGENT_CONFIG` already has a static lifetime, so there is
no need to wrap it in a ref-counted heap allocation.

Fixes: #5409

Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
2023-06-28 14:05:27 -03:00
GabyCT
3f87d0fbfe
Merge pull request #7180 from dborquez/run_ret_hypervisor_version_w_sudo
metrics: Fix retrieving hypervisor version on metrics
2023-06-28 10:54:23 -06:00