[Bug 1438612] Re: remote file systems hang on shutdown, D-BUS stops too early

Adam Felson adam.ubuntu at thefelsons.us
Sat Sep 24 16:08:08 UTC 2016


after years of suffering with this bug, I found a solution that works for me.
 
I put a pre-down dispatch script for network manager to dismount nfs shares when bringing the network down.  This works even if a reboot is run from a shell.

In /etc/NetworkManager/dispatcher.d/nfs.sh:
/etc/NetworkManager/dispatcher.d/pre-down has a link to it as well. 
#!/bin/bash

IF=$1
STATUS=$2
logger -s "********************** NetworkManager dispatch script nfs, IF="$1"  STATUS="$2
 

case "$2" in
	pre-down)
	umount -a -t nfs
	service cups stop
	;;
 
	up)
    mount -a -t nfs
	;;

esac



I do NOT use the systemd automount fstab option as it'll try to
automount when this script is trying to dismount the nfs shares.

I also have it stop cups as kubuntu sometimes hangs bringing cups down.

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

Title:
  remote file systems hang on shutdown, D-BUS stops too early

Status in D-Bus:
  Won't Fix
Status in dbus package in Ubuntu:
  Fix Released

Bug description:
  (part of bug 1431774). During shutdown, D-Bus stops too early. In
  particular, it stops before NetworkManager and remote-fs.target,  so
  that any network unmount  will cause errors and hang the boot. This
  can be seen with

  $ journalctl -b -1 | egrep 'Stop.*(D-Bus|Network M|Remote F)'
  Mär 30 19:05:19 donald systemd[1]: Stopping D-Bus System Message Bus...
  Mär 30 19:05:19 donald systemd[1]: Stopped D-Bus System Message Bus.
  Mär 30 19:05:19 donald systemd[1]: Stopped target Remote File Systems.
  Mär 30 19:05:19 donald systemd[1]: Stopping Remote File Systems.
  Mär 30 19:05:19 donald systemd[1]: Stopped target Remote File Systems (Pre).
  Mär 30 19:05:19 donald systemd[1]: Stopping Remote File Systems (Pre).
  Mär 30 19:05:19 donald systemd[1]: Stopping Network Manager...
  Mär 30 19:05:42 donald systemd[1]: Stopped Network Manager.
  Mär 30 19:05:42 donald systemd[1]: Stopping D-Bus System Message Bus Socket.

  A quick workaround is to add After=dbus.service to
  /lib/systemd/system/NetworkManager.service's [Unit] section, but this
  should be fixed in a more general fashion.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1438612/+subscriptions



More information about the foundations-bugs mailing list