Bug 678494 - netfs.sh patch, when network is lost it takes too long to unmount the NFS filesystems
Summary: netfs.sh patch, when network is lost it takes too long to unmount the NFS fil...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager
Version: 5.6
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: 5.7
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-18 09:10 UTC by Raul Mahiques
Modified: 2018-11-14 14:50 UTC (History)
6 users (show)

Fixed In Version: rgmanager-2.0.52-16.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 678497 (view as bug list)
Environment:
Last Closed: 2011-07-21 10:43:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Smaller patch for RHEL5 branch (1.27 KB, patch)
2011-03-22 00:59 UTC, Lon Hohberger
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1000 0 normal SHIPPED_LIVE Low: rgmanager security, bug fix, and enhancement update 2011-07-21 10:43:18 UTC

Description Raul Mahiques 2011-02-18 09:10:27 UTC
Description of problem:
With the current netfs.sh script when the network connection to an NFS server is lost the script takes too long to umount it.


Version-Release number of selected component (if applicable):
2.0.52-9.el5

How reproducible:
- Setup 2 NFS netfs resources in the cluster.
- Cut connectivity to the NFS share.


Steps to Reproduce:
1.Setup 2 or more NFS netfs resources in the cluster.

Example:
<resources>
      <netfs name="fs_shared_1" mountpoint="/mnt/fs_shared_1" host="x.x.x.x" export="fs_shared_1" fstype="nfs" force_unmount="1" options="rw,proto=tcp,rsize=32768,wsize=32768,soft" __enforce_timeouts="1"/>
      <netfs name="fs_shared_2" mountpoint="/mnt/fs_shared_2" host="x.x.x.x" export="fs_shared_2" fstype="nfs" force_unmount="1" options="rw,proto=tcp,rsize=32768,wsize=32768,soft" __enforce_timeouts="1"/>
      <netfs name="fs_shared_3" mountpoint="/mnt/fs_shared_3" host="x.x.x.x" export="fs_shared_3" fstype="nfs" options="rw,retry=1,proto=tcp,rsize=32768,wsize=32768,soft,timeo=5,retrans=2" force_unmount="1" __enforce_timeouts="1"/>
</resources>

2.Cut connectivity to the NFS share.

Example:
ifconfig ethX down

  
Actual results:
It takes too long time to umount the NFS filesystems.

Expected results:
It unmounts the NFS filesystem in a reasonable amount of time.

Additional info:


Patch:
#diff new_netfs.sh original_netfs.sh 
571,605c571,575
<                               ocf_log debug "Force unmount $mp"
<                               umount -f $mp
<                               isMounted $fullpath $mp
<                               case $? in
<                               $YES)       # already mounted
<                                       ocf_log debug "$fullpath still mounted on $mp"
<                                       ocf_log debug "Trying fuser $mp"
<                                       if [ $try -eq 1 ]; then
<                                               fuser -TERM -kvm "$mp"
<                                       else
<                                               fuser -kvm "$mp"
<                                       fi
<                                       ocf_log debug "Force unmount $mp"
<                                       umount -f $mp
<                               ;;  
<                               $NO)        # not mounted, continue
<                                       return $SUCCESS
<                               ;;
<                               $FAIL)
<                                       return $FAIL
<                               ;;
<                               esac
<                               isMounted $fullpath $mp
<                               case $? in
<                               $YES)       # already mounted
<                                       ocf_log debug "$fullpath still mounted on $mp"
<                                       return $FAIL
<                               ;;
<                               $NO)        # not mounted, continue
<                                       done=$YES
<                               ;;
<                               $FAIL)
<                                       return $FAIL
<                               ;;
<                               esac
---
>                               if [ $try -eq 1 ]; then
>                                       fuser -TERM -kvm "$mp"
>                               else
>                                       fuser -kvm "$mp"
>                               fi
606a577
>

Comment 1 Raul Mahiques 2011-02-21 14:17:46 UTC
557,559c557,558
<                       if [ ! "$force_umount" ]; then
<                               sync; sync; sync
<                       fi
---
> 
>                       sync; sync; sync
572,608c571,575
<                               ocf_log debug "Force unmount $mp"
<                               umount -f $mp
<                               isMounted $fullpath $mp
<                               case $? in
<                               $YES)       # already mounted
<                                       ocf_log debug "$fullpath still mounted on $mp"
<                                       ocf_log debug "Trying fuser $mp"
<                                       if [ $try -eq 1 ]; then
<                                               fuser -TERM -kvm "$mp"
<                                       else
<                                               fuser -kvm "$mp"
<                                       fi
<                                       ocf_log debug "Force unmount $mp"
<                                       umount -f $mp
<                               ;;  
<                               $NO)        # not mounted, continue
<                                       unset umount_failed
<                                       return $SUCCESS
<                               ;;
<                               $FAIL)
<                                       return $FAIL
<                               ;;
<                               esac
<                               isMounted $fullpath $mp
<                               case $? in
<                               $YES)       # already mounted
<                                       ocf_log debug "$fullpath still mounted on $mp"
<                                       return $FAIL
<                               ;;
<                               $NO)        # not mounted, continue
<                                       unset umount_failed
<                                       done=$YES
<                               ;;
<                               $FAIL)
<                                       return $FAIL
<                               ;;
<                               esac
---
>                               if [ $try -eq 1 ]; then
>                                       fuser -TERM -kvm "$mp"
>                               else
>                                       fuser -kvm "$mp"
>                               fi
609a577
>

Comment 2 Lon Hohberger 2011-03-22 00:59:58 UTC
Created attachment 486710 [details]
Smaller patch for RHEL5 branch

Smaller patch for RHEL5 branch

Comment 3 Lon Hohberger 2011-03-22 01:04:00 UTC
(Note: Patch does not apply to later versions of RHEL)

Comment 5 Lon Hohberger 2011-03-24 21:40:05 UTC
Neither of these patches help much if the client is issuing I/O to the NFS share, unfortunately. :(

Comment 12 errata-xmlrpc 2011-07-21 10:43:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-1000.html


Note You need to log in before you can comment on or make changes to this bug.