FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 12-14-2007, 09:10 PM
 
Default cluster/rgmanager ChangeLog src/daemons/rg_eve ...

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: lhh@sourceware.org 2007-12-14 22:10:53

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

Log message:
Fix misc central events bugs.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&r1=1.65&r2=1.66
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_event.c.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_forward.c.diff?cvsroot=cluster&r1=1.12&r2=1.13

--- cluster/rgmanager/ChangeLog 2007/12/14 19:37:00 1.65
+++ cluster/rgmanager/ChangeLog 2007/12/14 22:10:52 1.66
@@ -1,6 +1,10 @@
2007-12-14 Lon Hohberger <lhh at redhat.com>
+ (Misc central_events fixes)
* Add return code for inability to run because of exclusive
tag
+ * Only initialize state once
+ * Fix master-node failover.
+ * Correctly return node after enable if request was forwarded

2007-12-12 Lon Hohberger <lhh at redhat.com>
* Misc changes; add missing ds.h
--- cluster/rgmanager/src/daemons/rg_event.c 2007/11/30 21:36:28 1.3
+++ cluster/rgmanager/src/daemons/rg_event.c 2007/12/14 22:10:53 1.4
@@ -314,28 +314,35 @@
if (_master)
return my_id();

+ m = member_list();
pthread_mutex_lock(&mi_mutex);
+
if (mi) {
master_id = mi->m_nodeid;
pthread_mutex_unlock(&mi_mutex);
- //clulog(LOG_DEBUG, "%d is master
", mi->m_nodeid);
- return master_id;
+ if (memb_online(m, master_id)) {
+ //clulog(LOG_DEBUG, "%d is master
", mi->m_nodeid);
+ goto out;
+ }
}
+
pthread_mutex_unlock(&mi_mutex);

memset(&_master_lock, 0, sizeof(_master_lock));
if (clu_lock(LKM_EXMODE, &_master_lock, LKF_NOQUEUE,
"Transition-Master") < 0) {
/* not us, find out who is master */
- return find_master();
+ master_id = find_master();
+ goto out;
}

- if (_master_lock.sb_status != 0)
- return -1;
+ if (_master_lock.sb_status != 0) {
+ master_id = -1;
+ goto out;
+ }

_master = 1;

- m = member_list();
memset(&masterinfo, 0, sizeof(masterinfo));
masterinfo.m_magic = EVENT_MASTER_MAGIC;
masterinfo.m_nodeid = my_id();
@@ -348,9 +355,11 @@
clulog(LOG_ERR, "Unable to advertise master"
" status to all nodes
");
}
- free_member_list(m);

- return my_id();
+ master_id = my_id();
+out:
+ free_member_list(m);
+ return master_id;
}


--- cluster/rgmanager/src/daemons/rg_forward.c 2007/11/30 21:36:28 1.12
+++ cluster/rgmanager/src/daemons/rg_forward.c 2007/12/14 22:10:53 1.13
@@ -185,7 +185,7 @@
msgctx_t *ctx = NULL, *resp_ctx = NULL;
cluster_member_list_t *m = NULL;
SmMessageSt *msgp = NULL, msg;
- int response_code = RG_EAGAIN, ret, target = -1, new_owner = 0;
+ int response_code = RG_EAGAIN, ret, target = -1;
int retries = 0;
struct fw_message *fwmsg = (struct fw_message *)arg;

@@ -246,13 +246,14 @@
swab_SmMessageSt(&msg);

response_code = msg.sm_data.d_ret;
+ target = msg.sm_data.d_svcOwner;

out_fail:
free(fwmsg);

if (resp_ctx) {
send_ret(resp_ctx, msgp->sm_data.d_svcName, response_code,
- msgp->sm_data.d_action, new_owner);
+ msgp->sm_data.d_action, target);
msg_close(resp_ctx);
msg_free_ctx(resp_ctx);
}
 

Thread Tools




All times are GMT. The time now is 01:12 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org