Gitweb: http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git;a=... Commit: e152ed4b6d86f4fb558c1cebe2cd51097b8b2543 Parent: 0c2fba3fc8c100a3aaf32e383a8954ae87916e06 Author: Lon Hohberger lhh@redhat.com AuthorDate: Wed Apr 14 15:41:52 2010 -0400 Committer: Fabio M. Di Nitto fdinitto@redhat.com CommitterDate: Tue Jul 6 05:38:48 2010 +0200
Revert "resource-agents: Kill correct PIDs during force_unmount"
This reverts commit c5f279928da14f72fac458bd2439b43ea95e66df.
The bug did not apply to STABLE3. --- rgmanager/src/resources/fs.sh.in | 27 +++++++++++++-------------- 1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/rgmanager/src/resources/fs.sh.in b/rgmanager/src/resources/fs.sh.in index b037796..1454295 100644 --- a/rgmanager/src/resources/fs.sh.in +++ b/rgmanager/src/resources/fs.sh.in @@ -691,7 +691,6 @@ killMountProcesses() typeset have_lsof="" typeset have_fuser="" typeset try - typeset command pid user line
if [ $# -ne 1 ]; then ocf_log err \ @@ -728,30 +727,30 @@ killMountProcesses() # # Use lsof to free up mount point # - while read line + while read command pid user do - path=$(echo $line | awk '{for (i=9;i<NF+1;i++) {printf "%s ",$i};}') - #if [ -z $(echo $path | grep -E "$mp(/| |$)") ] - if [ -z $(echo $path | grep -E "^$mp/.*") ]; then + if [ -z "$pid" ]; then continue fi - command=$(echo $line | awk '{print $1}') - pid=$(echo $line | awk '{print $2}') - user=$(echo $line | awk '{print $3}') + if [ $try -eq 1 ]; then - ocf_log warn "killing process $pid ($user $command $mp)" + ocf_log warn \ + "killing process $pid ($user $command $mp)" elif [ $try -eq 3 ]; then - ocf_log crit "Could not clean up mountpoint $mp" - ret=$FAIL + ocf_log crit \ + "Could not clean up mountpoint $mp" + ret=$FAIL fi + if [ $try -gt 1 ]; then kill -9 $pid else kill -TERM $pid fi - done< <(lsof -bn 2>/dev/null | \ - grep -E " $mp(/| |$)" | \ - sort -u -k 1,3) + done < <(lsof -bn 2>/dev/null | \ + grep -E " $mp(/| |$)" | \ + awk '{print $1,$2,$3}' | \ + sort -u -k 1,3) elif [ -n "$have_fuser" ]; then # # Use fuser to free up mount point
cluster-commits@lists.fedorahosted.org