All of lore.kernel.org
 help / color / mirror / Atom feed
From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/rgmanager ChangeLog src/daemons/rg_for ...
Date: 27 Sep 2006 18:58:54 -0000	[thread overview]
Message-ID: <20060927185854.1497.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2006-09-27 18:58:53

Modified files:
	rgmanager      : ChangeLog 
	rgmanager/src/daemons: rg_forward.c rg_thread.c 

Log message:
	Fix 202498

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&r1=1.26&r2=1.27
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_forward.c.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_thread.c.diff?cvsroot=cluster&r1=1.14&r2=1.15

--- cluster/rgmanager/ChangeLog	2006/09/27 16:32:13	1.26
+++ cluster/rgmanager/ChangeLog	2006/09/27 18:58:53	1.27
@@ -13,7 +13,7 @@
 	the "local" flag).  Fix node ID type.
 	* src/daemons/fo_domain.c: Fix node ID type, fix shadow declaration
 	of member_online
-	* src/daemons/sgroups.c: Unfix logic error that wasn't broken in the
+	* src/daemons/groups.c: Unfix logic error that wasn't broken in the
 	first place.
 	* src/daemons/main.c: Fix node ID types.  Add fourth ("clean")
 	param to node_event* to decide whether a node death is clean or not.
@@ -25,6 +25,8 @@
 	* src/utils/clustat.c: Fix logic error preventing nodes from properly
 	being flagged.  Apply patch from Fabio M. Di Nitto to fix bug where
 	clustat -s foo wasn't getting expanded to service:foo
+	* src/daemons/rg_forward.c, rg_thread.c: Make forwarding of enable
+	to specified target node work (#202498)
 
 2006-09-01 Lon Hohberger <lhh@redhat.com>
 	* include/resgroup.h: Add proto for rg_strerror
--- cluster/rgmanager/src/daemons/rg_forward.c	2006/08/07 22:05:01	1.6
+++ cluster/rgmanager/src/daemons/rg_forward.c	2006/09/27 18:58:53	1.7
@@ -27,7 +27,7 @@
 
 
 void
-build_message(SmMessageSt *msgp, int action, char *svcName, uint64_t target)
+build_message(SmMessageSt *msgp, int action, char *svcName, int target)
 {
 	msgp->sm_hdr.gh_magic = GENERIC_HDR_MAGIC;
 	msgp->sm_hdr.gh_command = RG_ACTION_REQUEST;
@@ -71,10 +71,18 @@
 	/* Construct message */
 	build_message(&msg, req->rr_request, req->rr_group, req->rr_target);
 
-	/* 
+	if (rgs.rs_owner == 0)
+		rgs.rs_owner = req->rr_target;
+	if (rgs.rs_owner == 0) {
+		msg_close(req->rr_resp_ctx);
+		msg_free_ctx(req->rr_resp_ctx);
+		rq_free(req);
+		clulog(LOG_ERR, "Attempt to forward to invalid node ID\n");
+		pthread_exit(NULL);
+	}
+
 	clulog(LOG_DEBUG, "Forwarding %s request to %d\n",
-	       rg_req_str(req->rr_request), (int)rgs.rs_owner);
-	 */
+	       rg_req_str(req->rr_request), rgs.rs_owner);
 
 	if (msg_open(MSG_CLUSTER, rgs.rs_owner, RG_PORT, &ctx, 10) < 0)  {
 		msg_close(req->rr_resp_ctx);
--- cluster/rgmanager/src/daemons/rg_thread.c	2006/07/19 18:43:32	1.14
+++ cluster/rgmanager/src/daemons/rg_thread.c	2006/09/27 18:58:53	1.15
@@ -232,8 +232,14 @@
 							req->rr_request);
 			break;
 
-		case RG_START:
 		case RG_ENABLE:
+			if (req->rr_target != 0 &&
+			    req->rr_target != my_id()) {
+				error = RG_EFORWARD;
+				ret = RG_NONE;
+				break;
+			}
+		case RG_START:
 			error = handle_start_req(myname, req->rr_request,
 						 &newowner);
 			break;
@@ -431,7 +437,6 @@
 		    (req->rr_resp_ctx)) {
 			send_response(error, req);
 		}
-
 		
 		rq_free(req);
 	}



                 reply	other threads:[~2006-09-27 18:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060927185854.1497.qmail@sourceware.org \
    --to=lhh@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.