Accepting request 54310 from network:ha-clustering:Factory

Accepted submit request 54310 from user colyli

OBS-URL: https://build.opensuse.org/request/show/54310
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/corosync?expand=0&rev=4
This commit is contained in:
Marcus Rückert 2010-12-02 15:10:16 +00:00 committed by Git OBS Bridge
parent aa4184eba9
commit 6e06a5b53b
26 changed files with 79 additions and 832 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d919d9817c4cde9e3d38e6f79731d9e1cd53485c6160bd253d888fa58a87a43d
size 668446

3
corosync-1.2.7.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0f774cee5d9f5d3e20b146c8719115c029815015952b48de1b99b61b462367d1
size 687322

View File

@ -1,9 +1,10 @@
diff -ur corosync-1.2.0.orig//conf/corosync.conf.example corosync-1.2.0/conf/corosync.conf.example
--- corosync-1.2.0.orig//conf/corosync.conf.example 2009-06-26 02:25:52.000000000 +0200
+++ corosync-1.2.0/conf/corosync.conf.example 2010-02-08 15:51:10.783160000 +0100
@@ -20,7 +20,7 @@
Index: corosync-1.2.6/conf/corosync.conf.example
===================================================================
--- corosync-1.2.6.orig/conf/corosync.conf.example
+++ corosync-1.2.6/conf/corosync.conf.example
@@ -20,7 +20,7 @@ logging {
to_syslog: yes
logfile: /tmp/corosync.log
logfile: /var/log/cluster/corosync.log
debug: off
- timestamp: on
+ timestamp: off

View File

@ -1,55 +0,0 @@
Index: trunk/services/Makefile.am
===================================================================
--- trunk/services/Makefile.am (revision 2728)
+++ trunk/services/Makefile.am (revision 2729)
@@ -68,10 +68,10 @@
else
quorum_%.lcrso: %.o
- $(CC) $(CFLAGS) -shared -Wl,-soname=$@ $^ -o $@
+ $(CC) $(CFLAGS) $(COVERAGE_LCRSO_EXTRA_LDFLAGS) -shared -Wl,-soname=$@ $^ -o $@
service_%.lcrso: %.o
- $(CC) $(CFLAGS) -shared -Wl,-soname=$@ $^ -o $@
+ $(CC) $(CFLAGS) $(COVERAGE_LCRSO_EXTRA_LDFLAGS) -shared -Wl,-soname=$@ $^ -o $@
endif
endif
Index: trunk/exec/Makefile.am
===================================================================
--- trunk/exec/Makefile.am (revision 2728)
+++ trunk/exec/Makefile.am (revision 2729)
@@ -122,7 +122,7 @@
else
%.lcrso: %.o
- $(CC) $(CFLAGS) -shared -Wl,-soname=$@ $^ -o $@
+ $(CC) $(CFLAGS) $(COVERAGE_LCRSO_EXTRA_LDFLAGS) -shared -Wl,-soname=$@ $^ -o $@
libtotem_pg.so.$(SONAME): $(TOTEM_OBJS)
$(CC) -shared -o $@ \
Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac (revision 2728)
+++ trunk/configure.ac (revision 2729)
@@ -390,10 +390,12 @@
OPT_CFLAGS="-O0"
COVERAGE_CFLAGS="-ftest-coverage -fprofile-arcs"
COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
+ COVERAGE_LCRSO_EXTRA_LDFLAGS="-rdynamic"
PACKAGE_FEATURES="$PACKAGE_FEATURES coverage"
else
COVERAGE_CFLAGS=""
COVERAGE_LDFLAGS=""
+ COVERAGE_LCRSO_EXTRA_LDFLAGS=""
fi
@@ -437,6 +439,6 @@
AC_SUBST([SONAME])
AC_SUBST([CPG_SONAME])
-
+AC_SUBST([COVERAGE_LCRSO_EXTRA_LDFLAGS])
AC_SUBST([OS_DYFLAGS])
AC_SUBST([OS_LDL])

View File

@ -1,13 +0,0 @@
Index: trunk/exec/service.c
===================================================================
--- trunk/exec/service.c (revision 2730)
+++ trunk/exec/service.c (revision 2731)
@@ -436,7 +436,7 @@
(void *)&service_id, NULL);
if(service_id != NULL
- && *service_id > 0
+ && *service_id >= 0
&& *service_id < SERVICE_HANDLER_MAXIMUM_COUNT
&& ais_service[*service_id] != NULL) {

View File

@ -1,45 +0,0 @@
Index: trunk/exec/util.h
===================================================================
--- trunk/exec/util.h (revision 2738)
+++ trunk/exec/util.h (revision 2739)
@@ -44,23 +44,23 @@
extern cs_time_t clust_time_now(void);
enum e_ais_done {
- AIS_DONE_EXIT = -1,
- AIS_DONE_UID_DETERMINE = -2,
- AIS_DONE_GID_DETERMINE = -3,
- AIS_DONE_MEMPOOL_INIT = -4,
- AIS_DONE_FORK = -5,
- AIS_DONE_LIBAIS_SOCKET = -6,
- AIS_DONE_LIBAIS_BIND = -7,
- AIS_DONE_READKEY = -8,
- AIS_DONE_MAINCONFIGREAD = -9,
- AIS_DONE_LOGSETUP = -10,
- AIS_DONE_AMFCONFIGREAD = -11,
- AIS_DONE_DYNAMICLOAD = -12,
- AIS_DONE_OBJDB = -13,
- AIS_DONE_INIT_SERVICES = -14,
- AIS_DONE_OUT_OF_MEMORY = -15,
- AIS_DONE_FATAL_ERR = -16,
- AIS_DONE_DIR_NOT_PRESENT = -17
+ AIS_DONE_EXIT = 0,
+ AIS_DONE_UID_DETERMINE = 1,
+ AIS_DONE_GID_DETERMINE = 2,
+ AIS_DONE_MEMPOOL_INIT = 3,
+ AIS_DONE_FORK = 4,
+ AIS_DONE_LIBAIS_SOCKET = 5,
+ AIS_DONE_LIBAIS_BIND = 6,
+ AIS_DONE_READKEY = 7,
+ AIS_DONE_MAINCONFIGREAD = 8,
+ AIS_DONE_LOGSETUP = 9,
+ AIS_DONE_AMFCONFIGREAD = 10,
+ AIS_DONE_DYNAMICLOAD = 11,
+ AIS_DONE_OBJDB = 12,
+ AIS_DONE_INIT_SERVICES = 13,
+ AIS_DONE_OUT_OF_MEMORY = 14,
+ AIS_DONE_FATAL_ERR = 15,
+ AIS_DONE_DIR_NOT_PRESENT = 16
};
/*

View File

@ -1,60 +0,0 @@
Index: trunk/exec/objdb.c
===================================================================
--- trunk/exec/objdb.c (revision 2745)
+++ trunk/exec/objdb.c (revision 2746)
@@ -1087,6 +1087,10 @@
}
hdb_handle_put (&object_instance_database, object_handle);
+ if (res == 0) {
+ object_key_changed_notification (object_handle, key_name, key_len,
+ object_key->value, object_key->value_len, OBJECT_KEY_REPLACED);
+ }
objdb_rdunlock();
return (res);
@@ -1170,6 +1174,10 @@
}
hdb_handle_put (&object_instance_database, object_handle);
+ if (res == 0) {
+ object_key_changed_notification (object_handle, key_name, key_len,
+ object_key->value, object_key->value_len, OBJECT_KEY_REPLACED);
+ }
objdb_rdunlock();
return (res);
@@ -1244,6 +1252,7 @@
struct object_key *object_key = NULL;
struct list_head *list;
int found = 0;
+ int value_changed = 0;
objdb_rdlock();
@@ -1308,8 +1317,14 @@
free(object_key->value);
object_key->value = replacement_value;
}
- memcpy(object_key->value, new_value, new_value_len);
- object_key->value_len = new_value_len;
+ if (memcmp (object_key->value, new_value, new_value_len) == 0) {
+ value_changed = 0;
+ }
+ else {
+ memcpy(object_key->value, new_value, new_value_len);
+ object_key->value_len = new_value_len;
+ value_changed = 1;
+ }
}
else {
ret = -1;
@@ -1317,7 +1332,7 @@
}
hdb_handle_put (&object_instance_database, object_handle);
- if (ret == 0) {
+ if (ret == 0 && value_changed) {
object_key_changed_notification (object_handle, key_name, key_len,
new_value, new_value_len, OBJECT_KEY_REPLACED);
}

View File

@ -1,89 +0,0 @@
Index: trunk/lib/coroipcc.c
===================================================================
--- trunk/lib/coroipcc.c (revision 2747)
+++ trunk/lib/coroipcc.c (revision 2748)
@@ -654,42 +654,42 @@
goto error_connect;
}
- res = memory_map (
+ sys_res = memory_map (
control_map_path,
"control_buffer-XXXXXX",
(void *)&ipc_instance->control_buffer,
8192);
- if (res == -1) {
+ if (sys_res == -1) {
res = CS_ERR_LIBRARY;
goto error_connect;
}
- res = memory_map (
+ sys_res = memory_map (
request_map_path,
"request_buffer-XXXXXX",
(void *)&ipc_instance->request_buffer,
request_size);
- if (res == -1) {
+ if (sys_res == -1) {
res = CS_ERR_LIBRARY;
goto error_request_buffer;
}
- res = memory_map (
+ sys_res = memory_map (
response_map_path,
"response_buffer-XXXXXX",
(void *)&ipc_instance->response_buffer,
response_size);
- if (res == -1) {
+ if (sys_res == -1) {
res = CS_ERR_LIBRARY;
goto error_response_buffer;
}
- res = circular_memory_map (
+ sys_res = circular_memory_map (
dispatch_map_path,
"dispatch_buffer-XXXXXX",
(void *)&ipc_instance->dispatch_buffer,
dispatch_size);
- if (res == -1) {
+ if (sys_res == -1) {
res = CS_ERR_LIBRARY;
goto error_dispatch_buffer;
}
@@ -699,7 +699,6 @@
sem_init (&ipc_instance->control_buffer->sem1, 1, 0);
sem_init (&ipc_instance->control_buffer->sem2, 1, 0);
#else
-
/*
* Allocate a semaphore segment
*/
@@ -718,18 +717,21 @@
* an existing shared memory segment for which we have access
*/
if (errno != EEXIST && errno != EACCES) {
+ res = CS_ERR_LIBRARY;
goto error_exit;
}
}
semun.val = 0;
- res = semctl (ipc_instance->semid, 0, SETVAL, semun);
- if (res != 0) {
+ sys_res = semctl (ipc_instance->semid, 0, SETVAL, semun);
+ if (sys_res != 0) {
+ res = CS_ERR_LIBRARY;
goto error_exit;
}
- res = semctl (ipc_instance->semid, 1, SETVAL, semun);
- if (res != 0) {
+ sys_res = semctl (ipc_instance->semid, 1, SETVAL, semun);
+ if (sys_res != 0) {
+ res = CS_ERR_LIBRARY;
goto error_exit;
}
#endif

View File

@ -1,123 +0,0 @@
Index: trunk/lib/cfg.c
===================================================================
--- trunk/lib/cfg.c (revision 2753)
+++ trunk/lib/cfg.c (revision 2754)
@@ -203,7 +203,7 @@
switch (dispatch_data->id) {
case MESSAGE_RES_CFG_TESTSHUTDOWN:
if (callbacks.corosync_cfg_shutdown_callback == NULL) {
- continue;
+ break;
}
res_lib_cfg_testshutdown = (struct res_lib_cfg_testshutdown *)dispatch_data;
Index: trunk/lib/cpg.c
===================================================================
--- trunk/lib/cpg.c (revision 2753)
+++ trunk/lib/cpg.c (revision 2754)
@@ -339,7 +339,7 @@
switch (dispatch_data->id) {
case MESSAGE_RES_CPG_DELIVER_CALLBACK:
if (callbacks.cpg_deliver_fn == NULL) {
- continue;
+ break;
}
res_cpg_deliver_callback = (struct res_lib_cpg_deliver_callback *)dispatch_data;
@@ -358,7 +358,7 @@
case MESSAGE_RES_CPG_CONFCHG_CALLBACK:
if (callbacks.cpg_confchg_fn == NULL) {
- continue;
+ break;
}
res_cpg_confchg_callback = (struct res_lib_cpg_confchg_callback *)dispatch_data;
Index: trunk/lib/votequorum.c
===================================================================
--- trunk/lib/votequorum.c (revision 2753)
+++ trunk/lib/votequorum.c (revision 2754)
@@ -742,7 +742,7 @@
case MESSAGE_RES_VOTEQUORUM_NOTIFICATION:
if (callbacks.votequorum_notify_fn == NULL) {
- continue;
+ break;
}
res_lib_votequorum_notification = (struct res_lib_votequorum_notification *)dispatch_data;
@@ -756,7 +756,7 @@
case MESSAGE_RES_VOTEQUORUM_EXPECTEDVOTES_NOTIFICATION:
if (callbacks.votequorum_expectedvotes_notify_fn == NULL) {
- continue;
+ break;
}
res_lib_votequorum_expectedvotes_notification = (struct res_lib_votequorum_expectedvotes_notification *)dispatch_data;
Index: trunk/lib/quorum.c
===================================================================
--- trunk/lib/quorum.c (revision 2753)
+++ trunk/lib/quorum.c (revision 2754)
@@ -387,7 +387,7 @@
case MESSAGE_RES_QUORUM_NOTIFICATION:
if (callbacks.quorum_notify_fn == NULL) {
- continue;
+ break;
}
res_lib_quorum_notification = (struct res_lib_quorum_notification *)dispatch_data;
Index: trunk/lib/confdb.c
===================================================================
--- trunk/lib/confdb.c (revision 2753)
+++ trunk/lib/confdb.c (revision 2754)
@@ -341,7 +341,7 @@
switch (dispatch_data->id) {
case MESSAGE_RES_CONFDB_KEY_CHANGE_CALLBACK:
if (callbacks.confdb_key_change_notify_fn == NULL) {
- continue;
+ break;
}
res_key_changed_pt = (struct res_lib_confdb_key_change_callback *)dispatch_data;
@@ -360,7 +360,7 @@
case MESSAGE_RES_CONFDB_OBJECT_CREATE_CALLBACK:
if (callbacks.confdb_object_create_change_notify_fn == NULL) {
- continue;
+ break;
}
res_object_created_pt = (struct res_lib_confdb_object_create_callback *)dispatch_data;
@@ -374,7 +374,7 @@
case MESSAGE_RES_CONFDB_OBJECT_DESTROY_CALLBACK:
if (callbacks.confdb_object_delete_change_notify_fn == NULL) {
- continue;
+ break;
}
res_object_destroyed_pt = (struct res_lib_confdb_object_destroy_callback *)dispatch_data;
Index: trunk/lib/evs.c
===================================================================
--- trunk/lib/evs.c (revision 2753)
+++ trunk/lib/evs.c (revision 2754)
@@ -279,7 +279,7 @@
switch (dispatch_data->id) {
case MESSAGE_RES_EVS_DELIVER_CALLBACK:
if (callbacks.evs_deliver_fn == NULL) {
- continue;
+ break;
}
res_evs_deliver_callback = (struct res_evs_deliver_callback *)dispatch_data;
@@ -292,7 +292,7 @@
case MESSAGE_RES_EVS_CONFCHG_CALLBACK:
if (callbacks.evs_confchg_fn == NULL) {
- continue;
+ break;
}
res_evs_confchg_callback = (struct res_evs_confchg_callback *)dispatch_data;

View File

@ -1,15 +0,0 @@
Index: trunk/man/corosync.conf.5
===================================================================
--- trunk/man/corosync.conf.5 (revision 2755)
+++ trunk/man/corosync.conf.5 (revision 2756)
@@ -119,6 +119,10 @@
This specifies the UDP port number. It is possible to use the same multicast
address on a network with the corosync services configured for different
UDP ports.
+Please note corosync uses two UDP ports mcastport (for mcast receives) and
+mcastport - 1 (for mcast sends).
+If you have multiple clusters on the same network using the same mcastaddr
+please configure the mcastports with a gap.
.PP
.PP

View File

@ -1,35 +0,0 @@
Index: trunk/exec/vsf_ykd.c
===================================================================
--- trunk/exec/vsf_ykd.c (revision 2766)
+++ trunk/exec/vsf_ykd.c (revision 2767)
@@ -193,7 +193,7 @@
struct ykd_header header;
int res;
- header.id = YKD_HEADER_SENDSTATE;
+ header.id = YKD_HEADER_ATTEMPT;
iovec.iov_base = (char *)&header;
iovec.iov_len = sizeof (struct ykd_header);
@@ -343,6 +343,7 @@
int all_received = 1;
int state_position = 0;
int i;
+ struct ykd_header *header = (struct ykd_header *)msg;
char *msg_state = (char *)msg + sizeof (struct ykd_header);
/*
@@ -390,6 +391,13 @@
}
}
+ /*
+ * Ignore messages from a different state
+ */
+ if ((ykd_mode == YKD_MODE_SENDSTATE && header->id == YKD_HEADER_ATTEMPT) ||
+ (ykd_mode == YKD_MODE_ATTEMPT && header->id == YKD_HEADER_SENDSTATE))
+ return;
+
switch (ykd_mode) {
case YKD_MODE_SENDSTATE:
assert (msg_len > sizeof (struct ykd_header));

View File

@ -1,54 +0,0 @@
Index: corosync-1.2.1/services/cpg.c
===================================================================
--- corosync-1.2.1.orig/services/cpg.c
+++ corosync-1.2.1/services/cpg.c
@@ -414,6 +414,27 @@ struct req_exec_cpg_downlist {
static struct req_exec_cpg_downlist g_req_exec_cpg_downlist;
+static int memb_list_remove_value (unsigned int *list,
+ size_t list_entries, int value)
+{
+ int j;
+ int found = 0;
+
+ for (j = 0; j < list_entries; j++) {
+ if (list[j] == value) {
+ /* mark next values to be copied down */
+ found = 1;
+ }
+ else if (found) {
+ list[j-1] = list[j];
+ }
+ }
+ if (found)
+ return (list_entries - 1);
+ else
+ return list_entries;
+}
+
static void cpg_sync_init_v2 (
const unsigned int *trans_list,
size_t trans_list_entries,
@@ -432,6 +453,21 @@ static void cpg_sync_init_v2 (
sizeof (unsigned int));
my_member_list_entries = member_list_entries;
+ for (i = 0; i < my_old_member_list_entries; i++) {
+ found = 0;
+ for (j = 0; j < trans_list_entries; j++) {
+ if (my_old_member_list[i] == trans_list[j]) {
+ found = 1;
+ break;
+ }
+ }
+ if (found == 0) {
+ my_member_list_entries = memb_list_remove_value (
+ my_member_list, my_member_list_entries,
+ my_old_member_list[i]);
+ }
+ }
+
for (i = 0; i < my_member_list_entries; i++) {
if (my_member_list[i] < lowest_nodeid) {
lowest_nodeid = my_member_list[i];

View File

@ -1,76 +0,0 @@
Index: trunk/exec/objdb.c
===================================================================
--- trunk/exec/objdb.c (revision 2786)
+++ trunk/exec/objdb.c (revision 2787)
@@ -1316,6 +1316,8 @@
goto error_exit;
free(object_key->value);
object_key->value = replacement_value;
+ memset (object_key->value, 0, new_value_len);
+ object_key->value_len = new_value_len;
}
if (memcmp (object_key->value, new_value, new_value_len) == 0) {
value_changed = 0;
Index: trunk/exec/coroipcs.c
===================================================================
--- trunk/exec/coroipcs.c (revision 2786)
+++ trunk/exec/coroipcs.c (revision 2787)
@@ -727,6 +727,7 @@
mar_res_setup_t res_setup;
unsigned int res;
+ memset (&res_setup, 0, sizeof (res_setup));
res_setup.error = error;
retry_send:
Index: trunk/exec/logsys.c
===================================================================
--- trunk/exec/logsys.c (revision 2786)
+++ trunk/exec/logsys.c (revision 2787)
@@ -731,6 +731,8 @@
int log_msg;
char buf[COMBINE_BUFFER_SIZE];
+ memset (buf, 0, sizeof (buf));
+
/*
* Signal wthread_create that the initialization process may continue
*/
@@ -1111,6 +1113,7 @@
return (-1);
}
+ memset (flt_data, 0, flt_real_size);
/*
* flt_data_size tracks data by ints and not bytes/chars.
*
Index: trunk/exec/main.c
===================================================================
--- trunk/exec/main.c (revision 2786)
+++ trunk/exec/main.c (revision 2787)
@@ -655,13 +655,12 @@
mtt_rx_token = (total_mtt_rx_token / token_count);
avg_backlog_calc = (total_backlog_calc / token_count);
avg_token_holdtime = (total_token_holdtime / token_count);
-
objdb->object_key_replace (stats->mrp->srp->hdr.handle,
"mtt_rx_token", strlen("mtt_rx_token"),
&mtt_rx_token, sizeof (mtt_rx_token));
objdb->object_key_replace (stats->mrp->srp->hdr.handle,
"avg_token_workload", strlen("avg_token_workload"),
- &avg_token_holdtime, sizeof (avg_backlog_calc));
+ &avg_token_holdtime, sizeof (avg_token_holdtime));
objdb->object_key_replace (stats->mrp->srp->hdr.handle,
"avg_backlog_calc", strlen("avg_backlog_calc"),
&avg_backlog_calc, sizeof (avg_backlog_calc));
@@ -782,8 +781,8 @@
"avg_token_workload", &zero_32,
sizeof (zero_32), OBJDB_VALUETYPE_UINT32);
objdb->object_key_create_typed (stats->mrp->srp->hdr.handle,
- "avg_backlog_calc", &zero_64,
- sizeof (zero_64), OBJDB_VALUETYPE_UINT64);
+ "avg_backlog_calc", &zero_32,
+ sizeof (zero_32), OBJDB_VALUETYPE_UINT32);
objdb->object_key_create_typed (stats->mrp->srp->hdr.handle,
"rx_msg_dropped", &zero_64,
sizeof (zero_64), OBJDB_VALUETYPE_UINT64);

View File

@ -1,25 +0,0 @@
Index: trunk/lib/coroipcc.c
===================================================================
--- trunk/lib/coroipcc.c (revision 2788)
+++ trunk/lib/coroipcc.c (revision 2789)
@@ -478,11 +478,18 @@
pfd.fd = ipc_instance->fd;
pfd.events = 0;
- poll (&pfd, 1, 0);
- if (pfd.revents == POLLERR || pfd.revents == POLLHUP) {
+ res = poll (&pfd, 1, 0);
+
+ if (res == -1 && errno != EINTR) {
return (CS_ERR_LIBRARY);
}
+ if (res == 1) {
+ if (pfd.revents == POLLERR || pfd.revents == POLLHUP || pfd.revents == POLLNVAL) {
+ return (CS_ERR_LIBRARY);
+ }
+ }
+
goto retry_semwait;
}

View File

@ -1,13 +0,0 @@
Index: trunk/man/corosync.conf.5
===================================================================
--- trunk/man/corosync.conf.5 (revision 2790)
+++ trunk/man/corosync.conf.5 (revision 2791)
@@ -350,7 +350,7 @@
The default is 1000 millseconds.
.TP
-fail_to_recv_const
+fail_recv_const
This constant specifies how many rotations of the token without receiving any
of the messages when messages should be received may occur before a new
configuration is formed.

View File

@ -1,33 +0,0 @@
Index: trunk/exec/totemsrp.c
===================================================================
--- trunk/exec/totemsrp.c (revision 2791)
+++ trunk/exec/totemsrp.c (revision 2792)
@@ -1390,6 +1390,8 @@
{
if (instance->old_ring_state_saved == 0) {
instance->old_ring_state_saved = 1;
+ memcpy (&instance->my_old_ring_id, &instance->my_ring_id,
+ sizeof (struct memb_ring_id));
instance->old_ring_state_aru = instance->my_aru;
instance->old_ring_state_high_seq_received = instance->my_high_seq_received;
log_printf (instance->totemsrp_log_level_debug,
@@ -1401,7 +1403,9 @@
static void ring_state_restore (struct totemsrp_instance *instance)
{
if (instance->old_ring_state_saved) {
- totemip_zero_set(&instance->my_ring_id.rep);
+ memcpy (&instance->my_ring_id, &instance->my_old_ring_id,
+ sizeof (struct memb_ring_id));
+
instance->my_aru = instance->old_ring_state_aru;
instance->my_high_seq_received = instance->old_ring_state_high_seq_received;
log_printf (instance->totemsrp_log_level_debug,
@@ -1412,6 +1416,8 @@
static void old_ring_state_reset (struct totemsrp_instance *instance)
{
+ log_printf (instance->totemsrp_log_level_debug,
+ "Resetting old ring state\n");
instance->old_ring_state_saved = 0;
}

View File

@ -1,13 +0,0 @@
Index: trunk/exec/totemsrp.c
===================================================================
--- trunk/exec/totemsrp.c (revision 2792)
+++ trunk/exec/totemsrp.c (revision 2793)
@@ -93,7 +93,7 @@
#define LOCALHOST_IP inet_addr("127.0.0.1")
#define QUEUE_RTR_ITEMS_SIZE_MAX 16384 /* allow 16384 retransmit items */
-#define RETRANS_MESSAGE_QUEUE_SIZE_MAX 500 /* allow 500 messages to be queued */
+#define RETRANS_MESSAGE_QUEUE_SIZE_MAX 16384 /* allow 500 messages to be queued */
#define RECEIVED_MESSAGE_QUEUE_SIZE_MAX 500 /* allow 500 messages to be queued */
#define MAXIOVS 5
#define RETRANSMIT_ENTRIES_MAX 30

View File

@ -1,13 +0,0 @@
Index: trunk/exec/totemsrp.c
===================================================================
--- trunk/exec/totemsrp.c (revision 2793)
+++ trunk/exec/totemsrp.c (revision 2794)
@@ -2466,7 +2466,7 @@
orf_token->rtr_list_entries -= 1;
assert (orf_token->rtr_list_entries >= 0);
memmove (&rtr_list[i], &rtr_list[i + 1],
- sizeof (struct rtr_item) * (orf_token->rtr_list_entries));
+ sizeof (struct rtr_item) * (orf_token->rtr_list_entries - i));
instance->stats.mcast_retx++;
instance->fcc_remcast_current++;

View File

@ -1,13 +0,0 @@
Index: trunk/exec/totemsrp.c
===================================================================
--- trunk/exec/totemsrp.c (revision 2794)
+++ trunk/exec/totemsrp.c (revision 2795)
@@ -391,7 +391,7 @@
struct list_head token_callback_sent_listhead;
- char *orf_token_retransmit[TOKEN_SIZE_MAX];
+ char orf_token_retransmit[TOKEN_SIZE_MAX];
int orf_token_retransmit_size;

View File

@ -1,17 +0,0 @@
Index: trunk/exec/main.c
===================================================================
--- trunk/exec/main.c (revision 2799)
+++ trunk/exec/main.c (revision 2800)
@@ -832,6 +832,12 @@
serialize_unlock();
return;
}
+ if (fn_id >= ais_service[service]->exec_engine_count) {
+ log_printf(LOGSYS_LEVEL_WARNING, "discarded unknown message %d for service %d (max id %d)",
+ fn_id, service, ais_service[service]->exec_engine_count);
+ serialize_unlock();
+ return;
+ }
objdb->object_key_increment (service_stats_handle[service][fn_id],
"rx", strlen("rx"),

View File

@ -1,19 +0,0 @@
Index: trunk/man/corosync.conf.5
===================================================================
--- trunk/man/corosync.conf.5 (revision 2855)
+++ trunk/man/corosync.conf.5 (revision 2856)
@@ -88,9 +88,11 @@
.TP
bindnetaddr
-This specifies the address which the corosync executive should bind.
-This address should always end in zero. If the totem traffic should
-be routed over 192.168.5.92, set bindnetaddr to 192.168.5.0.
+This specifies the network address the corosync executive should bind
+to. For example, if the local interface is 192.168.5.92 with netmask
+255.255.255.0, set bindnetaddr to 192.168.5.0. If the local interface
+is 192.168.5.92 with netmask 255.255.255.192, set bindnetaddr to
+192.168.5.64, and so forth.
This may also be an IPV6 address, in which case IPV6 networking will be used.
In this case, the full address must be specified and there is no automatic

View File

@ -1,38 +0,0 @@
Index: syncv2.c
===================================================================
--- corosync-1.2.1/exec/syncv2.c (revision 2739)
+++ corosync-1.2.1/exec/syncv2.c (working copy)
@@ -244,6 +244,11 @@
}
}
if (barrier_reached) {
+ log_printf (LOGSYS_LEVEL_DEBUG, "Committing synchronization for %s\n",
+ my_service_list[my_processing_idx].name);
+ my_service_list[my_processing_idx].state = ACTIVATE;
+ my_service_list[my_processing_idx].sync_activate ();
+
my_processing_idx += 1;
if (my_service_list_entries == my_processing_idx) {
my_memb_determine_list_entries = 0;
@@ -551,19 +556,12 @@
if (my_service_list[my_processing_idx].state == PROCESS) {
my_service_list[my_processing_idx].state = PROCESS;
res = my_service_list[my_processing_idx].sync_process ();
- if (res != -1) {
- my_service_list[my_processing_idx].state = ACTIVATE;
+ if (res == 0) {
+ sync_barrier_enter();
} else {
return (-1);
}
}
- if (my_service_list[my_processing_idx].state == ACTIVATE) {
- my_service_list[my_processing_idx].state = ACTIVATE;
- my_service_list[my_processing_idx].sync_activate ();
- log_printf (LOGSYS_LEVEL_DEBUG, "Committing synchronization for %s\n",
- my_service_list[my_processing_idx].name);
- sync_barrier_enter();
- }
return (0);
}

View File

@ -1,27 +0,0 @@
From ee2d2224c0795c1fa9f1163c37ab61b446c5c393 Mon Sep 17 00:00:00 2001
From: Angus Salkeld <asalkeld@redhat.com>
Date: Fri, 9 Apr 2010 20:44:23 +1000
Subject: [PATCH] When sync is aborted clear the "my_ring_id" variable.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
---
exec/syncv2.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/exec/syncv2.c b/exec/syncv2.c
index 57b501b..53e1650 100644
--- a/exec/syncv2.c
+++ b/exec/syncv2.c
@@ -665,6 +665,9 @@ void sync_v2_abort (void)
schedwrk_destroy (my_schedwrk_handle);
my_service_list[my_processing_idx].sync_abort ();
}
+
+ /* prevent and more incoming messages to be dumped */
+ memset (&my_ring_id, 0, sizeof (struct memb_ring_id));
}
void sync_v2_memb_list_determine (const struct memb_ring_id *ring_id)
--
1.6.6.1

View File

@ -1,3 +1,57 @@
-------------------------------------------------------------------
Thu Aug 5 04:55:08 UTC 2010 - tserong@novell.com
- Update to corosync 1.2.7
- Remove consensus check for two node cluster cases which can have smaller
consensus values. Document in man page the behavior of consensus.
-------------------------------------------------------------------
Tue Jul 27 11:48:21 UTC 2010 - tserong@novell.com
- Fix problem where flow control could lock up ipc under very heavy load in
very rare circumstances (upstream cs 3003)
- SYNC: always call sync_aborted() in sync_confchg_fn() (upstream cs 3000)
- SYNCV2: reset the my_memb_determine_ring_id in sync_v2_memb_list_abort()
(upstream cs 2999)
- Fix logging_daemon config parser code (rhbz#615203) (upstream cs 2998)
- Remove reset of token timeout on retransmitted token reception. Fixes
membership problems with certain timing parametrs (upstream cs 2989)
- Speed up IPC connection process (upstream cs 2987)
- Fix fail list fault that occurs in very rare circumstances (upstream cs 2985)
-------------------------------------------------------------------
Thu Jul 22 03:31:59 UTC 2010 - tserong@novell.com
- Update to corosync 1.2.6
- 80% packet loss networks were resulting in problems with totem.
- Fixed ~40 scanning errors found with coverity.
- cpg_membership_get now functional.
- errors logged prior to the start of the daemon were not flushed.
- Fixes defects in logsys which are crashing pacemaker installations.
- Adds man pages for all binaries
- Fixes several defects found in high packet loss field environments.
- Send proper notification code of CPG_REASON_LEAVE in cpg service.
- Fix segfault when pacemaker forks new processes
- Unlock global serializer lock during shutdown to prevent spinning on
single cpu systems or high cpu use on mulitple cpu systems
- Stop totem statistics updater timer during shutdown to prevent a
segfault during shutdown.
- Fix problem where glibc's fork() implementation may cause segfaults in
Pacemaker's use of the fork() system call.
- Fix problem where a full /dev/shm would result in client segfault -
instead an error is returned in this situation.
- Fix problem where flight recorder leaks files in shared memory
filesystem. Also clean up the error handling of the shared memory
allocation code of the flight recorder.
- Fix problem where a failure in glibc's pathconf API would result in
segfault.
- Add corosync and corosync-blackbox man pages.
-------------------------------------------------------------------
Fri Jul 9 08:53:55 UTC 2010 - dmuhamedagic@novell.com
- prevent corosync-cfgtool from hanging (bnc#616183)
-------------------------------------------------------------------
Wed Jun 2 11:53:28 UTC 2010 - tserong@novell.com

View File

@ -76,10 +76,10 @@ Index: corosync-1.2.1/conf/corosync.conf.example
logging {
- fileline: off
- to_stderr: yes
- to_stderr: no
- to_logfile: yes
- to_syslog: yes
- logfile: /tmp/corosync.log
- logfile: /var/log/cluster/corosync.log
- debug: off
- timestamp: off
- logger_subsys {

View File

@ -1,5 +1,5 @@
#
# spec file for package corosync (Version 1.2.1)
# spec file for package corosync (Version 1.2.7)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -25,39 +25,18 @@
%if 0%{?suse_version}
%define _libexecdir %{_libdir}
%endif
Name: corosync
Summary: The Corosync Cluster Engine and Application Programming Interfaces
Version: 1.2.1
Release: 1
Version: 1.2.7
Release: 0
License: BSD3c
Group: System Environment/Base
Url: http://www.openais.org
Source0: http://developer.osdl.org/dev/openais/downloads/%{name}-%{version}/%{name}-%{version}.tar.gz
Patch1: corosync-confexample-timestamp.patch
Patch2: corosync-revert-cs2429.patch
Patch3: corosync-cs2729.patch
Patch4: corosync-cs2731.patch
Patch5: corosync-cs2739.patch
Patch6: corosync-cs2746.patch
Patch7: corosync-cs2748.patch
Patch8: corosync-sync-barrier.patch
Patch9: corosync-cs2754.patch
Patch10: corosync-cs2756.patch
Patch11: corosync-trunk-reset-pause-timestamp-on-events.patch
Patch12: corosync-when-sync-is-aborted-clear-the-my_ring_id-variable.patch
Patch13: corosync-cs2767.patch
Patch14: corosync-cs2785.patch
Patch15: corosync-cs2787.patch
Patch16: corosync-cs2789.patch
Patch17: corosync-cs2791.patch
Patch18: corosync-cs2792.patch
Patch19: corosync-cs2793.patch
Patch20: corosync-cs2794.patch
Patch21: corosync-cs2795.patch
Patch22: corosync-cs2800.patch
Patch23: corosync.conf.example.patch
Patch24: corosync-cs2856.patch
Patch3: corosync-trunk-reset-pause-timestamp-on-events.patch
Patch4: corosync.conf.example.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Runtime bits
Requires: libcorosync4 = %{version}-%{release}
@ -82,26 +61,6 @@ BuildRequires: pkg-config
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%build
%if %{buildtrunk}
@ -175,8 +134,17 @@ script.
%{_libexecdir}/lcrso/vsf_quorum.lcrso
%{_libexecdir}/lcrso/vsf_ykd.lcrso
%dir %{_localstatedir}/lib/corosync
%dir %{_localstatedir}/log/cluster
%{_mandir}/man8/corosync_overview.8*
%{_mandir}/man8/corosync.8*
%{_mandir}/man8/corosync-blackbox.8*
%{_mandir}/man8/corosync-objctl.8*
%{_mandir}/man8/corosync-keygen.8*
%{_mandir}/man8/corosync-cfgtool.8*
%{_mandir}/man8/corosync-cpgtool.8*
%{_mandir}/man8/corosync-fplay.8*
%{_mandir}/man8/corosync-pload.8*
%{_mandir}/man8/corosync-quorumtool.8*
%{_mandir}/man5/corosync.conf.5*
%package -n libcorosync4