Revert "v0.4.65: Local directory ISO source (bind-mount workaround for Unraid)"

This reverts commit 72a2089c98.
This commit is contained in:
Miles Ward
2026-05-28 10:47:17 -04:00
parent 761489761c
commit 07e7c18698
12 changed files with 29 additions and 1027 deletions
+1 -36
View File
@@ -9,7 +9,7 @@ use openpxe_core::{
};
use openpxe_dhcp_proxy::DhcpProxyServer;
use openpxe_http_api::{build_router, AppState};
use openpxe_iso_store::{IsoStore, LocalDirManager, NfsHostCaps, NfsManager, SmbManager};
use openpxe_iso_store::{IsoStore, NfsManager, SmbManager};
use openpxe_tftp::TftpServer;
use std::net::{Ipv4Addr, SocketAddr};
use std::path::PathBuf;
@@ -128,39 +128,6 @@ async fn main() -> anyhow::Result<()> {
tracing::warn!(target: "openpxe::nfs", "could not reload NFS mounts: {e}");
}
// v0.4.65: snapshot host kernel capabilities so the Storage tab can
// warn the operator early when in-container NFS mounts cannot
// possibly succeed (Unraid is the dominant case — its base kernel
// ships without nfs/nfsv4 client modules loaded). Pure read of
// /proc/filesystems; no side effects.
let nfs_host_caps = NfsHostCaps::detect();
if nfs_host_caps.available {
tracing::info!(
target: "openpxe::nfs",
v3 = nfs_host_caps.has_nfs3, v4 = nfs_host_caps.has_nfs4,
"host kernel NFS client support"
);
} else {
tracing::warn!(
target: "openpxe::nfs",
detail = %nfs_host_caps.detail,
"host kernel lacks NFS client modules — in-container `mount -t nfs` will fail \
regardless of CAP_SYS_ADMIN. Use Local Directories instead."
);
}
// v0.4.65: bind-mounted host directory manager. Provides the
// container-friendly ISO source that doesn't depend on kernel NFS
// support — the operator mounts the share on the host, bind-mounts
// the path into the container, and registers it here.
let local_dirs = LocalDirManager::new(&config.paths.work_dir, iso_store.clone());
if let Err(e) = local_dirs.load_and_rescan().await {
tracing::warn!(
target: "openpxe::local_dir",
"could not reload local directories: {e}"
);
}
// Sniff network details for the Network tab. None of these are
// required for PXE to work — they're informational, surfaced in the
// UI so an operator doesn't have to drop to a shell to find their
@@ -186,8 +153,6 @@ async fn main() -> anyhow::Result<()> {
metrics: metrics.clone(),
smb: Some(smb.clone()),
nfs: nfs.clone(),
local_dirs: local_dirs.clone(),
nfs_host_caps: nfs_host_caps.clone(),
uploads: openpxe_http_api::uploads::UploadSessions::default(),
log_bus: log_bus.clone(),
started_at: time::OffsetDateTime::now_utc(),