Update to new svn snapshot
This commit is contained in:
parent
853ccfe16c
commit
7fcf8fa1b5
@ -3581,6 +3581,249 @@ diff -Naurd corosync-0.92/exec/timer.c corosync-trunk/exec/timer.c
|
|||||||
#include <corosync/list.h>
|
#include <corosync/list.h>
|
||||||
#include <corosync/queue.h>
|
#include <corosync/queue.h>
|
||||||
#include <corosync/lcr/lcr_ifact.h>
|
#include <corosync/lcr/lcr_ifact.h>
|
||||||
|
diff -Naurd corosync-0.92/exec/totemconfig.c corosync-trunk/exec/totemconfig.c
|
||||||
|
--- corosync-0.92/exec/totemconfig.c 2008-08-20 02:57:40.000000000 +0200
|
||||||
|
+++ corosync-trunk/exec/totemconfig.c 2008-12-12 12:27:27.000000000 +0100
|
||||||
|
@@ -76,6 +76,13 @@
|
||||||
|
#define RRP_PROBLEM_COUNT_THRESHOLD_MIN 5
|
||||||
|
|
||||||
|
static char error_string_response[512];
|
||||||
|
+static struct objdb_iface_ver0 *global_objdb;
|
||||||
|
+
|
||||||
|
+static void add_totem_config_notification(
|
||||||
|
+ struct objdb_iface_ver0 *objdb,
|
||||||
|
+ struct totem_config *totem_config,
|
||||||
|
+ unsigned int totem_object_handle);
|
||||||
|
+
|
||||||
|
|
||||||
|
/* These just makes the code below a little neater */
|
||||||
|
static inline int objdb_get_string (
|
||||||
|
@@ -163,6 +170,50 @@
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void totem_volatile_config_read (
|
||||||
|
+ struct objdb_iface_ver0 *objdb,
|
||||||
|
+ struct totem_config *totem_config,
|
||||||
|
+ unsigned int object_totem_handle)
|
||||||
|
+{
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "token", &totem_config->token_timeout);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "token_retransmit", &totem_config->token_retransmit_timeout);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "hold", &totem_config->token_hold_timeout);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "token_retransmits_before_loss_const", &totem_config->token_retransmits_before_loss_const);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "join", &totem_config->join_timeout);
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "send_join", &totem_config->send_join_timeout);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "consensus", &totem_config->consensus_timeout);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "merge", &totem_config->merge_timeout);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "downcheck", &totem_config->downcheck_timeout);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "fail_recv_const", &totem_config->fail_to_recv_const);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "seqno_unchanged_const", &totem_config->seqno_unchanged_const);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "rrp_token_expired_timeout", &totem_config->rrp_token_expired_timeout);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "rrp_problem_count_timeout", &totem_config->rrp_problem_count_timeout);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "rrp_problem_count_threshold", &totem_config->rrp_problem_count_threshold);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "heartbeat_failures_allowed", &totem_config->heartbeat_failures_allowed);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "max_network_delay", &totem_config->max_network_delay);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "window_size", &totem_config->window_size);
|
||||||
|
+ objdb_get_string (objdb, object_totem_handle, "vsftype", &totem_config->vsf_type);
|
||||||
|
+
|
||||||
|
+ objdb_get_int (objdb,object_totem_handle, "max_messages", &totem_config->max_messages);
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
extern int totem_config_read (
|
||||||
|
struct objdb_iface_ver0 *objdb,
|
||||||
|
struct totem_config *totem_config,
|
||||||
|
@@ -222,41 +273,10 @@
|
||||||
|
|
||||||
|
objdb_get_int (objdb,object_totem_handle, "netmtu", &totem_config->net_mtu);
|
||||||
|
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "token", &totem_config->token_timeout);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "token_retransmit", &totem_config->token_retransmit_timeout);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "hold", &totem_config->token_hold_timeout);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "token_retransmits_before_loss_const", &totem_config->token_retransmits_before_loss_const);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "join", &totem_config->join_timeout);
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "send_join", &totem_config->send_join_timeout);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "consensus", &totem_config->consensus_timeout);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "merge", &totem_config->merge_timeout);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "downcheck", &totem_config->downcheck_timeout);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "fail_recv_const", &totem_config->fail_to_recv_const);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "seqno_unchanged_const", &totem_config->seqno_unchanged_const);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "rrp_token_expired_timeout", &totem_config->rrp_token_expired_timeout);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "rrp_problem_count_timeout", &totem_config->rrp_problem_count_timeout);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "rrp_problem_count_threshold", &totem_config->rrp_problem_count_threshold);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "heartbeat_failures_allowed", &totem_config->heartbeat_failures_allowed);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "max_network_delay", &totem_config->max_network_delay);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "window_size", &totem_config->window_size);
|
||||||
|
- objdb_get_string (objdb, object_totem_handle, "vsftype", &totem_config->vsf_type);
|
||||||
|
-
|
||||||
|
- objdb_get_int (objdb,object_totem_handle, "max_messages", &totem_config->max_messages);
|
||||||
|
+ /*
|
||||||
|
+ * Get things that might change in the future
|
||||||
|
+ */
|
||||||
|
+ totem_volatile_config_read (objdb, totem_config, object_totem_handle);
|
||||||
|
|
||||||
|
objdb->object_find_create (
|
||||||
|
object_totem_handle,
|
||||||
|
@@ -297,6 +317,8 @@
|
||||||
|
|
||||||
|
objdb->object_find_destroy (object_find_interface_handle);
|
||||||
|
|
||||||
|
+ add_totem_config_notification(objdb, totem_config, object_totem_handle);
|
||||||
|
+
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -323,7 +345,7 @@
|
||||||
|
error_reason = "No multicast address specified";
|
||||||
|
goto parse_error;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
if (totem_config->interfaces[i].ip_port == 0) {
|
||||||
|
error_reason = "No multicast port specified";
|
||||||
|
goto parse_error;
|
||||||
|
@@ -331,7 +353,7 @@
|
||||||
|
|
||||||
|
if (totem_config->interfaces[i].mcast_addr.family == AF_INET6 &&
|
||||||
|
totem_config->node_id == 0) {
|
||||||
|
-
|
||||||
|
+
|
||||||
|
error_reason = "An IPV6 network requires that a node ID be specified.";
|
||||||
|
goto parse_error;
|
||||||
|
}
|
||||||
|
@@ -498,7 +520,7 @@
|
||||||
|
totem_config->rrp_token_expired_timeout =
|
||||||
|
totem_config->token_retransmit_timeout;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
if (totem_config->rrp_token_expired_timeout < MINIMUM_TIMEOUT) {
|
||||||
|
sprintf (local_error_reason, "The RRP token expired timeout parameter (%d ms) may not be less then (%d ms).",
|
||||||
|
totem_config->rrp_token_expired_timeout, MINIMUM_TIMEOUT);
|
||||||
|
@@ -658,3 +680,92 @@
|
||||||
|
return (-1);
|
||||||
|
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+static void totem_key_change_notify(object_change_type_t change_type,
|
||||||
|
+ unsigned int parent_object_handle,
|
||||||
|
+ unsigned int object_handle,
|
||||||
|
+ void *object_name_pt, int object_name_len,
|
||||||
|
+ void *key_name_pt, int key_len,
|
||||||
|
+ void *key_value_pt, int key_value_len,
|
||||||
|
+ void *priv_data_pt)
|
||||||
|
+{
|
||||||
|
+ struct totem_config *totem_config = priv_data_pt;
|
||||||
|
+
|
||||||
|
+ if (memcmp(object_name_pt, "totem", object_name_len) == 0)
|
||||||
|
+ totem_volatile_config_read(global_objdb,
|
||||||
|
+ totem_config,
|
||||||
|
+ object_handle); // CHECK
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void totem_objdb_reload_notify(objdb_reload_notify_type_t type, int flush,
|
||||||
|
+ void *priv_data_pt)
|
||||||
|
+{
|
||||||
|
+ struct totem_config *totem_config = priv_data_pt;
|
||||||
|
+ unsigned int totem_object_handle;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * A new totem {} key might exist, cancel the
|
||||||
|
+ * existing notification at the start of reload,
|
||||||
|
+ * and start a new one on the new object when
|
||||||
|
+ * it's all settled.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ if (type == OBJDB_RELOAD_NOTIFY_START) {
|
||||||
|
+ global_objdb->object_track_stop(
|
||||||
|
+ totem_key_change_notify,
|
||||||
|
+ NULL,
|
||||||
|
+ NULL,
|
||||||
|
+ NULL,
|
||||||
|
+ NULL);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (type == OBJDB_RELOAD_NOTIFY_END ||
|
||||||
|
+ type == OBJDB_RELOAD_NOTIFY_FAILED) {
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ if (!totem_handle_find(global_objdb,
|
||||||
|
+ &totem_object_handle)) {
|
||||||
|
+ add_totem_config_notification(global_objdb, totem_config, totem_object_handle);
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Reload the configuration
|
||||||
|
+ */
|
||||||
|
+ totem_volatile_config_read(global_objdb,
|
||||||
|
+ totem_config,
|
||||||
|
+ totem_object_handle);
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ log_printf(LOG_LEVEL_ERROR, "totem objdb tracking stopped, cannot find totem{} handle on objdb\n");
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static void add_totem_config_notification(
|
||||||
|
+ struct objdb_iface_ver0 *objdb,
|
||||||
|
+ struct totem_config *totem_config,
|
||||||
|
+ unsigned int totem_object_handle)
|
||||||
|
+{
|
||||||
|
+
|
||||||
|
+ global_objdb = objdb;
|
||||||
|
+ objdb->object_track_start(totem_object_handle,
|
||||||
|
+ 1,
|
||||||
|
+ totem_key_change_notify,
|
||||||
|
+ NULL, // object_create_notify,
|
||||||
|
+ NULL, // object_destroy_notify,
|
||||||
|
+ NULL, // object_reload_notify
|
||||||
|
+ totem_config); // priv_data
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Reload notify must be on the parent object
|
||||||
|
+ */
|
||||||
|
+ objdb->object_track_start(OBJECT_PARENT_HANDLE,
|
||||||
|
+ 1,
|
||||||
|
+ NULL, // key_change_notify,
|
||||||
|
+ NULL, // object_create_notify,
|
||||||
|
+ NULL, // object_destroy_notify,
|
||||||
|
+ totem_objdb_reload_notify, // object_reload_notify
|
||||||
|
+ totem_config); // priv_data
|
||||||
|
+
|
||||||
|
+}
|
||||||
diff -Naurd corosync-0.92/exec/totemconfig.h corosync-trunk/exec/totemconfig.h
|
diff -Naurd corosync-0.92/exec/totemconfig.h corosync-trunk/exec/totemconfig.h
|
||||||
--- corosync-0.92/exec/totemconfig.h 2008-08-14 18:44:26.000000000 +0200
|
--- corosync-0.92/exec/totemconfig.h 2008-08-14 18:44:26.000000000 +0200
|
||||||
+++ corosync-trunk/exec/totemconfig.h 2008-11-06 22:49:07.000000000 +0100
|
+++ corosync-trunk/exec/totemconfig.h 2008-11-06 22:49:07.000000000 +0100
|
||||||
@ -11964,7 +12207,7 @@ diff -Naurd corosync-0.92/lib/util.h corosync-trunk/lib/util.h
|
|||||||
SaVersionT *version);
|
SaVersionT *version);
|
||||||
diff -Naurd corosync-0.92/Makefile corosync-trunk/Makefile
|
diff -Naurd corosync-0.92/Makefile corosync-trunk/Makefile
|
||||||
--- corosync-0.92/Makefile 2008-09-03 09:58:08.000000000 +0200
|
--- corosync-0.92/Makefile 2008-09-03 09:58:08.000000000 +0200
|
||||||
+++ corosync-trunk/Makefile 2008-11-06 22:49:07.000000000 +0100
|
+++ corosync-trunk/Makefile 2008-12-11 10:42:17.000000000 +0100
|
||||||
@@ -115,10 +115,17 @@
|
@@ -115,10 +115,17 @@
|
||||||
(cd $(builddir)test; echo ==== `pwd` ===; $(call sub_make,test,clean));
|
(cd $(builddir)test; echo ==== `pwd` ===; $(call sub_make,test,clean));
|
||||||
rm -rf $(builddir)doc/api
|
rm -rf $(builddir)doc/api
|
||||||
@ -11984,6 +12227,14 @@ diff -Naurd corosync-0.92/Makefile corosync-trunk/Makefile
|
|||||||
|
|
||||||
EXEC_LIBS = totem_pg logsys
|
EXEC_LIBS = totem_pg logsys
|
||||||
|
|
||||||
|
@@ -196,6 +203,7 @@
|
||||||
|
install -m 644 $(srcdir)include/corosync/engine/coroapi.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
|
||||||
|
install -m 644 $(srcdir)include/corosync/engine/objdb.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
|
||||||
|
install -m 644 $(srcdir)include/corosync/engine/logsys.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
|
||||||
|
+ install -m 644 $(srcdir)include/corosync/engine/quorum.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
|
||||||
|
install -m 644 $(srcdir)include/corosync/engine/config.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
|
||||||
|
install -m 644 $(srcdir)man/*.3 $(DESTDIR)$(MANDIR)/man3
|
||||||
|
install -m 644 $(srcdir)man/*.5 $(DESTDIR)$(MANDIR)/man5
|
||||||
diff -Naurd corosync-0.92/Makefile.inc corosync-trunk/Makefile.inc
|
diff -Naurd corosync-0.92/Makefile.inc corosync-trunk/Makefile.inc
|
||||||
--- corosync-0.92/Makefile.inc 2008-09-03 09:58:08.000000000 +0200
|
--- corosync-0.92/Makefile.inc 2008-09-03 09:58:08.000000000 +0200
|
||||||
+++ corosync-trunk/Makefile.inc 2008-12-09 14:48:47.000000000 +0100
|
+++ corosync-trunk/Makefile.inc 2008-12-09 14:48:47.000000000 +0100
|
@ -1,14 +1,14 @@
|
|||||||
%define alphatag svn1707
|
%define alphatag svn1709
|
||||||
|
|
||||||
Name: corosync
|
Name: corosync
|
||||||
Summary: The Corosync Cluster Engine and Application Programming Interfaces
|
Summary: The Corosync Cluster Engine and Application Programming Interfaces
|
||||||
Version: 0.92
|
Version: 0.92
|
||||||
Release: 4%{?alphatag:.%{alphatag}}%{?dist}
|
Release: 5%{?alphatag:.%{alphatag}}%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://www.openais.org
|
URL: http://www.openais.org
|
||||||
Source0: http://developer.osdl.org/dev/openais/downloads/corosync-%{version}/corosync-%{version}.tar.gz
|
Source0: http://developer.osdl.org/dev/openais/downloads/corosync-%{version}/corosync-%{version}.tar.gz
|
||||||
Patch0: corosync-trunk-1707.diff
|
Patch0: corosync-trunk-1709.diff
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Requires(pre): /usr/sbin/useradd
|
Requires(pre): /usr/sbin/useradd
|
||||||
@ -139,6 +139,7 @@ fi
|
|||||||
%{_includedir}/corosync/engine/coroapi.h
|
%{_includedir}/corosync/engine/coroapi.h
|
||||||
%{_includedir}/corosync/engine/logsys.h
|
%{_includedir}/corosync/engine/logsys.h
|
||||||
%{_includedir}/corosync/engine/objdb.h
|
%{_includedir}/corosync/engine/objdb.h
|
||||||
|
%{_includedir}/corosync/engine/quorum.h
|
||||||
%{_libdir}/corosync/libcfg.so
|
%{_libdir}/corosync/libcfg.so
|
||||||
%{_libdir}/corosync/libcpg.so
|
%{_libdir}/corosync/libcpg.so
|
||||||
%{_libdir}/corosync/libconfdb.so
|
%{_libdir}/corosync/libconfdb.so
|
||||||
@ -155,6 +156,10 @@ fi
|
|||||||
%{_mandir}/man8/logsys_overview.8*
|
%{_mandir}/man8/logsys_overview.8*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 15 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.92-5.svn1709
|
||||||
|
- Update to svn trunk at revision 1709 from upstream.
|
||||||
|
- Update spec file to include new include files.
|
||||||
|
|
||||||
* Wed Dec 10 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.92-4.svn1707
|
* Wed Dec 10 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.92-4.svn1707
|
||||||
- Update to svn trunk at revision 1707 from upstream.
|
- Update to svn trunk at revision 1707 from upstream.
|
||||||
- Update spec file to include new lcrso services and include file.
|
- Update spec file to include new lcrso services and include file.
|
||||||
|
Loading…
Reference in New Issue
Block a user