[Bug 1451775] Re: Unable to configure sm-notify

Steve Langasek steve.langasek at canonical.com
Tue May 5 14:21:55 UTC 2015


Two things:

 - This bug is not an issue in Ubuntu 15.04 and later, where Ubuntu has switched to systemd.  In systemd, the /lib/systemd/system/rpc-statd-notify.service unit picks up the value of $SMNOTIFYARGS from /etc/defaults/nfs-common by way of /usr/lib/systemd/scripts/nfs-utils_env.sh.
- In upstart (pre-Ubuntu 15.04), while it might be more convenient to pick up options to sm-notify via /etc/default/nfs-common, at the time we transitioned away from sysvinit in Ubuntu there was no support for passing options to sm-notify, so the upstart job does not support this.  However, this is not the only way to override the arguments in an upstart job (and in fact is not the preferred way to override arguments in an upstart job).  You can also either edit /etc/init/statd.conf (it's a conffile) or add an /etc/init/statd.override file which contains:

pre-start script
        logger -t statd-pre-start "$UPSTART_EVENTS" || true
        echo UPSTART_EVENTS = "$UPSTART_EVENTS"

    exec sm-notify <my args here>
end script

As this is fixed in 15.04, and there is a workaround for earlier
releases (and the impact does not warrant an SRU), I'm closing this bug
report.

** Changed in: nfs-utils (Ubuntu)
       Status: New => Fix Released

-- 
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/1451775

Title:
  Unable to configure sm-notify

Status in nfs-utils package in Ubuntu:
  Fix Released

Bug description:
  I want to configure sm-notify to use a pre-configured port (at least)
  for communication, so that I can open up my iptables rules
  specifically.

  In the current situation, the upstart job for statd just calls "exec
  sm-notify" without providing any environment variables for
  configuration.

  Looking into the source of sm-notify there are no environment
  variables being picked up for configuration, so all has to be done
  using command invocation options/arguments. This, however, is
  currently impossible.

  As such, whenever I restart Ubuntu clients, the iptables rules block
  out sm-notify communication because it uses a randomly chosen
  privileged port. This is even more important for the NFS-server side,
  where I also only allow certain well-known incoming ports to
  communicate. So even if the client-side outgoing iptables rules would
  allow any, the server incoming configuration would block it because
  the source port is not "well-known" and is most likely different for
  each client for each system restart.

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



More information about the foundations-bugs mailing list