Bug#761909: systemd does not unmount nfs shares before bringing down the network interface
Martin Pitt
mpitt at debian.org
Mon Oct 5 10:15:29 BST 2015
Hello,
Giuseppe Bilotta [2014-09-16 20:15 +0200]:
> My fstab includes the line
>
> labrador:/oneforall /oneforall nfs auto,exec 0 0
>
> and the nfs share is automatically mounted when a network interface that
> can resolve `labrador` is brought up. I don't use NM nor wicd, so I
> bring the network interfaces up myself, typically with something like:
>
> sudo ifup wlan0=home
>
> However, when the network is brought down (manually, or automatically
> during system shutdown), the mountpoint is not unmounted, causing a
> number of issues.
This sounds very similar to https://launchpad.net/bugs/1492546 .
ifupdown's /etc/init.d/networking (and also /etc/init/networking.conf)
call functions check_network_file_systems() and check_network_swap()
and don't tear down the interface(s) in the above situation. This also
applies to e. g. iscsi.
But we don't do the same with the autogenerated ifup at .service -- that
always unconditionally calls "ifdown" on stopping. IMHO we should make
"systemctl stop ifup at ethX.service" a no-op at least during shutdown,
as stopping /etc/init.d/networking will stop them all anyway (or not,
if network file systems are being used).
We could change the ExecStop= to something like
/bin/sh -ec '[ "$(systemctl is-system-running)" = stopping ] || /sbin/ifdown %I"
Or we just declare that we don't support manual stops, and you are
supposed to run "sudo ifdown ethX" to stop an interface. This is also
reasonable as we consider ifup at .service more like an internal helper
unit, not an user-visible/actionable one.
For sure I don't want to replicate the entire
check_network_file_systems()/check_network_swap() logic in
ifup at .service -- running this once on shutdown is bad enough :-)
Thanks,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20151005/de5a5f7e/attachment.sig>
More information about the Pkg-systemd-maintainers
mailing list