Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a0e4710
ci: boot Firecracker microVMs on GitHub's x86_64 runners
fctl-sh[bot] Nov 6, 2026
976785e
ci: quote the firecracker job's test filter, which YAML read as a map…
fctl-sh[bot] Nov 6, 2026
616cd0f
fix(host): start passt without --hostname, which Ubuntu 24.04's passt…
fctl-sh[bot] Nov 6, 2026
fbf92f5
test(host): say what passt and the VM's network say when a sandbox ha…
fctl-sh[bot] Nov 6, 2026
8f88b35
fix(host): give Firecracker VMs DNS past systemd-resolved's stub, as …
fctl-sh[bot] Nov 6, 2026
e88ee76
fix(host): leave link-local DNS servers out of passt's, which it can'…
fctl-sh[bot] Nov 6, 2026
681768b
fix(host): give Firecracker VMs the host's nameservers, past systemd-…
fctl-sh[bot] Nov 6, 2026
5d45e3a
test(host): say what passt, the VM's console and AppArmor say when a …
fctl-sh[bot] Nov 6, 2026
c0f2383
test(host): capture passt's frames and debug log in CI, where VMs get…
fctl-sh[bot] Nov 6, 2026
b78389c
test(host): say where passt waits, as root, when a sandbox has no net…
fctl-sh[bot] Nov 6, 2026
e384059
test(host): passt's trace in CI, which logs each event
fctl-sh[bot] Nov 6, 2026
554c8ff
test(host): trace passt's accept in CI
fctl-sh[bot] Nov 6, 2026
19f0969
feat(host): share package caches with Firecracker VMs over 9P on thei…
fctl-sh[bot] Nov 6, 2026
c93b5a8
fix(host): link a Firecracker VM's network from the host, which Ubunt…
fctl-sh[bot] Nov 6, 2026
6076b12
fix(host): count passt as linked once it writes its pid, not once it …
fctl-sh[bot] Nov 6, 2026
dc0d31c
Merge branch 'fctl/802-firecracker-hosts-package-caches-builds' into …
fctl-sh[bot] Nov 6, 2026
2adf054
feat(host): boot Firecracker VMs with the kernel that has 9p (6.18.59-1)
fctl-sh[bot] Nov 6, 2026
299b3de
fix(host): keep Firecracker VMs' caches through lock modes, lost serv…
fctl-sh[bot] Nov 6, 2026
4536f76
fix(host): serve a Firecracker VM's caches again after any failure, a…
fctl-sh[bot] Nov 6, 2026
3babf1e
fix(host): write passt's pid where it can as root, and boot a sandbox…
fctl-sh[bot] Nov 6, 2026
53e91cd
ci: find the test binary to run as root without cargo's colours, and …
fctl-sh[bot] Nov 6, 2026
9080e50
fix(host): write passt's pid in /tmp as root, under a name no one can…
fctl-sh[bot] Nov 6, 2026
0ad0dd0
test(host): check that a failed link removes the pid's file passt was…
fctl-sh[bot] Nov 6, 2026
26f63ee
Merge remote-tracking branch 'origin/fctl/802-firecracker-hosts-packa…
fctl-sh[bot] Nov 6, 2026
5d72ba9
fix(agent): allow the link count's conversion, which aarch64 needs an…
fctl-sh[bot] Nov 6, 2026
888befc
Merge origin/main into fctl/802-firecracker-package-caches, and serve…
fctl-sh[bot] Nov 6, 2026
676b159
Merge origin/main into fctl/802-firecracker-package-caches
fctl-sh[bot] Nov 6, 2026
bb99da2
fix(host): bind a jailed VM's cache socket where its path stays short…
fctl-sh[bot] Nov 7, 2026
9f61940
docs(host): say once, in share's doc comment, where Firecracker conne…
fctl-sh[bot] Nov 7, 2026
1b75824
Merge branch 'main' into fctl/802-firecracker-package-caches
kalaspuff Nov 7, 2026
48c260a
fix(host): serve and mount a resumed VM's package caches again
fctl-sh[bot] Nov 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ jobs:
bin=$(CARGO_TERM_COLOR=never cargo test --locked -p fctl-host --lib --no-run 2>&1 | sed -n 's/.*Executable unittests src\/lib.rs (\(.*\))/\1/p')
test -x "$bin"
sudo env "FCTL_TEST_FIRECRACKER_AGENT=$FCTL_TEST_FIRECRACKER_AGENT" "FCTL_TEST_FIRECRACKER_DATA=$RUNNER_TEMP/root" \
"$bin" driver::firecracker::tests::boots_a_sandbox --ignored --nocapture
"$bin" driver::firecracker::tests::boots_a_sandbox driver::firecracker::tests::sandboxes_of_a_project_share_its_package_caches \
--ignored --nocapture --test-threads 1
# Jails lend disks to their users, which only root can.
sudo "$bin" driver::firecracker::vm::tests::stale_jails_go --exact --nocapture
# Whiteouts kept as overlayfs reads them, for images that lie over
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/fctl-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ tracing-subscriber.workspace = true
[target.'cfg(target_os = "linux")'.dependencies]
flate2.workspace = true
hex.workspace = true
libc.workspace = true
nix = { workspace = true, features = ["hostname", "mount", "net", "reboot", "resource", "socket", "time"] }
sha2.workspace = true
tar.workspace = true
Expand Down
36 changes: 36 additions & 0 deletions crates/fctl-agent/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
//! the host asks there (src/vm).
//! - `fctl-agent run-as` runs a program as another user, for `vm-serve` and
//! for a supervisor that runs as root.
//! - `fctl-agent share`, on a Firecracker host, serves a project's package
//! caches to a VM over its vsock (src/share), and `vm-mount` in the VM
//! mounts them.
//!
//! See docs/architecture.md and crates/fctl-proto/src/agent.rs.

Expand All @@ -22,6 +25,8 @@ mod prompt;
#[cfg(target_os = "linux")]
mod protected;
mod refresh;
#[cfg(target_os = "linux")]
mod share;
mod supervisor;
mod tasks;
mod user;
Expand Down Expand Up @@ -81,6 +86,30 @@ enum Command {
#[cfg(target_os = "linux")]
#[command(hide = true)]
VmServe,
/// Serve a directory to a Firecracker VM over 9P, on the unix socket
/// where Firecracker connects the VM's vsock port (on the host).
#[cfg(target_os = "linux")]
#[command(hide = true)]
Share {
#[arg(long)]
dir: PathBuf,
#[arg(long)]
socket: PathBuf,
},
/// Mount what the host shares on a vsock port at a directory, as a user's
/// files (in a Firecracker VM, as root).
#[cfg(target_os = "linux")]
#[command(hide = true)]
VmMount {
#[arg(long)]
port: u32,
#[arg(long)]
dir: PathBuf,
/// Whose files they are in the VM: a name or a uid, as `docker exec
/// -u` takes them.
#[arg(long)]
user: Option<String>,
},
/// Run a program as a user, in a session of its own (for vm-serve, and
/// a supervisor that runs as root).
#[cfg(target_os = "linux")]
Expand Down Expand Up @@ -154,6 +183,13 @@ fn main() -> anyhow::Result<()> {
runtime()?.block_on(vm::serve())
}
#[cfg(target_os = "linux")]
Command::Share { dir, socket } => {
init_logging(None)?;
share::serve(&dir, &socket)
}
#[cfg(target_os = "linux")]
Command::VmMount { port, dir, user } => vm::mount(port, &dir, user.as_deref()),
#[cfg(target_os = "linux")]
Command::RunAs { .. } => Ok(()),
}
}
Expand Down
Loading
Loading