cluster/rgmanager ChangeLog src/daemons/rg_for ...
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
rgmanager/ChangeLog +3 -1
@@ -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 <[email protected]> * include/resgroup.h: Add proto for rg_strerror
rgmanager/src/daemons/rg_forward.c +12 -4
@@ -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);
rgmanager/src/daemons/rg_thread.c +7 -2
@@ -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); }