cluster: RHEL54 - rgmanager: halvm: Check ownership before stripping tags

Lon Hohberger lon at fedoraproject.org
Thu Jan 28 18:36:59 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a5eb8fff0bfbb270b13538018620302e154523b9
Commit:        a5eb8fff0bfbb270b13538018620302e154523b9
Parent:        a8d2b47fe7aca0bd061e86fde33be2d28cdef956
Author:        Jonathan E. Brassow <jbrassow at redhat.com>
AuthorDate:    Mon Jan 25 17:56:41 2010 -0500
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Thu Jan 28 13:36:06 2010 -0500

rgmanager: halvm: Check ownership before stripping tags

Resolves: rhbz#557167

Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
 rgmanager/src/resources/lvm_by_lv.sh |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/rgmanager/src/resources/lvm_by_lv.sh b/rgmanager/src/resources/lvm_by_lv.sh
index 6691181..1937b9f 100644
--- a/rgmanager/src/resources/lvm_by_lv.sh
+++ b/rgmanager/src/resources/lvm_by_lv.sh
@@ -218,6 +218,15 @@ lv_activate_and_tag()
 			ocf_log err "Unable to delete tag from $lv_path"
 			return $OCF_ERR_GENERIC
 		fi
+
+		if [ `lvs --noheadings -o lv_tags $lv_path` == $tag ]; then
+			ocf_log notice "Removing ownership tag ($tag) from $lv_path"
+			lvchange --deltag $tag $lv_path
+			if [ $? -ne 0 ]; then
+				ocf_log err "Unable to delete tag from $lv_path"
+				return $OCF_ERR_GENERIC
+			fi
+		fi
 	fi
 
 	return $OCF_SUCCESS


More information about the cluster-commits mailing list