Commit Graph

110 Commits

Author SHA1 Message Date
Ariadne Conill
aa091ddcb4 feat(power-management-core): add core power management control messages for kratad
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2024-06-28 19:36:57 -07:00
Alex Zenla
b42b730b77
feature(xen): implement power management operations (#215) 2024-06-28 22:13:57 +00:00
Ariadne Conill
6f50167798
Use native loopdev implementation instead of loopdev-3 (#209)
* feature(loopdev): add native loop device implementation

The previous loop device implementation required bindgen for no reason,
making cross-compilation difficult.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>

* feat(runtime): use native krata-loopdev instead of loopdev-3

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>

* chore: update cargo workspace lock file

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>

* chore: appease formatting linter

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>

---------

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2024-06-26 10:29:58 -07:00
Khionu Sybiern
88a62441b1
Initial fluentd support (#205)
* fix(hack): use sudo -E when running Rust binaries

This makes it possible to pass envvars to the Krata runtime

* feat(o11y): add fluent sink to logs

This change adds fluent logging as an opt-in feature. Setting
`KRATA_LOG_FLUENT` with an address:port will start a TCP connection,
sending logs.

A later changes will respect a URI scheme and use structured logging.
2024-06-25 19:10:57 +00:00
edera-cultivation[bot]
4175e1e3fe
chore: release (#181)
Co-authored-by: edera-cultivation[bot] <165992271+edera-cultivation[bot]@users.noreply.github.com>
2024-06-24 05:01:32 +00:00
Alex Zenla
9a45d754bf
chore(xenplatform): elf loader should async load the file (#197)
* fix(build): remove unused environment variables

* chore(xenplatform): elf loader should async load the file
2024-06-23 12:57:01 +00:00
Alex Zenla
ef068e790c
chore(xen): move device creation into transaction interface (#196)
* chore(xen): move domain creation to xenplatform

* chore(xen): move device transactions into separate interface
2024-06-21 17:38:19 +00:00
Alex Zenla
6f39f115b7
chore(xen): split platform support into separate crate (#195) 2024-06-21 08:10:45 +00:00
Alex Zenla
23c7302c04
docs: first pass of krata as an isolation engine 2024-06-20 19:57:18 -07:00
Alex Zenla
e219f3adf1
feature(xen): dynamic platform architecture (#194)
* wip hvm

* feat: move platform stuff all into it's own thing

* hvm work

* more hvm work

* more hvm work

* feat: rework to support multiple platforms

* hvm nonredist

* more hvm work

* more hvm work

* pvh work

* work on loading cmdline

* implement initrd loading for pvh

* partially working pvh support

* fix merge issues

* pvh works!

* swap over to pv support

* remove old kernel stuff

* fix support for pv

* pvh is gone for now

* fix(runtime): debug should be respected

* fix(xen): arm64 is currently unsupported, treat it as such at runtime

* fix(examples): use architecture cfg for boot example

* fix(x86): use IOMMU only when needed for passthrough

* chore(build): print kernel architecture during fetch
2024-06-21 02:42:45 +00:00
Alex Zenla
d46aa878af
feat(build): fetch kernels from image registry instead of building the kernel (#156)
Now that we have the kernel build infrastructure at https://github.com/edera-dev/kernels
it makes sense to drop building the kernel and download the kernel images directly.

This change introduces a ./hack/kernel/fetch.sh script which is backed by crates/build
We utilize the OCI infrastructure itself to download the kernel image. The DEV guide
has been updated to include calling the fetch script, and the OS builder now uses this
method instead. Due to the lack of need for the kernel build infra to exist here now,
it has also been removed. This should significantly speed up full builds.

This change will also enable us to turn on os build workflows for all PRs. We should
likely make the OS status checks required once this is merged.
2024-05-16 08:40:58 +00:00
Alex Zenla
fc18bc6a18
feat(runtime): concurrent ip allocation (#151)
Previously, krata runtime allowed a single permit when performing operations.
This was necessary because the only IP allocation storage was xenstore, and
the commit of xenstore data happens after allocation. This commit introduces
IpVendor, a service which vends IPv4 and IPv6 addresses to guests using a
linear address strategy within an IP network space. The IpVendor table is
initialized from xenstore, and from there on out, the in-memory table
is the source of truth. This implementation is not perfect, but it will allow
us to lift the single permit limit, allowing guests to start concurrently.
2024-05-14 18:29:12 +00:00
Alex Zenla
75011ef8cb
fix(oci): use mirror.gcr.io as a mirror to docker hub (#141) 2024-05-09 17:30:27 +00:00
Alex Zenla
b4f26787d4
fix(oci): remove file size limit (#142)
the addons.squashfs file often is fairly large due to the GPU modules containing a lot of code
2024-05-08 19:09:33 +00:00
Alex Zenla
51dff0361d
fix(xenclient): use a single transaction for device setup (#130) 2024-05-05 20:39:53 +00:00
Alex Zenla
84920a88ab
feat: pci passthrough (#114)
* feat: pci passthrough

* feat: guest device management

* feat: addons mounting and kernel modules support

* feat: more pci work

* fix: kernel build squashfs fixes

* fix: e820entry should be available on all platforms
2024-04-29 17:02:20 +00:00
edera-cultivation[bot]
95fbc62486
chore: release (#87)
Signed-off-by: edera-cultivation[bot] <165992271+edera-cultivation[bot]@users.noreply.github.com>
Co-authored-by: edera-cultivation[bot] <165992271+edera-cultivation[bot]@users.noreply.github.com>
2024-04-23 09:41:56 +00:00
Alex Zenla
284ed8f17b
feat: implement guest exec (#107) 2024-04-22 20:13:43 +00:00
Alex Zenla
82576df7b7
feat: implement kernel / initrd oci image support (#103)
* feat: implement kernel / initrd oci image support

* fix: implement image urls more faithfully
2024-04-22 19:48:45 +00:00
Alex Zenla
38e892e249
feat: idm v2 (#102)
* feat: rebuild idm to separate transport from content

* feat: fast guest lookup table and host identification
2024-04-22 04:00:32 +00:00
Alex Zenla
4e9738b959
fix: oci cache store should fallback to copy when rename won't work (#96) 2024-04-16 17:05:24 +00:00
Alex Zenla
8135307283
feat: oci concurrency improvements (#95)
* feat: implement improved and detailed oci progress indication

* feat: implement on-disk indexes of images

* oci: utilize rw-lock for increased cache performance
2024-04-16 16:29:54 +00:00
Alex Zenla
e450ebd2a2
feat: oci tar format, bit-perfect disk storage for config and manifest, concurrent image pulls (#88)
* oci: retain bit-perfect copies of manifest and config on disk

* feat: oci tar format support

* feat: concurrent image pulls
2024-04-16 08:53:44 +00:00
edera-cultivation[bot]
218f848170
chore: release (#41)
Signed-off-by: edera-cultivation[bot] <165992271+edera-cultivation[bot]@users.noreply.github.com>
Co-authored-by: edera-cultivation[bot] <165992271+edera-cultivation[bot]@users.noreply.github.com>
2024-04-15 19:15:00 +00:00
Alex Zenla
89055ef77c
feat: oci compliance work (#85)
* chore: rework oci crate to be more composable

* feat: image pull is now internally explicit

* feat: utilize vfs for assembling oci images

* feat: rework oci to preserve permissions via a vfs
2024-04-15 17:24:14 +00:00
Alex Zenla
24c71e9725
feat: oci packer can now use mksquashfs if available (#70)
* feat: oci packer can now use mksquashfs if available

* fix: use nproc in kernel build script for default jobs, and fix DEV.md guide

* feat: working erofs backend
2024-04-15 00:19:38 +00:00
Alex Zenla
0a6a112133
feat: basic kratactl top command (#72)
* feat: basic kratactl top command

* fix: use magic bytes 0xff 0xff in idm to improve reliability
2024-04-14 22:32:34 +00:00
Alex Zenla
1627cbcdd7
feat: idm snooping (#71)
Implement IDM snooping, a new feature that lets you snoop on messages between guests and the host. The feature exposes the IDM packets send and receives
to the API, allowing kratactl to now listen for messages and feed them to a user for debugging purposes.
2024-04-14 11:54:21 +00:00
Alex Zenla
6d07112e3d
feat: implement oci image progress (#64)
* feat: oci progress events

* feat: oci progress bars on launch
2024-04-12 18:09:26 +00:00
Ariadne Conill
73fd95dbe2
guest: init: default to xterm if TERM is not set (#52)
Most terminal emulators support the xterm control codes more faithfully than the
vt100 ones.

Fixes #51.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2024-04-12 08:52:18 +00:00
Alex Zenla
5e16f3149f
feat: guest metrics support (#46)
* feat: initial support for idm send in daemon

* feat: implement IdmClient backend support

* feat: daemon idm now uses IdmClient

* fix: implement channel destruction propagation

* feat: implement request response idm system

* feat: implement metrics support

* proto: move metrics into GuestMetrics for reusability

* fix: log level of guest agent was trace

* feat: metrics tree with process information
2024-04-12 07:34:46 +00:00
edera-cultivation[bot]
6050e99aa7
chore: release (#39)
Co-authored-by: edera-cultivation[bot] <165992271+edera-cultivation[bot]@users.noreply.github.com>
2024-04-09 11:47:58 +00:00
edera-cultivation[bot]
87c4d7b0c3
chore: release (#37)
Co-authored-by: edera-cultivation[bot] <165992271+edera-cultivation[bot]@users.noreply.github.com>
2024-04-09 11:06:22 +00:00
edera-cultivation[bot]
dedc514944
chore: release (#33)
Signed-off-by: edera-cultivation[bot] <165992271+edera-cultivation[bot]@users.noreply.github.com>
Co-authored-by: edera-cultivation[bot] <165992271+edera-cultivation[bot]@users.noreply.github.com>
2024-04-09 02:50:52 -07:00
Alex Zenla
9c0597157b
fix: increase channel acquisition timeout to support lower performance hosts (#36) 2024-04-09 02:36:22 -07:00
edera-cultivation[bot]
a509f69398
chore: release (#24)
Signed-off-by: edera-cultivation[bot] <165992271+edera-cultivation[bot]@users.noreply.github.com>
Co-authored-by: edera-cultivation[bot] <165992271+edera-cultivation[bot]@users.noreply.github.com>
2024-04-08 22:12:38 -07:00
Alex Zenla
f2ab03711e
feat(ctl): add help and about to commands and arguments (#25) 2024-04-06 00:00:02 +00:00
github-actions[bot]
f59976eb80
chore: release (#16)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-03 00:27:16 +00:00
Alex Zenla
7c55e63f24
chore: implement automatic releases 2024-04-02 23:50:45 +00:00
Alex Zenla
5ad2e40a7b
krata: reimplement console to utilize channels, and provide logs support 2024-04-02 08:57:34 +00:00
Alex Zenla
0fd6318c5f
xenstore: use read thread to avoid need for non-blocking I/O 2024-04-02 03:02:00 +00:00
Alex Zenla
8dd3cc7692
krata: work on parallel reconciliation 2024-04-02 00:56:18 +00:00
Alex Zenla
6bf1d3f88c
krata: implement parallel guest reconciliation 2024-03-31 10:10:06 +00:00
Alex Zenla
377b837db9
guest: set hostname from launch config 2024-03-31 03:18:56 +00:00
Alex Zenla
6cd8cc12db
guest: remove device restriction 2024-03-31 02:33:58 +00:00
Alex Zenla
c68f367e4a
krata: log when a guest start failures occurs 2024-03-31 01:44:28 +00:00
Alex Zenla
15d5ed5a45
krata: implement event stream retries 2024-03-31 01:11:50 +00:00
Alex Zenla
693d62a41a
guest: setup loopback interface 2024-03-30 23:46:01 +00:00
Alex Zenla
8ec7042ea4
guest: place running tasks in cgroup 2024-03-30 23:25:00 +00:00
Alex Zenla
7e9bc4b910
krata: release v0.0.3 2024-03-30 09:37:54 +00:00