Skip to content

Commit 2947823

Browse files
vmagrofacebook-github-bot
authored andcommitted
[antlir2][cleanup] rip out overlayfs and cas_dir
Summary: These were both half-assed attempts to not be utterly reliant on btrfs so that we could do fancier things like support Remote Execution builds. Since we don't actually use them, just delete it. I still would like to implement something to support Remote Execution, but that will likely need to look something like `ostree`, rather than shenanigans with `overlayfs` or a "dumb" implementation like `cas_dir` Test Plan: waitforsandcastle Reviewed By: justintrudell Differential Revision: D75298488 fbshipit-source-id: d7d7da5865f2b62748a68f9bf994e948a4b885b5
1 parent 4d72e0b commit 2947823

File tree

41 files changed

+29
-2095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+29
-2095
lines changed

antlir/antlir2/antlir2/BUCK

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ rust_binary(
2222
"//antlir/antlir2/antlir2_facts:antlir2_facts",
2323
"//antlir/antlir2/antlir2_features:antlir2_features",
2424
"//antlir/antlir2/antlir2_isolate:antlir2_isolate",
25-
"//antlir/antlir2/antlir2_overlayfs:antlir2_overlayfs",
2625
"//antlir/antlir2/antlir2_rootless:antlir2_rootless",
2726
"//antlir/antlir2/antlir2_working_volume:antlir2_working_volume",
2827
"//antlir/buck2/buck_label:buck_label",

antlir/antlir2/antlir2/src/cmd/compile.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ use antlir2_compile::Arch;
1414
use antlir2_compile::CompileFeature;
1515
use antlir2_compile::CompilerContext;
1616
use antlir2_features::Feature;
17-
use antlir2_overlayfs::OverlayFs;
1817
use antlir2_rootless::Rootless;
1918
use antlir2_working_volume::WorkingVolume;
2019
use anyhow::Context;
21-
use anyhow::anyhow;
2220
use buck_label::Label;
2321
use clap::Parser;
2422
use clap::ValueEnum;
@@ -70,20 +68,17 @@ pub(crate) struct Compile {
7068
#[derive(Debug, ValueEnum, Clone, Copy)]
7169
enum WorkingFormat {
7270
Btrfs,
73-
Overlayfs,
7471
}
7572

7673
#[derive(Debug)]
7774
enum WorkingLayer {
7875
Btrfs(Subvolume),
79-
OverlayFs(OverlayFs),
8076
}
8177

8278
impl WorkingLayer {
8379
fn path(&self) -> &Path {
8480
match self {
8581
WorkingLayer::Btrfs(subvol) => subvol.path(),
86-
WorkingLayer::OverlayFs(fs) => fs.mountpoint(),
8782
}
8883
}
8984
}
@@ -94,7 +89,6 @@ impl Compile {
9489
// this must happen before unshare
9590
let working_volume = match self.working_format {
9691
WorkingFormat::Btrfs => Some(WorkingVolume::ensure(self.working_dir.clone())?),
97-
WorkingFormat::Overlayfs => None,
9892
};
9993

10094
let rootless = match self.rootless {
@@ -195,10 +189,6 @@ impl Compile {
195189
}
196190
drop(root_guard);
197191
}
198-
WorkingLayer::OverlayFs(fs) => {
199-
drop(ctx);
200-
fs.finalize().context("while finalizing overlayfs")?;
201-
}
202192
}
203193

204194
Ok(())
@@ -238,18 +228,6 @@ impl Compile {
238228
debug!("produced r/w subvol '{subvol:?}'");
239229
Ok(WorkingLayer::Btrfs(subvol))
240230
}
241-
WorkingFormat::Overlayfs => {
242-
if self.parent.is_some() {
243-
return Err(anyhow!("overlayfs encodes parent in --output").into());
244-
}
245-
246-
let model =
247-
std::fs::read_to_string(&self.output).context("while reading model json")?;
248-
let model = serde_json::from_str(&model).context("while parsing model json")?;
249-
let opts = antlir2_overlayfs::Opts::builder().model(model).build();
250-
let fs = OverlayFs::mount(opts).context("while mounting overlayfs")?;
251-
Ok(WorkingLayer::OverlayFs(fs))
252-
}
253231
}
254232
}
255233
}

antlir/antlir2/antlir2_cas_dir/BUCK

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)