Package: rpcbind
Version: 0.2.1-3
Severity: important
Tags: patch

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

When running under systemd:

o  NFS mounts from /etc/fstab do not work.

o NFS exports also fail due to rpcbind not starting before nfs-common and nfs-
kernel-server

systemd is the new default system init for linux.  The above should just work.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Created my own /etc/tmpfiles.d/rpcbind.conf:

--------
#Type Path        Mode UID  GID  Age Argument
d     /run/rpcbind 0755 root root - -
f     /run/rpcbind/rpcbind.xdr 0600 root root - -
f     /run/rpcbind/portmap.xdr 0600 root root - -
--------

and /lib/systemd/system file (I did this one in /etc/systemd/system):

-------
[Unit]
Description=RPC bind portmap service
After=systemd-tmpfiles-setup.service
Wants=remote-fs-pre.target
Before=remote-fs-pre.target
DefaultDependencies=no

[Service]
ExecStart=/sbin/rpcbind -f -w
KillMode=process
Restart=on-failure

[Install]
WantedBy=sysinit.target
Alias=portmap
--------

and enabled above unit:

# systemctl enable rpcbind.service

Did for nfs-common to make NFS rpc support to start at correct time:

Created /etc/systemd/system/nfs-common.service (can be put in
/lib/systemd/system
--------
[Unit]
Description=NFS Common daemons
Wants=remote-fs-pre.target
DefaultDependencies=no

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/etc/init.d/nfs-common start
ExecStop=/etc/init.d/nfs-common stop

[Install]
WantedBy=sysinit.target

---------
# systemctl enable nfs-common


   * What was the outcome of this action?

Rpc Bind starting correctly, with registration state saving over restart, NFS
service working normally

# systemctl status rpcbind
rpcbind.service - RPC bind portmap service
   Loaded: loaded (/etc/systemd/system/rpcbind.service; enabled)
  Drop-In: /run/systemd/generator/rpcbind.service.d
           └─50-rpcbind-$portmap.conf
   Active: active (running) since Wed 2014-05-14 10:38:13 NZST; 13min ago
 Main PID: 5066 (rpcbind)
   CGroup: name=systemd:/system/rpcbind.service
           └─5066 /sbin/rpcbind -f -w

May 14 10:38:13 moriah systemd[1]: Started RPC bind portmap service.

# systemctl status nfs-common
nfs-common.service - NFS Common daemons
   Loaded: loaded (/etc/systemd/system/nfs-common.service; enabled)
   Active: active (exited) since Wed 2014-05-14 10:35:01 NZST; 19min ago
 Main PID: 259 (code=exited, status=0/SUCCESS)
   CGroup: name=systemd:/system/nfs-common.service

Warning: Journal has been rotated since unit was started. Log output is
incomplete or unavailable.

All the NFS RPC daemons have port activation in latest nfs-utils upstream, and
service files.  Please consider using these as the socket activation saves
haing to manually configure which NFS RPC daemons are needed.




-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_NZ.utf8, LC_CTYPE=en_NZ.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages rpcbind depends on:
ii  initscripts  2.88dsf-53
ii  insserv      1.14.0-5
ii  libc-bin     2.18-5
ii  libc6        2.18-5
ii  libtirpc1    0.2.2-7
ii  libwrap0     7.6.q-25
ii  lsb-base     4.1+Debian12

rpcbind recommends no packages.

rpcbind suggests no packages.

-- no debconf information
#Type Path        Mode UID  GID  Age Argument
d     /run/rpcbind 0755 root root - -
f     /run/rpcbind/rpcbind.xdr 0600 root root - -
f     /run/rpcbind/portmap.xdr 0600 root root - -
[Unit]
Description=NFS Common daemons
Wants=remote-fs-pre.target
DefaultDependencies=no

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/etc/init.d/nfs-common start
ExecStop=/etc/init.d/nfs-common stop

[Install]
WantedBy=sysinit.target

[Unit]
Description=RPC bind portmap service
After=systemd-tmpfiles-setup.service
Wants=remote-fs-pre.target
Before=remote-fs-pre.target
DefaultDependencies=no

[Service]
ExecStart=/sbin/rpcbind -f -w
KillMode=process
Restart=on-failure

[Install]
WantedBy=sysinit.target
Alias=portmap

Reply via email to