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 8642910
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion plane/src/drone/docker/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,19 @@ mod tests {
)?;

executor_config.resource_limits = resource_limits;
match docker.info().await?.driver {
let info = docker.info().await?;
match info.driver {
Some(t) if matches!(t.as_str(), "btrfs" | "zfs" | "overlay2") => {}
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 otherwise
executor_config.resource_limits.disk_limit_bytes = None;
Expand Down

0 comments on commit 8642910

Please sign in to comment.