resource-agents: master - rgmanager: halvm: Check ownership before stripping tags
Lon Hohberger
lon at fedoraproject.org
Mon Jan 25 23:05:49 UTC 2010
Gitweb: http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git;a=commitdiff;h=83c569553c8fe3dbfbb158958a52e2f227c185dd
Commit: 83c569553c8fe3dbfbb158958a52e2f227c185dd
Parent: efba9f7fd19274bd0cc0d4711db59b69f36d9473
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: Mon Jan 25 18:05:38 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 2c6262f..54e67bf 100644
--- a/rgmanager/src/resources/lvm_by_lv.sh
+++ b/rgmanager/src/resources/lvm_by_lv.sh
@@ -199,6 +199,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