[Bug 1428486] Re: Only start rpc.statd if $NEED_STATD

Martin Pitt martin.pitt at ubuntu.com
Mon Mar 9 07:40:52 UTC 2015


This is slightly complicated by the fact that rpc-statd.service (and the
related rpc-statd-notify.service) don't have an [Install] and are not
enabled/disabled separately, but instead are pulled in by nfs-
server.service through an explicit Wants=.

This is perhaps worth a discussion with upstream: If statd isn't
necessary with NFS v4, perhaps some other service (like nfs-mountd?)
could check whether it needs statd and start it if needed? If it's not
(reliably) possible to detect the need for it at runtime, we could also
mimic the current /etc/defaults/ behaviour by dropping the Wants= from
nfs-server.service, and either:

 - add a new ExecStartPre=/bin/sh -c ... which checks the value in the
default file and calls "systemctl --no-block start rpc-statd.service
rpc-statd-notify.service" if enabled

or

 - do an one-time migration to adding nfs-server.wants/ symlinks for
rpc-statd.service and rpc-statd-notify.service iff statd is enabled.
That's much harder to discover than a simple systemctl enable/disable,
though.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nfs-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1428486

Title:
  Only start rpc.statd if $NEED_STATD

Status in nfs-utils package in Ubuntu:
  Triaged

Bug description:
  A remaining TODO item from the systemdification (bug 1312976) was to
  only start rpc.statd if /etc/default/nfs-common enables NEED_STATD=.
  This is a bit awkward with systemd and we generally avoid/move away
  from such "enable the unit" config files as they are redundant with
  update-rc.d enable/disable and systemctl enable/disable (which is the
  canonical way to enable/disable a unit).

  We should probably just add a comment pointing to systemctl
  enable/disable, and make sure that this works as intended.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1428486/+subscriptions



More information about the foundations-bugs mailing list