[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-25 Thread Launchpad Bug Tracker
This bug was fixed in the package zfs-linux - 0.6.5.6-0ubuntu23 --- zfs-linux (0.6.5.6-0ubuntu23) xenial; urgency=medium * Revert previous fix, re-work by checking for a container using /run/systemd/container and set timeout to zero for zfs list or zpool status when

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-21 Thread Launchpad Bug Tracker
This bug was fixed in the package zfs-linux - 0.6.5.11-1ubuntu3.6 --- zfs-linux (0.6.5.11-1ubuntu3.6) artful; urgency=medium * Revert previous fix, re-work by checking for a container using /run/systemd/container and set timeout to zero for zfs list or zpool status when

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-21 Thread Launchpad Bug Tracker
This bug was fixed in the package zfs-linux - 0.7.5-1ubuntu16.2 --- zfs-linux (0.7.5-1ubuntu16.2) bionic; urgency=medium * Revert previous fix, re-work by checking for a container using /run/systemd/container and set timeout to zero for zfs list or zpool status when

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-21 Thread Łukasz Zemczak
** Tags added: verification-done-xenial -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1760173 Title: zfs, zpool commands hangs for 10 seconds without a /dev/zfs To manage notifications about this

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-15 Thread Colin Ian King
Tested with 0.6.5.6-0ubuntu23 inside a xenial lxc container and the 10 second delay is now fixed. ** Tags added: ve ** Changed in: zfs-linux (Ubuntu Bionic) Importance: Undecided => High ** Changed in: zfs-linux (Ubuntu Artful) Importance: Undecided => High ** Changed in: zfs-linux

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-15 Thread Colin Ian King
Tested with 0.6.5.11-1ubuntu3.6 inside an artful lxc container and the 10 second delay is now fixed. ** Tags added: verification-done-artful -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1760173

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-15 Thread Colin Ian King
Tested with 0.7.5-1ubuntu16.2 inside a bionic lxc container and the 10 second delay is now fixed. ** Tags added: verification-done-bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1760173 Title:

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-11 Thread Colin Ian King
** Changed in: zfs-linux (Ubuntu Bionic) Assignee: (unassigned) => Colin Ian King (colin-king) ** Changed in: zfs-linux (Ubuntu Xenial) Assignee: (unassigned) => Colin Ian King (colin-king) ** Changed in: zfs-linux (Ubuntu Artful) Assignee: (unassigned) => Colin Ian King

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-08 Thread Launchpad Bug Tracker
This bug was fixed in the package zfs-linux - 0.7.5-1ubuntu19 --- zfs-linux (0.7.5-1ubuntu19) cosmic; urgency=medium * Revert previous fix, re-work by checking for a container using /run/systemd/container and set timeout to zero for zfs list or zpool status when running

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-08 Thread Colin Ian King
..plus it can be easily checked w/o any special privilege. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1760173 Title: zfs, zpool commands hangs for 10 seconds without a /dev/zfs To manage

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-08 Thread Colin Ian King
So, I am pretty confident that systemd will create "/run/systemd/container" if we're inside a container, so I'll check for that -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1760173 Title: zfs,

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-07 Thread Stéphane Graber
Not really, no. You can use systemd-detect-virt which is systemd specific but should work as a regular user, otherwise you can try to add some specialized checks like looking if /dev in the mount table is devtmpfs or not. -- You received this bug notification because you are a member of Ubuntu

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-07 Thread Colin Ian King
OK, I hadn't realized that, so much for my trivial testing. So, is there any simple way for any process inside a container to detect if one is inside a containerized environment without any special root privileges? -- You received this bug notification because you are a member of Ubuntu Bugs,

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-07 Thread Stéphane Graber
That's because an attached process ("lxc-attach" or "lxc exec") isn't a child of init, it's spawned directly by liblxc and so does have our env variable set. Any process which is a direct or indirect child of PID1 in the container will be inheriting its environment through that path and as init

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-07 Thread Colin Ian King
I'm confused too then, how is that when I start a process inside the container, such as from a shell it can access this environment variable and my fix works? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-07 Thread Stéphane Graber
I'm confused, how is this change going to work when the "container" environment variable is only present in PID1's environment but not in any of its descendants? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-07 Thread Andy Whitcroft
Hello Ryan, or anyone else affected, Accepted zfs-linux into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/zfs- linux/0.7.5-1ubuntu16.1 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-07 Thread Colin Ian King
** Description changed: + == SRU Justification, Xenial, Artful, Bionic == + + When outside a lxd container with zfs storage, zfs list or zpool status + either returns or reports what's going on. + + When inside a lxd container with zfs storage, zfs list or zpool status + appears to hang, no

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-07 Thread Colin Ian King
I'd rather not change the default behaviour for non-container environments as I want to be conservative here, so instead, I'm going to check if $container exits and set the timeout to zero for this specific case. ** Also affects: zfs-linux (Ubuntu Xenial) Importance: Undecided Status:

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-06-05 Thread Stéphane Graber
Actually, LXC/LXD can't set environment variables in that way as systemd strips all inherited environment. Looking at the backlog it sounds like it'd be safe for us to just turn off that timeout entirely in Ubuntu given that we can assume we'll always have devtmpfs where it matters and so there's

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-30 Thread Colin Ian King
Hrm. I'm, included to have the container environment inform zfs that the timeout should be zero rather adding in more logic to zfs that tries to determine which environment it is in to determine the timeout time. The container environment just needs to set the 1 environment variable that ZFS

Re: [Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-30 Thread Christian Brauner
On Mon, Apr 30, 2018, 12:41 Ryan Harper <1760...@bugs.launchpad.net> wrote: > On Mon, Apr 30, 2018 at 12:14 PM, Colin Ian King > <1760...@bugs.launchpad.net> wrote: > > The code actually polls /dev/zfs until it appears. The issue here is > > that it does not appear after 10 seconds, and then it

Re: [Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-30 Thread Christian Brauner
If you're running zfs tools in a container setting the timeout to 0 will likely be helpful. The device node will never appear in the containers /dev since a) it's a tmpfs and b) even if it were a devtmpfs it wouldn't help since devtmpfs isn't namespaced. (In fact udevd will even ignore any device

Re: [Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-30 Thread Ryan Harper
On Mon, Apr 30, 2018 at 12:14 PM, Colin Ian King <1760...@bugs.launchpad.net> wrote: > The code actually polls /dev/zfs until it appears. The issue here is > that it does not appear after 10 seconds, and then it gives up. Yes, you're right. Would it make sense to have zfsutils know it's running

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-30 Thread Christian Brauner
/* * Device creation by udev is asynchronous and waiting may be * required. Busy wait for 10ms and then fall back to polling every * 10ms for the allowed timeout (default 10s, max 10m). This is * done to optimize for the common case where the device is * immediately available and to avoid

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-30 Thread Colin Ian King
The code actually polls /dev/zfs until it appears. The issue here is that it does not appear after 10 seconds, and then it gives up. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1760173 Title:

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-30 Thread Ryan Harper
If they're going to modprobe and are waiting on udev, then I would like them to do something like udevadm settle --exit-if-exists=/dev/zfs That means they can exit early without paying the 10s by default value. -- You received this bug notification because you are a member of Ubuntu Bugs,

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-30 Thread Colin Ian King
accessing /dev/zfs is dependent on loading the zfs module which may take some time for udev to do it's work to create /dev/zfs. However, ZFS does allow this to be tweaked with the ZFS_MODULE_TIMEOUT environment variable: >From lib/libzfs/libzfs_util.c, libzfs_load_module: /* * Device creation

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-12 Thread Colin Ian King
** Changed in: zfs-linux (Ubuntu) Importance: Medium => High -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1760173 Title: zfs, zpool commands hangs for 10 seconds without a /dev/zfs To manage

Re: [Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-10 Thread Ryan Harper
On Tue, Apr 10, 2018 at 2:44 AM, Colin Ian King <1760...@bugs.launchpad.net> wrote: > Would an immediate return with some error/warning message be more > appropriate that a 10 second delay? Yes. I would think that the amount of time to wait could be an option. I've read that in some scenarios

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-10 Thread Colin Ian King
Would an immediate return with some error/warning message be more appropriate that a 10 second delay? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1760173 Title: zfs, zpool commands hangs for 10

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-10 Thread Colin Ian King
as above, "that" -> "than" ** Changed in: zfs-linux (Ubuntu) Status: Confirmed => Triaged ** Changed in: zfs-linux (Ubuntu) Importance: Undecided => Medium ** Changed in: zfs-linux (Ubuntu) Assignee: (unassigned) => Colin Ian King (colin-king) -- You received this bug

[Bug 1760173] Re: zfs, zpool commands hangs for 10 seconds without a /dev/zfs

2018-04-02 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: zfs-linux (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1760173 Title: