Package: initscripts
Version: 2.88dsf-53
Severity: important
File: /etc/network/if-up.d/mountnfs
Tags: patch

The /etc/init.d/networking SysV init script provides the $network LSB facility
which is mapped to network.target in systemd.

This SysV init script is run during early boot (rcS) and calls the mountnfs
if-up.d hook which in turn calls /etc/init.d/rpcbind start.

The rpcbind SysV init script though depends on $network itself. This leads
to a dependency loop.

Under systemd, where those dependencies are evaluated during runtime this
results in a dead lock.

Since systemd has builtin support for mounting remote files systems, we
simply skip this hook during early.

Eventually, we should make rpcbind socket activate to break this
dependency loop, but for now this workaround will do.

As this currently breaks setups where systemd is used in combination
with NFS, we would appreciate if you can apply the attached patch in
your next upload as soon as possible.

Cheers,
Michael

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

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

Versions of packages initscripts depends on:
ii  coreutils       8.21-1.2
ii  debianutils     4.4
ii  libc6           2.18-5
ii  lsb-base        4.1+Debian12
ii  mount           2.20.1-5.7
ii  sysv-rc         2.88dsf-53
ii  sysvinit-utils  2.88dsf-53

Versions of packages initscripts recommends:
ii  e2fsprogs  1.42.9-3
ii  psmisc     22.21-2

initscripts suggests no packages.

-- Configuration Files:
/etc/default/tmpfs changed [not included]
/etc/network/if-up.d/mountnfs changed [not included]

-- no debconf information
>From e62993a7c2ba302cbd8322a6633e3ebc9fb9b09e Mon Sep 17 00:00:00 2001
From: Michael Biebl <[email protected]>
Date: Thu, 1 May 2014 19:23:05 +0200
Subject: [PATCH] Use systemd built-in mechanisms for mounting remote file
 systems like NFS during early boot

The /etc/init.d/networking SysV init script provides the $network LSB
facility which is mapped to network.target in systemd.

This SysV init script is run during early boot (rcS) and calls the
mountnfs if-up.d hook which in turn calls /etc/init.d/rpcbind start.

The rpcbind SysV init script though depends on $network itself. This
leads to a dependency loop.

Under systemd, where those dependencies are evaluated during runtime
this results in a dead lock.

Since systemd has builtin support for mounting remote files systems, we
simply skip this hook during early.
---
 debian/src/initscripts/etc/network/if-up.d/mountnfs | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/debian/src/initscripts/etc/network/if-up.d/mountnfs b/debian/src/initscripts/etc/network/if-up.d/mountnfs
index ebefee9..fd4bcde 100644
--- a/debian/src/initscripts/etc/network/if-up.d/mountnfs
+++ b/debian/src/initscripts/etc/network/if-up.d/mountnfs
@@ -7,6 +7,13 @@
 #                    Also mounts SMB filesystems now, so the name of
 #                    this script is getting increasingly inaccurate.
 
+
+# If systemd is active, rely on the systemd built-in mechanisms to
+# mount remote file systems during early boot
+if [ -d /run/systemd/system ] ; then
+	systemctl --quiet is-active network.target || exit 0
+fi
+
 PATH=/sbin:/bin
 . /lib/init/vars.sh
 
-- 
2.0.0.rc0

Reply via email to