On Fri, Sep 09, 2016 at 10:22:25AM +0200, Andreas Henriksson wrote: > Hello Vincent McIntyre. > > Thanks for your thurough testing and useful feedback. > > Let me start with a disclaimer: I'm not maintaining nfs (and I'm > not even using it myself so my knowledge is very limited). My only > involvement here is trying to squash some RC bugs and unblocking > work elsewhere by importing native systemd units.
That is fine with me and highly appreciated. > On Fri, Sep 09, 2016 at 11:57:34AM +1000, Vincent McIntyre wrote: > > > > Thanks Andreas for those new packages. > > I did some testing of the 1.2.8-9.2 packages on a clean jessie install. > > They are pretty close but I found an issue with NFS exports in one case. > > > > I used the attached check.sh script to show the state of various targets > > as I changed things. The attached results.tar shows the output from it. > > Between each major stage below, the system is rebooted. > > Then I log in and run check.sh before doing anything else. > > Throughout, /etc/network/interfaces contained: > > source /etc/network/interfaces.d/* > > auto lo > > iface lo inet loopback > > allow-hotplug eth0 > > I think this ^^^^ is problematic and unfortunately spoils my interest > in the rest of your testing. > > From what I've been told one of the main differences between "auto" > and "allow-hotplug" is that allow-hotplug will not block your bootup > so services will run wild and start up ASAP. This means they can and > likely will start up before your network connection is up. Specially > if using dhcp which takes time to configure the interface and extra > so if you're using a network device (eg. usb dongle) which takes a > long time to initialize. > > I assume eth0 was involved in your tests, and if so it would be > very useful to know what difference it makes if you use auto > instead. > Thanks for that. I've repeated with a slightly different numbering. The short version is that the client mounts and exports all work with your packages and 'auto eth0' BUT one change is needed to make exports work at boot time: /lib/systemd/system/nfs-mountd.service - After=network.target local-fs.target + After=rpcbind.target network.target local-fs.target There might be a more elegant way to this but this seems to work. I did a quick check of your packages with 'auto eth0' and a static address setup in /etc/network/interfaces. That worked also but to get the exports working at boot the change above was required. Detailed results: step 1 - jessie system with nfs packages 1.2.8-9 one fstab mount, no exports. no changes to /etc/default/nfs-* The fstab mount works ok; it politely waits for dhcp to finish before trying to mount. It works in all the other tests so I won't mention it further. step 2 - as above but export one filesystem. Tried a few different ways to do the exports - wildcard host (step2.1) - point the export at a single host (step2.2) - point the export at a netgroup (step2.3) All of these work with no problem. step 3 - jessie system with nfs packages 1.2.8-9.2 one fstab mount, one exported directory. rpc.mountd fails to start because it wants rpcbind to be there, but rpcbind has not been started yet. showmount -e fails: # showmount -e clnt_create: RPC: Program not registered step3.1 - modify /lib/systemd/system/nfs-mountd.service, - After=network.target local-fs.target + After=rpcbind.target network.target local-fs.target run systemd daemon-reload but don't reboot. The exports are still not there # showmount -e clnt_create: RPC: Program not registered re run exports, it fails # exportfs -rav exporting @all_hosts:/data/INSTALL_1 # showmount -e clnt_create: RPC: Program not registered # step 4 - reboot after step3.1: All of the exports work now. I don't need to insert any 30s waits anywhere, yay. Without the tweak to nfs-mountd.service, the critical chain is: nfs-mountd.service +33ms └─network.target @7.453s └─networking.service @2.349s +5.103s └─local-fs.target @2.345s └─data-INSTALL_1.mount @2.212s +132ms └─systemd-fsck@dev-mapper-libra\x2ddata.service @2.193s +16ms └─dev-mapper-libra\x2ddata.device @2.192s With the tweak in place nfs-mountd.service +19ms └─rpcbind.target @10.169s └─rpcbind.service @10.126s +42ms └─network-online.target @10.123s └─network.target @10.123s └─networking.service @1.289s +8.833s └─local-fs.target @1.285s └─data-INSTALL_1.mount @1.061s +223ms └─systemd-fsck@dev-mapper-libra\x2ddata.service @1.043s +14ms └─dev-mapper-libra\x2ddata.device @1.042s Active config in '/etc/network/interfaces' START ----------- source /etc/network/interfaces.d/* auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp END ------------- Active config in '/etc/default/nfs-common' START ----------- NEED_STATD= STATDOPTS= NEED_IDMAPD= NEED_GSSD= END ------------- Active config in '/etc/default/nfs-kernel-server' START ----------- RPCNFSDCOUNT=8 RPCNFSDPRIORITY=0 RPCMOUNTDOPTS="--manage-gids" NEED_SVCGSSD="" RPCSVCGSSDOPTS="" END ------------- Active config in '/etc/exports' (for the wildcard case) START ----------- /data/INSTALL_1 *(rw,sync,root_squash,no_subtree_check) END ------------- Kind regards Vince