Comment 10 for bug 1871214

Revision history for this message
Rodrigo Barbieri (rodrigo-barbieri2010) wrote :

Hello Robie,

While I investigated this issue, I found workarounds #1 and #2 as you can see in the description section. I also found the upstream fix which is the proper implementation of workaround #2 (workaround #2 per se wouldn't be backportable, hence it needs a "generator" to be dynamic). I understand that the fix is a bit complex for a bionic SRU, therefore an alternative could be workaround #1.

I tested workaround #1 within the scope of the bug and also a few corner cases that came to my mind, and I can test it more extensively to ensure it is safe for a bionic SRU. What do you think about it? Do you think workaround #1 could be SRU'ed into bionic?

Just to add a bit more context to it: in xenial exportfs always returns 0, regardless of any error or what happens, therefore nfsd is always run and is never prevented from running by exportfs failing. This is why the bug doesn't happen in xenial. The motivation that led to exportfs return value changing was so it could be properly scripted (as far as I can tell, it was quite a controversial change, reverted and added back, see [1]). Given that for the SRU of workaround #1 we would be changing just the systemd file to add a "-" to ExecStartPre, the previous (xenial) behavior is maintained in the system boot case, but it could still return != 0 when scripted. The impact is also minor and easier to revert (it is a one-liner)

Also, one of the corner cases that I investigated is that, in the xenial behavior, the export can be created by nfsd even though the path is not available. At boot time, the export would be available a few seconds later when the path is available. Anyone trying to mount the path in that short time window will not succeed (or ever if the path fails to be mounted). In xenial, you can end up in the same situation manually by setting up an export that doesn't exist, not necessarily having to be set up at boot time, as this workflow is not prevented at all.

[1] http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=history;f=utils/exportfs/exportfs.c;h=a04a78984a6e4eac4321ca9cafcf5a3bace0486c;hb=HEAD