Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,629 changes: 130 additions & 1,499 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ http-body-util = "0.1"
hyper = "1"
hyper-util = { version = "0.1", default-features = false }
ipnet = "2"
jj-lib = "0.43.0"
libc = "0.2"
libloading = "0.8"
libkrun = "=1.19.3"
Expand All @@ -55,7 +54,6 @@ persisting-overlayfs = { path = "crates/persisting-overlayfs", default-features
persisting-overlay-core = { path = "crates/persisting-overlay-core" }
persisting-overlaynet = { path = "crates/persisting-overlaynet" }
persisting-replay = { path = "crates/persisting-replay" }
pollster = "0.4"
pulsing-actor = { version = "0.1.2", default-features = false }
proptest = "1"
regex = "1"
Expand Down
19 changes: 4 additions & 15 deletions crates/persisting-control/src/overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,14 @@ pub struct OverlayRecord {
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(tag = "kind", rename_all = "snake_case")]
pub enum OverlayUpper {
Directory {
upper_dir: PathBuf,
work_dir: PathBuf,
},
Jujutsu {
store_path: PathBuf,
workspace: String,
upper_dir: PathBuf,
},
pub struct OverlayUpper {
pub upper_dir: PathBuf,
pub work_dir: PathBuf,
}

impl OverlayUpper {
pub fn path(&self) -> &Path {
match self {
Self::Directory { upper_dir, .. } => upper_dir,
Self::Jujutsu { upper_dir, .. } => upper_dir,
}
&self.upper_dir
}
}

Expand Down
6 changes: 5 additions & 1 deletion crates/persisting-control/tests/overlay_contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,15 @@ fn inspection_observations_are_only_emitted_when_present() {
fn legacy_overlay_and_apply_records_keep_defaults() {
let overlay: OverlayRecord = serde_json::from_value(json!({
"id": "overlay-1", "target": "/target",
"upper": {"kind": "directory", "upper_dir": "/stage/upper", "work_dir": "/stage/work"},
"upper": { "upper_dir": "/stage/upper", "work_dir": "/stage/work"},
"merged_dir": "/stage/merged", "stage_dir": "/stage",
"auto_apply": false, "state": "staged"
}))
.unwrap();
assert_eq!(
serde_json::to_value(&overlay.upper).unwrap(),
json!({"upper_dir": "/stage/upper", "work_dir": "/stage/work"})
);
assert_eq!(overlay.generation, 0);
assert_eq!(overlay.state, OverlayState::Staged);
assert!(overlay.excluded_paths.is_empty());
Expand Down
33 changes: 0 additions & 33 deletions crates/persisting-gateway/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,6 @@ pub struct OverlayConfig {
/// `{capture_storage}/.overlay/{session_id}/`.
#[serde(default)]
pub stage_dir: Option<String>,
/// Writable upper backend. `directory` is the default; `jujutsu` adds
/// named persistent forks in a shared repository.
#[serde(default)]
pub backend: OverlayBackend,
/// Shared Jujutsu store. All named workspaces use the same object store and
/// operation log (overrides `{storage}/.overlay/jujutsu`).
#[serde(default)]
pub jujutsu_store_path: Option<String>,
/// Jujutsu workspace/fork name (defaults to the pVisor session id).
#[serde(default)]
pub jujutsu_workspace: Option<String>,
/// Writable upper directory (overrides `{stage_dir}/upper` when set).
#[serde(default)]
pub upper_dir: Option<String>,
Expand All @@ -93,14 +82,6 @@ pub struct OverlayConfig {
pub auto_discard: bool,
}

#[derive(Debug, Clone, Copy, Default, Deserialize, Serialize, PartialEq, Eq)]
#[serde(rename_all = "snake_case")]
pub enum OverlayBackend {
#[default]
Directory,
Jujutsu,
}

fn default_admin_listen() -> String {
"127.0.0.1:9876".to_string()
}
Expand Down Expand Up @@ -198,20 +179,6 @@ impl ProxyConfig {
if self.overlay.auto_apply && self.overlay.auto_discard {
anyhow::bail!("overlay auto_apply and auto_discard are mutually exclusive");
}
match self.overlay.backend {
OverlayBackend::Directory => {
if self.overlay.jujutsu_store_path.is_some()
|| self.overlay.jujutsu_workspace.is_some()
{
anyhow::bail!("overlay backend `directory` cannot use Jujutsu options");
}
}
OverlayBackend::Jujutsu => {
if self.overlay.upper_dir.is_some() || self.overlay.work_dir.is_some() {
anyhow::bail!("overlay backend `jujutsu` cannot use directory upper options");
}
}
}
let mut seen = HashSet::new();
for route in &self.models {
if !seen.insert(route.name.clone()) {
Expand Down
6 changes: 0 additions & 6 deletions crates/persisting-overlayfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ license.workspace = true
description = "Cross-platform FUSE overlay (macFUSE / libfuse) for pVisor staging"
readme = "README.md"

[features]
default = ["jujutsu"]
jujutsu = ["dep:jj-lib", "dep:pollster"]

[[bin]]
name = "persisting-overlayfs"
path = "src/main.rs"
Expand All @@ -23,8 +19,6 @@ persisting-control.workspace = true
log.workspace = true
env_logger.workspace = true
clap = { workspace = true, features = ["derive"] }
jj-lib = { workspace = true, optional = true }
pollster = { workspace = true, optional = true }

[target.'cfg(target_os = "macos")'.dependencies]
fuser = { workspace = true, features = ["abi-7-19", "libfuse", "macfuse-5"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/persisting-overlayfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**Cross-platform FUSE overlay for pVisor staging (macFUSE / libfuse).**

Owns the unprivileged, in-process FUSE overlay: ordered multi-`lowerdir` merge,
directory or Jujutsu upper, portable `.wh.*` whiteouts, and the optional
directory upper, portable `.wh.*` whiteouts, and the optional
standalone `persisting-overlayfs` diagnostic CLI.

Does not own review, apply, drop, or Run lifecycle.
Expand Down
Loading
Loading