Bug#775542: auto-mount NFS shares on boot

Jonas Meurer jonas at freesources.org
Tue Jul 7 12:35:12 BST 2015


Am 2015-07-07 13:15, schrieb Christian Seiler:
> Thanks for taking care of this!

Thanks for proof-reading the patch!

> Am 2015-07-07 13:03, schrieb Jonas Meurer:
>> Am 2015-06-28 12:54, schrieb Michael Biebl:
>>>>> I suggest to add this simple fix to Jessie by uploading it to
>>>>> stable-proposed-updates. What do you think? Also, do you think that
>>>>> /etc/systemd/system/remote-fs-pre.target.d/nfs.conf belongs to 
>>>>> systemd
>>>>> package or to nfs-common? I would say it belongs to nfs-common as 
>>>>> that
>>>>> one provides the required tools and services to mount NFS shares on 
>>>>> a
>>>>> client.
>>>> For Jessie:
>>>> - nfs-common is still an init script, so one cannot simply add
>>>>    Before=remote-fs-pre.target to that. But there are two other
>>>>    options:
>>>> - just for Jessie: update systemd to change the original unit file
>>>>    remote-fs-pre.target to include After=nfs-common.service
>>>> - or alternatively, package a drop-in in /lib in the nfs-common
>>>>    package, i.e.
>>>>    /lib/systemd/system/nfs-common.service.d/systemd-ordering.conf:
>>>>    [Unit]
>>>>    Before=remote-fs-pre.target
>>>> (IMHO at least, I'll defer to the maintainers of the respective
>>>> packages as to what they think is appropriate.)
>>> Certainly, the preferred fix is, that packages ship native service 
>>> files
>>> which override/replace the sysv init scripts.
>>> In case of nfs-common/rpcbind, Ubuntu has done some extensive work to
>>> properly integrate nfs-common/rpcbind with systemd.
>>> This hasn't landed in Debian (yet) and is not something which can be
>>> backported for jessie.
>>> The drop-in snippet for nfs-common to augment the dependency 
>>> information
>>> when being run under systemd is something which seems to be suitable 
>>> for
>>> jessie and could be added to the package in sid to give it some 
>>> testing
>>> first. Ideally, that drop-in is shipped by the package itself. This
>>> would mean a stable upload for nfs-common.
>> 
>> I prepared a patch for nfs-utils 1.2.8-9 that adds a systemd drop-in 
>> for
>> nfs-common at 
>> /lib/systemd/system/nfs-common.service.d/remote-fs-pre.conf.
>> It places the nfs-common service before the remote-fs-pre target. This
>> results in the rpc.gssd service beeing started before NFS shares are
>> mounted during the boot process.
>> 
>> The patch is tested on my system and works for me.
> 
> Not having built the package with your diff myself: are you sure
> that it works as expected and installs the file in the right
> place? Just from reading the debdiff, the following seems to be
> wrong:
> 
> The second argument for lines in .install files should be a
> directory (see dh_install manpage), dh_install alone doesn't support
> renaming files. (There is dh_exec for that if you need that
> functionality, but that requires an additional build-dep.)
> 
> OTOH, you don't really need to rename the file, the name you have
> is already fine, so why not just put the following line in
> nfs-common.install:
> 
> debian/systemd-remote-fs-pre.conf 
> lib/systemd/system/nfs-common.service.d/

Indeed, you're correct. Slipped through my fingers for some reason. 
Fixed
in the updated version of the patch.

>> I suggest to upload
>> nfs packages with this patch to Jessie (through 
>> stable-proposed-updates)
>> in order to fix auto-mounting Kerberos-secured NFS mounts at boot in
>> Jessie.
> 
> Note that the release team wants bugs fixed in unstable first,
> before they accept uploads to s-p-u.

You're correct. I'll wait for the nfs-utils maintainers to comment and
prepare an NMU for unstable if they don't take care of it themselves.

Cheers,
  jonas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nfs-utils_1.2.8-9+deb8u1.debdiff
Type: text/x-diff
Size: 2002 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20150707/7d27b6bc/attachment-0002.diff>


More information about the Pkg-systemd-maintainers mailing list