Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=4d2... Commit: 4d24a40f7d0b19d145d03c365a9505fe0927b886 Parent: dbe5e99513b5c6e26aeb70baea075e16084f84ec Author: Lon Hohberger lhh@redhat.com AuthorDate: Wed Jun 30 12:22:00 2010 -0400 Committer: Lon Hohberger lhh@redhat.com CommitterDate: Wed Jun 30 12:23:42 2010 -0400
resource-agents: fix incorrect link resolution in fs-lib
Fs-lib.sh was not resolving symbolic links prior to checking [ -b ], meaning that we would end up with a potential mismatch if what is in /proc/mounts did not match what was in cluster.conf, causing a service failure
Resolves: rhnz#609579
Signed-off-by: Lon Hohberger lhh@redhat.com --- rgmanager/src/resources/utils/fs-lib.sh | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/rgmanager/src/resources/utils/fs-lib.sh b/rgmanager/src/resources/utils/fs-lib.sh index bc3877e..32667ed 100644 --- a/rgmanager/src/resources/utils/fs-lib.sh +++ b/rgmanager/src/resources/utils/fs-lib.sh @@ -116,12 +116,6 @@ real_device()
[ -z "$dev" ] && return $OCF_ERR_ARGS
- # If our provided blockdev is a device, we are done - if [ -b "$dev" ]; then - REAL_DEVICE="$dev" - return $OCF_SUCCESS - fi - # Oops, we have a link. Sorry, this is going to fork. if [ -h "$dev" ]; then realdev=$(readlink -f $dev) @@ -132,6 +126,12 @@ real_device() return $OCF_SUCCESS fi
+ # If our provided blockdev is a device, we are done + if [ -b "$dev" ]; then + REAL_DEVICE="$dev" + return $OCF_SUCCESS + fi + # It's not a link, it's not a block device. If it also # does not match UUID= or LABEL=, then findfs is not # going to find anything useful, so we should quit now.