Skip to content

Commit e6a13f6

Browse files
committed
fix(native-sidecar): tolerate guest filesystem-quota errors in shadow sync
1 parent b1b97b2 commit e6a13f6

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

crates/native-sidecar/src/execution/launch.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,27 @@ fn sync_host_directory_tree_to_kernel_inner(
11961196
// just unlinked by the guest — vim's swap-file dance). The
11971197
// entry is mid-churn; skip it rather than failing the VM.
11981198
Err(error) if error.code() == "ENOENT" => continue,
1199+
// The guest exhausting its OWN configured filesystem budget is
1200+
// a guest-caused condition, not a sidecar fault: the offending
1201+
// write was already correctly rejected with a typed ENOSPC at
1202+
// the syscall, and the shadow mirror simply cannot hold the
1203+
// excess. Escalating it to a fatal error here killed the whole
1204+
// shared sidecar — and every co-located VM/actor with it — from
1205+
// one guest filling its quota (the LT-011 blast-radius class).
1206+
// Warn and skip the entry, matching the ENOENT/EPERM tolerance
1207+
// above, so the failure stays host-visible but bounded.
1208+
Err(error)
1209+
if matches!(error.code(), "ENOSPC" | "EDQUOT" | "EFBIG") =>
1210+
{
1211+
tracing::warn!(
1212+
path = %host_path.display(),
1213+
guest_path = %guest_path,
1214+
error = %error.code(),
1215+
"skipping host shadow file that exceeds the VM filesystem budget \
1216+
(limits.resources.maxFilesystemBytes)"
1217+
);
1218+
continue;
1219+
}
11991220
Err(error) => {
12001221
return Err(SidecarError::InvalidState(format!(
12011222
"failed to sync host shadow file {} to guest {}: {}",

0 commit comments

Comments
 (0)