Open beren12 opened 2 years ago
Worth nothing that, IIUC, 5e7a2f4665b5be32dab9c183e6fdb94e1f434b70 is what results in this, so either this should get fixed or that should be reverted before a release if we care about breaking people using that script.
While I don't disagree, I lean more towards it getting fixed. Maybe zfs-mount should declare a networking dependancy in the init/systemd scripts, or change to not call a networking binary until after the network is setup.
I only recently started using nfs so this was never an issue even after https://github.com/openzfs/zfs/commit/5e7a2f4665b5be32dab9c183e6fdb94e1f434b70 was added until I populated /etc/exports with a few shares and hostnames. It's a dns resolution timeout issue because networking is setup after zfs-mount is run.
I absolutely agree it should be fixed, just remarking that one of those two should happen before a release, and I don't know how long until next release or this gets fixed.
Call it an explicit dependency declaration. ;)
It's also not documented in the manpage that exportfs is called with zfs mount which should likely be added as well.
Worth nothing that, IIUC, 5e7a2f4 is what results in this, so either this should get fixed or that should be reverted before a release if we care about breaking people using that script.
Only in sysvinit, it exists in systemd as well since it has no networking/nfs dependency there, either. Whether or not it's noticed I have no idea.
System information
Describe the problem you're observing
there is a 300s pause during boot when zfs-mount is run during boot
Describe how to reproduce the problem
Have a few zfs shares in /etc/exports, reboot
Include any warning/errors/backtraces from the system logs
I verified it was in zfs-mount by adding set -e to the script. I then checked the debug log in /sys, nothing was going on:
I added strace and found it. see attached files:
Part of this is due to dns lookup failure so early in boot. Can zfs please not call exportfs before the service itself is running? And maybe more output with zfs mount -v, like printing "Updating nfs exports" when it gets to that step.
zfs-mount.1667657789.14245.txt