Bug 760018

Summary: cifs only network mounts causes pause in shutdown
Product: Red Hat Enterprise Linux 6 Reporter: Rob <siology.io>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: medium    
Version: 6.0CC: azelinka, lnykryn, notting
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: initscripts-9.03.28-1.el6 Doc Type: Bug Fix
Doc Text:
Previous version could caused hang during shutdown, because it did not check if there are any mounted cifs filesystems. Current version will call netfs stop in that case.
Story Points: ---
Clone Of:
: 767818 (view as bug list) Environment:
Last Closed: 2012-06-20 13:09:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 767818    

Description Rob 2011-12-05 08:57:30 UTC
Description of problem:

If using a wifi connection and having cifs network mounts, the machine hangs for a while during shutdown. If mounts are first removed before shutdown, or machine uses a wired connection, this does not occur.

Version-Release number of selected component (if applicable):

9.34-2

How reproducible:

Always, at least on fedora 15 & 16. Should also manifest itself on rhel 6, but cannot confirm or deny at this time.

Steps to Reproduce:
1. Mount a network share with cifs (do not also have nfs or smbfs shares mounted, as the issue won't occur).
2. Shutdown machine (e.g: using poweroff command)
  
Actual results:

Machine pauses during shutdown, on fedora this occurs at the "F" logo during shutdown.

Expected results:

Constant shutdown progress.

Additional info:

Can be fixed by altering the section in /etc/init.d/network stop) section that looks like this:

NFSMTAB=$(LC_ALL=C awk '$3  ~ /^nfs/ { print $2 }' /proc/mounts)
SMBMTAB=$(LC_ALL=C awk '$3 == "smbfs" { print $2 }' /proc/mounts)
NCPMTAB=$(LC_ALL=C awk '$3 == "ncpfs" { print $2 }' /proc/mounts)
if [ -n "$NFSMTAB" -o -n "$SMBMTAB" -o -n "$NCPMTAB" ] ; then

to be this:

NFSMTAB=$(LC_ALL=C awk '$3  ~ /^nfs/ { print $2 }' /proc/mounts)
SMBMTAB=$(LC_ALL=C awk '$3 == "smbfs" { print $2 }' /proc/mounts)
CIFSMTAB=$(LC_ALL=C awk '$3 == "cifs" { print $2 }' /proc/mounts)
NCPMTAB=$(LC_ALL=C awk '$3 == "ncpfs" { print $2 }' /proc/mounts)
if [ -n "$NFSMTAB" -o -n "$SMBMTAB" -o -n "$CIFSMTAB" -o -n "$NCPMTAB" ] ; then

Comment 2 Rob 2011-12-05 22:24:49 UTC
the fix on the end of the previous comment may have been erroneous, or at least it dosen't consistently work. The issue is real enough though, if "umount <mount>" or "service netfs stop" is first issued the shutdown completes just fine. 

the netfs and network init scripts are 75 and 90 respectively, but it seems like its not unmounting correctly before taking the network down. Possibly it needs time to complete the unmount first which it isn't getting.

Comment 3 Bill Nottingham 2011-12-14 22:55:33 UTC
The CIFS problem in RHEL should be fixed with a backport of:
http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=3031ac68e251d5090c3e021fb387a9ba0c8f343d

In regards to what you're seeing in Fedora, I suspect it's more related to systemd, which is only in Fedora at the time.

Comment 6 Lukáš Nykrýn 2012-03-22 11:13:43 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previous version could caused hang during shutdown, because it did not check if there are any mounted cifs filesystems. Current version will call netfs stop in that case.

Comment 8 errata-xmlrpc 2012-06-20 13:09:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0816.html