Skip to content

Commit

Permalink
add condition for xfs
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishek Cherath committed Jan 5, 2024
1 parent 0282aad commit 4d07dcf
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions plane/src/drone/docker/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,23 @@ mod tests {
)?;

executor_config.resource_limits = resource_limits;
match docker.info().await?.driver {
Some(t) if matches!(t.as_str(), "btrfs" | "zfs" | "overlay2") => {}
let info = docker.info().await?;
match info.driver {
Some(t) if matches!(t.as_str(), "btrfs" | "zfs") => {}
Some(t)
if t == "overlay2" && {
let fs_ok;
if let Some(status) = info.driver_status {
fs_ok = !status.iter().flatten().any(|s| s.contains("xfs"));
} else {
fs_ok = false
};
!fs_ok
} =>
{
//disk limits not supported with xfs backend for overlay 2
executor_config.resource_limits.disk_limit_bytes = None;
}
_ => {
//disk limits not supported otherwise
executor_config.resource_limits.disk_limit_bytes = None;
Expand Down

0 comments on commit 4d07dcf

Please sign in to comment.