cluster: RHEL6 - Set m.owner_nodeid to the our node id when NAKing requests when the cluster is inquorate.

Ryan McCabe rmccabe at fedoraproject.org
Tue May 1 15:01:46 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=ef03894f10f1ffc51422dd89a310e887c043e543
Commit:        ef03894f10f1ffc51422dd89a310e887c043e543
Parent:        84afab18b0e17080dcc7868060231d3282d4ab51
Author:        Ryan McCabe <rmccabe at redhat.com>
AuthorDate:    Wed Apr 25 15:31:09 2012 -0400
Committer:     Ryan McCabe <rmccabe at redhat.com>
CommitterDate: Tue May 1 11:00:17 2012 -0400

Set m.owner_nodeid to the our node id when NAKing requests when the cluster is inquorate.

Signed-off-by: Ryan McCabe <rmccabe at redhat.com>
Reviewed-by: Lon Hohberger <lhh at redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 rgmanager/src/daemons/cpglockd.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/daemons/cpglockd.c b/rgmanager/src/daemons/cpglockd.c
index 1f69ef8..df18eb3 100644
--- a/rgmanager/src/daemons/cpglockd.c
+++ b/rgmanager/src/daemons/cpglockd.c
@@ -1736,11 +1736,13 @@ main(int argc, char **argv)
 				/* XXX check for dup connection */
 				if (m.request == MSG_LOCK) {
 					if (!cluster_quorate) {
+						m.request = MSG_NAK;
+						m.owner_nodeid = my_node_id;
+
 						logt_print(LOG_DEBUG, "Sending NAK for new lock request while not quorate (%s [%d:%d:%d])\n",
 							m.resource, m.owner_nodeid,
 							m.owner_pid, m.owner_tid);
 
-						m.request = MSG_NAK;
 						if (write_retry(client->fd, &m, sizeof(m), NULL) < 0) {
 							logt_print(LOG_DEBUG,
 								"Error sending NAK for %s [%d:%d:%d]: %s\n",


More information about the cluster-commits mailing list