NFS Client Not Properly Unmounted on Halt/Reboot

Bug #610557 reported by Patrick Donnelly
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openvpn (Ubuntu)
Expired
Medium
Unassigned

Bug Description

(Note, this bug also exists in Debian.) I am using Ubuntu 10.04.1 LTS.

After installing the nfs-client package, Ubuntu installs the following rc0.d and rc6.d links:

$ ls -l /etc/rc0.d/S31umountnfs.sh
lrwxrwxrwx 1 root root 22 2009-02-19 19:22 /etc/rc0.d/S31umountnfs.sh -> ../init.d/umountnfs.sh
$ ls -l /etc/rc6.d/S31umountnfs.sh
lrwxrwxrwx 1 root root 22 2009-02-19 19:22 /etc/rc6.d/S31umountnfs.sh -> ../init.d/umountnfs.sh

These are incorrect for many reasons:

1) The /etc/init.d/umountnfs.sh script does nothing on "start".
2) The S20sendsigs script is run before this and kills all NFS processes.
3) NFS volumes mounted over openvpn will not be properly unmounted because openvpn is killed before the start script is run.

I propose that the umountnfs.sh script be changed (back) to a kill script with sufficiently low number so that it runs before other daemons like openvpn. I changed mine to run at K25:

# ls -l /etc/rc0.d/K25umountnfs.sh
lrwxrwxrwx 1 root root 22 2009-02-19 19:22 /etc/rc0.d/K25umountnfs.sh -> ../init.d/umountnfs.sh
# ls -l /etc/rc6.d/K25umountnfs.sh
lrwxrwxrwx 1 root root 22 2009-02-19 19:22 /etc/rc6.d/K25umountnfs.sh -> ../init.d/umountnfs.sh

Revision history for this message
Steve Langasek (vorlon) wrote :

Thank you for taking the time to report this issue and help to improve Ubuntu.

> 1) The /etc/init.d/umountnfs.sh script does nothing on "start".

That's not how "S" scripts are called in runlevels 0 and 6; this is not a bug.

> 2) The S20sendsigs script is run before this and kills all NFS processes.

No, this script does not kill any processes belonging to upstart jobs.

> 3) NFS volumes mounted over openvpn will not be properly unmounted because
> openvpn is killed before the start script is run.

This seems to be the real bug - a bug in openvpn for being stopped to early, not in nfs-utils. Reassigning to that package.

affects: nfs-utils (Ubuntu) → openvpn (Ubuntu)
Revision history for this message
Patrick Donnelly (batrick) wrote :

Ok, I didn't realize this despite reading the manual page for update-rc.d. Perhaps the man page should be updated to reflect:

>> 1) The /etc/init.d/umountnfs.sh script does nothing on "start".
>That's not how "S" scripts are called in runlevels 0 and 6; this is not a bug.

Thanks for the help.

Mathias Gug (mathiaz)
Changed in openvpn (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Chuck Short (zulcss) wrote :

Which version is this with?

chuck

Changed in openvpn (Ubuntu):
status: New → Incomplete
Revision history for this message
Patrick Donnelly (batrick) wrote :

On Ubuntu 10.10:

batrick@menzoberranzan:~$ uname -a
Linux menzoberranzan 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 18:42:20 UTC 2011 x86_64 GNU/Linux
batrick@menzoberranzan:~$ /usr/sbin/openvpn --version
OpenVPN 2.1.0 x86_64-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Jul 12 2010
Originally developed by James Yonan
Copyright (C) 2002-2009 OpenVPN Technologies, Inc. <email address hidden>

On Debian 5.0:

batrick@batbytes:/etc/openvpn$ uname -a
Linux batbytes.com 2.6.35.4-x86_64-linode16 #1 SMP Mon Sep 20 16:03:34 UTC 2010 x86_64 GNU/Linux
batrick@batbytes:/etc/openvpn$ /usr/sbin/openvpn --version
OpenVPN 2.1.0 x86_64-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Jul 12 2010
Originally developed by James Yonan
Copyright (C) 2002-2009 OpenVPN Technologies, Inc. <email address hidden>

Revision history for this message
Patrick Donnelly (batrick) wrote :

All you need to do to reproduce this is install openvpn and nfs-client: look at the startup script rc dependencies. NFS is wrongly killed *after* OpenVPN. This fix should be straightforward...

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for openvpn (Ubuntu) because there has been no activity for 60 days.]

Changed in openvpn (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Sebastian Schweizer (sebastians) wrote :

I have the same problem with openvpn and cifs.
$ ls -l /etc/rc0.d/ | grep -e umountnfs -e openvpn
lrwxrwxrwx 1 root root 17 2012-01-15 15:27 K01openvpn -> ../init.d/openvpn
lrwxrwxrwx 1 root root 22 2012-02-21 12:25 S03umountnfs.sh -> ../init.d/umountnfs.sh

Openvpn stops before my cifs is unmounted and therefore the system does not shutdown or reboot.

Ubuntu 11.10
initscripts 2.88dsf-13.10ubuntu4.1
openvpn 2.2.0-2ubuntu1
cifs-utils 2:5.0-1ubuntu2

Woraround for me:
Small init-script that umounts my cifs-mount before openvpn is stopped.
What would be the best change in the openvpn init script to fix the order?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.