[Cluster-devel] Cluster Project branch, master, updated. gfs-kernel_0_1_22-66-ge2c8836
lhh at sourceware.org
lhh at sourceware.org
Tue Mar 11 14:47:43 UTC 2008
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".
http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=e2c8836c385b24f1e56674aa458e3b298b7a1cb9
The branch, master has been updated
via e2c8836c385b24f1e56674aa458e3b298b7a1cb9 (commit)
via 50cb9cec8a522fafbca262e99933d5186407909e (commit)
from 8b3e716720d8c66e183279589cf5d6f7d259ba96 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e2c8836c385b24f1e56674aa458e3b298b7a1cb9
Author: Lon Hohberger <lhh at redhat.com>
Date: Tue Mar 11 10:44:19 2008 -0400
[rgmanager] Don't call quotaoff if quotas are not used
commit 50cb9cec8a522fafbca262e99933d5186407909e
Author: Lon Hohberger <lhh at redhat.com>
Date: Tue Mar 11 10:43:37 2008 -0400
[CMAN] Fix "Node X is undead" loop bug
This was caused by an improper assignment to ps_incarnation
after a node decides to evict another node. The fix
is to simply make the internal (memory) assignments before
calling qd_write_status()
-----------------------------------------------------------------------
Summary of changes:
cman/qdisk/main.c | 34 +++++++++++++-------------
rgmanager/src/resources/fs.sh | 51 ++++++++++++++++++++++++++++++----------
2 files changed, 55 insertions(+), 30 deletions(-)
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index ca69624..8bd8c7d 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -252,23 +252,6 @@ check_transitions(qd_ctx *ctx, node_info_t *ni, int max, memb_mask_t mask)
state_run(ni[x].ni_status.ps_state)) {
/*
- Write eviction notice if we're the master.
- */
- if (ctx->qc_status == S_MASTER) {
- clulog(LOG_NOTICE,
- "Writing eviction notice for node %d\n",
- ni[x].ni_status.ps_nodeid);
- qd_write_status(ctx, ni[x].ni_status.ps_nodeid,
- S_EVICT, NULL, NULL, NULL);
- if (ctx->qc_flags & RF_ALLOW_KILL) {
- clulog(LOG_DEBUG, "Telling CMAN to "
- "kill the node\n");
- cman_kill_node(ctx->qc_ch,
- ni[x].ni_status.ps_nodeid);
- }
- }
-
- /*
Mark our internal views as dead if nodes miss too
many heartbeats... This will cause a master
transition if no live master exists.
@@ -285,6 +268,23 @@ check_transitions(qd_ctx *ctx, node_info_t *ni, int max, memb_mask_t mask)
ni[x].ni_evil_incarnation =
ni[x].ni_status.ps_incarnation;
+ /*
+ Write eviction notice if we're the master.
+ */
+ if (ctx->qc_status == S_MASTER) {
+ clulog(LOG_NOTICE,
+ "Writing eviction notice for node %d\n",
+ ni[x].ni_status.ps_nodeid);
+ qd_write_status(ctx, ni[x].ni_status.ps_nodeid,
+ S_EVICT, NULL, NULL, NULL);
+ if (ctx->qc_flags & RF_ALLOW_KILL) {
+ clulog(LOG_DEBUG, "Telling CMAN to "
+ "kill the node\n");
+ cman_kill_node(ctx->qc_ch,
+ ni[x].ni_status.ps_nodeid);
+ }
+ }
+
/* Clear our master mask for the node after eviction */
if (mask)
clear_bit(mask, (ni[x].ni_status.ps_nodeid-1),
diff --git a/rgmanager/src/resources/fs.sh b/rgmanager/src/resources/fs.sh
index 10a167f..1de57d3 100755
--- a/rgmanager/src/resources/fs.sh
+++ b/rgmanager/src/resources/fs.sh
@@ -797,21 +797,14 @@ activeMonitor() {
#
-# Enable quotas on the mount point if the user requested them
+# Decide which quota options are enabled and return a string
+# which we can pass to quotaon
#
-enable_fs_quotas()
+quota_opts()
{
- declare -i need_check=0
- declare -i rv
declare quotaopts=""
- declare mopt
declare opts=$1
- declare mp=$2
-
- if [ -z "`which quotaon`" ]; then
- ocf_log err "quotaon not found in $PATH"
- return $OCF_ERR_GENERIC
- fi
+ declare mopt
for mopt in `echo $opts | sed -e s/,/\ /g`; do
case $mopt in
@@ -830,6 +823,33 @@ enable_fs_quotas()
esac
done
+ echo $quotaopts
+ return 0
+}
+
+
+
+#
+# Enable quotas on the mount point if the user requested them
+#
+enable_fs_quotas()
+{
+ declare -i need_check=0
+ declare -i rv
+ declare quotaopts=""
+ declare mopt
+ declare opts=$1
+ declare mp=$2
+
+ if [ -z "`which quotaon`" ]; then
+ ocf_log err "quotaon not found in $PATH"
+ return $OCF_ERR_GENERIC
+ fi
+
+ quotaopts=$(quota_opts $opts)
+
+ ocf_log info "quotaopts = $quotaopts"
+
[ -z "$quotaopts" ] && return 0
# Ok, create quota files if they don't exist
@@ -1089,6 +1109,7 @@ stopFilesystem() {
typeset force_umount=""
typeset self_fence=""
typeset fstype=""
+ typeset quotaopts=""
#
@@ -1154,11 +1175,15 @@ stop: Could not match $OCF_RESKEY_device with a real device"
;;
$YES)
sync; sync; sync
- ocf_log info "unmounting $mp"
+ quotaopts=$(quota_opts $OCF_RESKEY_options)
+ if [ -n "$quotaopts" ]; then
+ ocf_log debug "Turning off quotas for $mp"
+ quotaoff -$quotaopts $mp &> /dev/null
+ fi
activeMonitor stop || return $OCF_ERR_GENERIC
- quotaoff -gu $mp &> /dev/null
+ ocf_log info "unmounting $mp"
umount $mp
if [ $? -eq 0 ]; then
umount_failed=
hooks/post-receive
--
Cluster Project
More information about the Cluster-devel
mailing list