Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=3290dff9b88992... Commit: 3290dff9b88992e913b28dd57c6b64a3c2b75c8a Parent: 13005d1ff5246a332bfc6795ad443b0148cd11b2 Author: Ryan McCabe rmccabe@redhat.com AuthorDate: Mon Jul 16 11:21:43 2012 -0400 Committer: Ryan McCabe rmccabe@redhat.com CommitterDate: Mon Jul 16 11:21:43 2012 -0400
When the filesystem /etc lives on is completely full, umount will exit with exit status 16 if the umount syscall succeeded but it was unable to write a new mtab file because the disk is full. umount won't exit with status 16 under any other circumstances.
This patch changes the fs.sh, clusterfs.sh, and netfs.sh resource agents to check treat both exit status 0 and exit status 16 as success.
Resolves: rhbz#819595
Acked-by: Lon Hohberger lhh@redhat.com Signed-off-by: Ryan McCabe rmccabe@redhat.com --- rgmanager/src/resources/clusterfs.sh | 5 ++++- rgmanager/src/resources/fs.sh | 5 ++++- rgmanager/src/resources/netfs.sh | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/rgmanager/src/resources/clusterfs.sh b/rgmanager/src/resources/clusterfs.sh index 49eb724..ff28e3d 100755 --- a/rgmanager/src/resources/clusterfs.sh +++ b/rgmanager/src/resources/clusterfs.sh @@ -792,8 +792,11 @@ stop: Could not match $OCF_RESKEY_device with a real device" sync; sync; sync ocf_log info "unmounting $dev ($mp)"
+ # umount will exit with status 16 iff the umount(2) + # succeeded, but /etc/mtab could not be written. umount $mp - if [ $? -eq 0 ]; then + retval=$? + if [ $retval -eq 0 -o $retval -eq 16 ]; then umount_failed= done=$YES continue diff --git a/rgmanager/src/resources/fs.sh b/rgmanager/src/resources/fs.sh index a98cddc..9dec8d1 100755 --- a/rgmanager/src/resources/fs.sh +++ b/rgmanager/src/resources/fs.sh @@ -1102,8 +1102,11 @@ stop: Could not match $OCF_RESKEY_device with a real device" fi
ocf_log info "unmounting $mp" + # umount will exit with status 16 iff the umount(2) + # succeeded, but /etc/mtab could not be written. umount $mp - if [ $? -eq 0 ]; then + retval=$? + if [ $retval -eq 0 -o $retval -eq 16 ]; then umount_failed= done=$YES continue diff --git a/rgmanager/src/resources/netfs.sh b/rgmanager/src/resources/netfs.sh index 837a4c4..6089a0d 100755 --- a/rgmanager/src/resources/netfs.sh +++ b/rgmanager/src/resources/netfs.sh @@ -559,8 +559,11 @@ stopNFSFilesystem() { sync; sync; sync ocf_log info "unmounting $mp"
+ # umount will exit with status 16 iff the umount(2) + # succeeded, but /etc/mtab could not be written. umount $umount_flag $mp - if [ $? -eq 0 ]; then + retval=$? + if [ $retval -eq 0 -o $retval -eq 16 ]; then umount_failed= done=$YES continue
cluster-commits@lists.stg.fedorahosted.org