Skip to content

Conversation

@Adi-Goll
Copy link
Contributor

@Adi-Goll Adi-Goll commented Nov 9, 2025

Detect container environments and set timeout to zero unless ZFS_MODULE_TIMEOUT is already set. This avoids an unnecessary ten second delay after running zfs/zpool commands in a container where /dev/zfs is unavailable.

Closes issue #15165

Motivation and Context

This change reuses the code from a downstream patch to zfs-linux

Description

After review: added a function with more comprehensive checks for systemd, Docker, containerd, Kubernetes, and LXC

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Nov 10, 2025
@Adi-Goll Adi-Goll force-pushed the container-timeout-fix branch 2 times, most recently from 52b7a1f to 57f3a75 Compare November 11, 2025 00:43
Detect container environments and set timeout to zero unless
ZFS_MODULE_TIMEOUT is already set. This avoids an unnecessary ten
second delay after running zfs/zpool commands in a container where
/dev/zfs is unavailable.

Signed-off-by: Adi Gollamudi <[email protected]>
Closes issue openzfs#15165
@Adi-Goll Adi-Goll force-pushed the container-timeout-fix branch from 57f3a75 to 01b4db2 Compare November 11, 2025 00:45
@Adi-Goll Adi-Goll requested a review from behlendorf November 11, 2025 05:30
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for refreshing this.

@behlendorf behlendorf merged commit 24aaf3a into openzfs:master Nov 11, 2025
23 of 25 checks passed
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Nov 11, 2025
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Nov 12, 2025
Detect container environments and set timeout to zero unless
ZFS_MODULE_TIMEOUT is already set. This avoids an unnecessary ten
second delay after running zfs/zpool commands in a container where
/dev/zfs is unavailable.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Adi Gollamudi <[email protected]>
Closes openzfs#15165
Closes openzfs#17922
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Accepted Ready to integrate (reviewed, tested)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants