Accepting request 199353 from network:ha-clustering:Factory
update to version 2.3.1 OBS-URL: https://build.opensuse.org/request/show/199353 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/corosync?expand=0&rev=19
This commit is contained in:
commit
92aef91c1a
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:c9dbe9f84b397108c9a63bc4ee48c61631cbfec7b28930c6edff720429ac364a
|
|
||||||
size 803598
|
|
3
corosync-2.3.1.tar.gz
Normal file
3
corosync-2.3.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ead453fb7242e2a5d38b36864f933b230fa90ae405027166f752467f0fb3786e
|
||||||
|
size 407948
|
@ -1,13 +0,0 @@
|
|||||||
Index: corosync-1.4.3/conf/corosync.conf.example
|
|
||||||
===================================================================
|
|
||||||
--- corosync-1.4.3.orig/conf/corosync.conf.example
|
|
||||||
+++ corosync-1.4.3/conf/corosync.conf.example
|
|
||||||
@@ -69,7 +69,7 @@ logging {
|
|
||||||
# Log messages with time stamps. When in doubt, set to on
|
|
||||||
# (unless you are only logging to syslog, where double
|
|
||||||
# timestamps can be annoying).
|
|
||||||
- timestamp: on
|
|
||||||
+ timestamp: off
|
|
||||||
logger_subsys {
|
|
||||||
subsys: AMF
|
|
||||||
debug: off
|
|
@ -1,13 +0,0 @@
|
|||||||
Index: corosync-1.4.1/services/cpg.c
|
|
||||||
===================================================================
|
|
||||||
--- corosync-1.4.1.orig/services/cpg.c
|
|
||||||
+++ corosync-1.4.1/services/cpg.c
|
|
||||||
@@ -870,7 +870,7 @@ static int cpg_lib_exit_fn (void *conn)
|
|
||||||
|
|
||||||
log_printf(LOGSYS_LEVEL_DEBUG, "exit_fn for conn=%p\n", conn);
|
|
||||||
|
|
||||||
- if (cpd->group_name.length > 0) {
|
|
||||||
+ if (cpd->group_name.length > 0 && cpd->cpd_state != CPD_STATE_LEAVE_STARTED) {
|
|
||||||
result = cpg_node_joinleave_send (cpd->pid, &cpd->group_name,
|
|
||||||
MESSAGE_REQ_EXEC_CPG_PROCLEAVE, CONFCHG_CPG_REASON_PROCDOWN);
|
|
||||||
if (result == -1) {
|
|
20
corosync-init-lockfile-path-error.patch
Normal file
20
corosync-init-lockfile-path-error.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Index: corosync-2.3.1/init/corosync.in
|
||||||
|
===================================================================
|
||||||
|
--- corosync-2.3.1.orig/init/corosync.in
|
||||||
|
+++ corosync-2.3.1/init/corosync.in
|
||||||
|
@@ -29,6 +29,7 @@ PATH="/sbin:/bin:/usr/sbin:/usr/bin:@SBI
|
||||||
|
success()
|
||||||
|
{
|
||||||
|
echo -ne "[ OK ]\r"
|
||||||
|
+ rtrn=0
|
||||||
|
}
|
||||||
|
|
||||||
|
failure()
|
||||||
|
@@ -106,6 +107,7 @@ start()
|
||||||
|
# they also assume that init scripts will create
|
||||||
|
# required subdirectories for proper operations
|
||||||
|
mkdir -p @LOCALSTATEDIR@/run
|
||||||
|
+ mkdir -p @LOCALSTATEDIR@/lock/subsys
|
||||||
|
|
||||||
|
if status $prog > /dev/null 2>&1; then
|
||||||
|
success
|
@ -1,143 +0,0 @@
|
|||||||
Only in corosync-1.2.0/exec: cscope.out
|
|
||||||
Index: corosync-1.4.1/exec/totemip.c
|
|
||||||
===================================================================
|
|
||||||
--- corosync-1.4.1.orig/exec/totemip.c
|
|
||||||
+++ corosync-1.4.1/exec/totemip.c
|
|
||||||
@@ -396,9 +396,6 @@ int totemip_iface_check(struct totem_ip_
|
|
||||||
*/
|
|
||||||
totemip_sockaddr_to_totemip_convert((struct sockaddr_storage *)sockaddr_in, boundto);
|
|
||||||
boundto->nodeid = sockaddr_in->sin_addr.s_addr;
|
|
||||||
-#if __BYTE_ORDER == __BIG_ENDIAN
|
|
||||||
- boundto->nodeid = swab32 (boundto->nodeid);
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
if (ioctl(id_fd, SIOCGLIFFLAGS, &lifreq[i]) < 0) {
|
|
||||||
printf ("couldn't do ioctl\n");
|
|
||||||
@@ -648,9 +645,6 @@ int totemip_iface_check(struct totem_ip_
|
|
||||||
if (ipaddr.family == AF_INET && ipaddr.nodeid == 0) {
|
|
||||||
unsigned int nodeid = 0;
|
|
||||||
memcpy (&nodeid, ipaddr.addr, sizeof (int));
|
|
||||||
-#if __BYTE_ORDER == __BIG_ENDIAN
|
|
||||||
- nodeid = swab32 (nodeid);
|
|
||||||
-#endif
|
|
||||||
if (mask_high_bit) {
|
|
||||||
nodeid &= 0x7FFFFFFF;
|
|
||||||
}
|
|
||||||
Index: corosync-1.4.1/test/testcpg.c
|
|
||||||
===================================================================
|
|
||||||
--- corosync-1.4.1.orig/test/testcpg.c
|
|
||||||
+++ corosync-1.4.1/test/testcpg.c
|
|
||||||
@@ -49,7 +49,6 @@
|
|
||||||
|
|
||||||
#include <corosync/corotypes.h>
|
|
||||||
#include <corosync/cpg.h>
|
|
||||||
-#include <corosync/swab.h>
|
|
||||||
|
|
||||||
static int quit = 0;
|
|
||||||
static int show_ip = 0;
|
|
||||||
@@ -63,24 +62,6 @@ static void print_cpgname (const struct
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-static char * node_pid_format(unsigned int nodeid,int pid) {
|
|
||||||
- static char buffer[100];
|
|
||||||
- if (show_ip) {
|
|
||||||
- struct in_addr saddr;
|
|
||||||
-#if __BYTE_ORDER == __BIG_ENDIAN
|
|
||||||
- saddr.s_addr = swab32(nodeid);
|
|
||||||
-#else
|
|
||||||
- saddr.s_addr = nodeid;
|
|
||||||
-#endif
|
|
||||||
- sprintf(buffer, "node/pid %s/%d", inet_ntoa(saddr),pid);
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- sprintf(buffer, "node/pid %d/%d", nodeid, pid);
|
|
||||||
- }
|
|
||||||
- return buffer;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-
|
|
||||||
static void DeliverCallback (
|
|
||||||
cpg_handle_t handle,
|
|
||||||
const struct cpg_name *groupName,
|
|
||||||
@@ -89,9 +70,18 @@ static void DeliverCallback (
|
|
||||||
void *msg,
|
|
||||||
size_t msg_len)
|
|
||||||
{
|
|
||||||
- printf("DeliverCallback: message (len=%lu)from %s: '%s'\n",
|
|
||||||
- (unsigned long int) msg_len, node_pid_format(nodeid, pid),
|
|
||||||
+ if (show_ip) {
|
|
||||||
+ struct in_addr saddr;
|
|
||||||
+ saddr.s_addr = nodeid;
|
|
||||||
+ printf("DeliverCallback: message (len=%lu)from node/pid %s/%d: '%s'\n",
|
|
||||||
+ (unsigned long int) msg_len,
|
|
||||||
+ inet_ntoa(saddr), pid, (const char *)msg);
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ printf("DeliverCallback: message (len=%lu)from node/pid %d/%d: '%s'\n",
|
|
||||||
+ (unsigned long int) msg_len, nodeid, pid,
|
|
||||||
(const char *)msg);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ConfchgCallback (
|
|
||||||
@@ -102,27 +92,51 @@ static void ConfchgCallback (
|
|
||||||
const struct cpg_address *joined_list, size_t joined_list_entries)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
+ struct in_addr saddr;
|
|
||||||
|
|
||||||
printf("\nConfchgCallback: group '");
|
|
||||||
print_cpgname(groupName);
|
|
||||||
printf("'\n");
|
|
||||||
for (i=0; i<joined_list_entries; i++) {
|
|
||||||
- printf("joined %s reason: %d\n",
|
|
||||||
- node_pid_format(joined_list[i].nodeid, joined_list[i].pid),
|
|
||||||
- joined_list[i].reason);
|
|
||||||
+ if (show_ip) {
|
|
||||||
+ saddr.s_addr = joined_list[i].nodeid;
|
|
||||||
+ printf("joined node/pid: %s/%d reason: %d\n",
|
|
||||||
+ inet_ntoa (saddr), joined_list[i].pid,
|
|
||||||
+ joined_list[i].reason);
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ printf("joined node/pid: %d/%d reason: %d\n",
|
|
||||||
+ joined_list[i].nodeid, joined_list[i].pid,
|
|
||||||
+ joined_list[i].reason);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0; i<left_list_entries; i++) {
|
|
||||||
- printf("left %s reason: %d\n",
|
|
||||||
- node_pid_format(left_list[i].nodeid, left_list[i].pid),
|
|
||||||
- left_list[i].reason);
|
|
||||||
+ if (show_ip) {
|
|
||||||
+ saddr.s_addr = left_list[i].nodeid;
|
|
||||||
+ printf("left node/pid: %s/%d reason: %d\n",
|
|
||||||
+ inet_ntoa (saddr), left_list[i].pid,
|
|
||||||
+ left_list[i].reason);
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ printf("left node/pid: %d/%d reason: %d\n",
|
|
||||||
+ left_list[i].nodeid, left_list[i].pid,
|
|
||||||
+ left_list[i].reason);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("nodes in group now %lu\n",
|
|
||||||
(unsigned long int) member_list_entries);
|
|
||||||
for (i=0; i<member_list_entries; i++) {
|
|
||||||
- printf("%s\n",
|
|
||||||
- node_pid_format(member_list[i].nodeid, member_list[i].pid));
|
|
||||||
+ if (show_ip) {
|
|
||||||
+ saddr.s_addr = member_list[i].nodeid;
|
|
||||||
+ printf("node/pid: %s/%d\n",
|
|
||||||
+ inet_ntoa (saddr), member_list[i].pid);
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ printf("node/pid: %d/%d\n",
|
|
||||||
+ member_list[i].nodeid, member_list[i].pid);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Is it us??
|
|
@ -1,3 +1,45 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 13 03:26:31 UTC 2013 - xli@suse.com
|
||||||
|
|
||||||
|
- Upstream version cs: c6688c6e11a35d13293f9b610faca5c7beb7e5cb
|
||||||
|
- Reload: document config.reload_in_progress in man page
|
||||||
|
- Reload: Add atomic reload to log config
|
||||||
|
- Reload: Add atomic reload to totemconfig
|
||||||
|
- Reload: Add reload code to cfg
|
||||||
|
- Reload: Make coroparse use a designated icmap hash table
|
||||||
|
- icmap: Add func to test equality of two key values
|
||||||
|
- [PATCH] Replace freopen with open/dup2 when daemonizing
|
||||||
|
- Add log message to exit signal handler
|
||||||
|
- icmap: Add map copy function
|
||||||
|
- icmap: Add function to return item data pointer
|
||||||
|
- icmap: Fix value len checking for strings
|
||||||
|
- icmap: Add function to return global icmap
|
||||||
|
- icmap: Allow multiple icmap instances
|
||||||
|
- Fix scheduler pause-detection timeout
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 6 05:47:16 UTC 2013 - xli@suse.com
|
||||||
|
|
||||||
|
- Update corosync-2.3.1.tar.gz for cts file missing
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 25 02:17:50 UTC 2013 - xli@suse.com
|
||||||
|
|
||||||
|
- Fix corosync start failed issue
|
||||||
|
+ corosync-init-lockfile-path-error.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 23 09:44:07 UTC 2013 - xli@suse.com
|
||||||
|
|
||||||
|
- Update to corosync 2.3.1 stable release
|
||||||
|
- Remove patches for all merged in the upstream or obsoleted
|
||||||
|
- corosync-confexample-timestamp.patch
|
||||||
|
- corosync-cpg-procdown.patch
|
||||||
|
- corosync-revert-cs2429.patch
|
||||||
|
- corosync.conf.example.patch
|
||||||
|
- corosync_reduce_RR_priority.patch
|
||||||
|
- fix-nodeid-conflicting.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri May 10 13:18:25 UTC 2013 - tserong@suse.com
|
Fri May 10 13:18:25 UTC 2013 - tserong@suse.com
|
||||||
|
|
||||||
|
@ -1,78 +0,0 @@
|
|||||||
Index: corosync-1.4.3/conf/corosync.conf.example
|
|
||||||
===================================================================
|
|
||||||
--- corosync-1.4.3.orig/conf/corosync.conf.example
|
|
||||||
+++ corosync-1.4.3/conf/corosync.conf.example
|
|
||||||
@@ -1,16 +1,59 @@
|
|
||||||
# Please read the corosync.conf.5 manual page
|
|
||||||
compatibility: whitetank
|
|
||||||
|
|
||||||
+aisexec {
|
|
||||||
+ # Run as root - this is necessary to be able to manage
|
|
||||||
+ # resources with Pacemaker
|
|
||||||
+ user: root
|
|
||||||
+ group: root
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+service {
|
|
||||||
+ # Load the Pacemaker Cluster Resource Manager
|
|
||||||
+ ver: 0
|
|
||||||
+ name: pacemaker
|
|
||||||
+ use_mgmtd: yes
|
|
||||||
+ use_logd: yes
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
totem {
|
|
||||||
+ # The only valid version is 2
|
|
||||||
version: 2
|
|
||||||
|
|
||||||
+ # How long before declaring a token lost (ms)
|
|
||||||
+ token: 5000
|
|
||||||
+
|
|
||||||
+ # How many token retransmits before forming a new configuration
|
|
||||||
+ token_retransmits_before_loss_const: 10
|
|
||||||
+
|
|
||||||
+ # How long to wait for join messages in the membership protocol (ms)
|
|
||||||
+ join: 60
|
|
||||||
+
|
|
||||||
+ # How long to wait for consensus to be achieved before starting
|
|
||||||
+ # a new round of membership configuration (ms)
|
|
||||||
+ consensus: 6000
|
|
||||||
+
|
|
||||||
+ # Turn off the virtual synchrony filter
|
|
||||||
+ vsftype: none
|
|
||||||
+
|
|
||||||
+ # Number of messages that may be sent by one processor on
|
|
||||||
+ # receipt of the token
|
|
||||||
+ max_messages: 20
|
|
||||||
+
|
|
||||||
+ # Limit generated nodeids to 31-bits (positive signed integers)
|
|
||||||
+ clear_node_high_bit: yes
|
|
||||||
+
|
|
||||||
# secauth: Enable mutual node authentication. If you choose to
|
|
||||||
# enable this ("on"), then do remember to create a shared
|
|
||||||
# secret with "corosync-keygen".
|
|
||||||
secauth: off
|
|
||||||
|
|
||||||
+ # How many threads to use for encryption/decryption
|
|
||||||
threads: 0
|
|
||||||
|
|
||||||
+ # Optionally assign a fixed node id (integer)
|
|
||||||
+ # nodeid: 124
|
|
||||||
+
|
|
||||||
# interface: define at least one interface to communicate
|
|
||||||
# over. If you define more than one interface stanza, you must
|
|
||||||
# also set rrp_mode.
|
|
||||||
@@ -60,10 +103,11 @@ logging {
|
|
||||||
to_stderr: no
|
|
||||||
# Log to a log file. When set to "no", the "logfile" option
|
|
||||||
# must not be set.
|
|
||||||
- to_logfile: yes
|
|
||||||
- logfile: /var/log/cluster/corosync.log
|
|
||||||
+ to_logfile: no
|
|
||||||
+ #logfile: /var/log/cluster/corosync.log
|
|
||||||
# Log to the system log daemon. When in doubt, set to yes.
|
|
||||||
to_syslog: yes
|
|
||||||
+ syslog_facility: daemon
|
|
||||||
# Log debug messages (very verbose). When in doubt, leave off.
|
|
||||||
debug: off
|
|
||||||
# Log messages with time stamps. When in doubt, set to on
|
|
330
corosync.spec
330
corosync.spec
@ -16,6 +16,21 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# Conditionals
|
||||||
|
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
|
||||||
|
# to disable or enable specific features
|
||||||
|
%bcond_with testagents
|
||||||
|
%define with_testagents 1
|
||||||
|
%bcond_with watchdog
|
||||||
|
%bcond_with monitoring
|
||||||
|
%bcond_with snmp
|
||||||
|
%bcond_with rdma
|
||||||
|
%define with_systemd 1
|
||||||
|
%bcond_with upstart
|
||||||
|
%bcond_with xmlconf
|
||||||
|
%bcond_with runautogen
|
||||||
|
%define with_runautogen 1
|
||||||
|
|
||||||
%if 0%{?sles_version} == 11
|
%if 0%{?sles_version} == 11
|
||||||
%ifnarch s390 s390x
|
%ifnarch s390 s390x
|
||||||
%define buildib 1
|
%define buildib 1
|
||||||
@ -29,84 +44,132 @@ Name: corosync
|
|||||||
Summary: The Corosync Cluster Engine and Application Programming Interfaces
|
Summary: The Corosync Cluster Engine and Application Programming Interfaces
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Productivity/Clustering/HA
|
Group: Productivity/Clustering/HA
|
||||||
Version: 1.4.5
|
Version: 2.3.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: http://www.corosync.org
|
Url: http://www.corosync.org
|
||||||
Source0: http://build.clusterlabs.org/%{name}/releases/%{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Source2: baselibs.conf
|
Source2: baselibs.conf
|
||||||
Patch1: corosync-confexample-timestamp.patch
|
Patch1: corosync-init-lockfile-path-error.patch
|
||||||
Patch2: corosync-revert-cs2429.patch
|
|
||||||
Patch4: corosync.conf.example.patch
|
|
||||||
Patch5: corosync-cpg-procdown.patch
|
|
||||||
Patch6: corosync_reduce_RR_priority.patch
|
|
||||||
Patch7: fix-nodeid-conflicting.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
# Runtime bits
|
# Runtime bits
|
||||||
Requires: libcorosync4 = %{version}-%{release}
|
Requires: libcorosync4 = %{version}-%{release}
|
||||||
Requires(pre): /usr/sbin/useradd
|
#Requires(pre): /usr/sbin/useradd
|
||||||
Requires(post): /sbin/chkconfig
|
#Requires(post): /sbin/chkconfig
|
||||||
Requires(preun): /sbin/chkconfig
|
#Requires(preun): /sbin/chkconfig
|
||||||
Conflicts: openais <= 0.89, libopenais2 <= 0.89, libopenais-devel <= 0.89
|
#Conflicts: openais <= 0.89, openais-devel <= 0.89
|
||||||
%define buildtrunk 1
|
|
||||||
%{?_with_buildtrunk: %define buildtrunk 1}
|
BuildRequires: libqb-devel
|
||||||
%if 0%{?buildtrunk} == 1
|
|
||||||
BuildRequires: autoconf
|
|
||||||
BuildRequires: automake
|
|
||||||
%endif
|
|
||||||
BuildRequires: mozilla-nss
|
BuildRequires: mozilla-nss
|
||||||
BuildRequires: mozilla-nss-devel
|
BuildRequires: mozilla-nss-devel
|
||||||
%if 0%{?buildib} == 1
|
%if %{with_runautogen}
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: automake
|
||||||
|
BuildRequires: libtool
|
||||||
|
%endif
|
||||||
|
%if %{with monitoring}
|
||||||
|
BuildRequires: libstatgrab-devel
|
||||||
|
%endif
|
||||||
|
%if %{with rdma}
|
||||||
BuildRequires: libibverbs-devel
|
BuildRequires: libibverbs-devel
|
||||||
BuildRequires: librdmacm-devel
|
BuildRequires: librdmacm-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pkg-config
|
%if %{with snmp}
|
||||||
|
BuildRequires: net-snmp-devel
|
||||||
|
%endif
|
||||||
|
%if %{with dbus}
|
||||||
|
BuildRequires: dbus-1-devel
|
||||||
|
%endif
|
||||||
|
%if %{with_systemd}
|
||||||
|
BuildRequires: systemd
|
||||||
|
Requires(post): systemd
|
||||||
|
Requires(preun): systemd
|
||||||
|
Requires(postun): systemd
|
||||||
|
%endif
|
||||||
|
%if %{with xmlconf}
|
||||||
|
Requires: libxslt
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%patch7 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?buildtrunk} == 1
|
#%if 0%{?buildtrunk} == 1
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
%endif
|
#%endif
|
||||||
%if 0%{?buildib} == 1
|
|
||||||
|
%if %{with rdma}
|
||||||
export ibverbs_CFLAGS=-I/usr/include/infiniband \
|
export ibverbs_CFLAGS=-I/usr/include/infiniband \
|
||||||
export ibverbs_LIBS=-libverbs \
|
export ibverbs_LIBS=-libverbs \
|
||||||
export rdmacm_CFLAGS=-I/usr/include/rdma \
|
export rdmacm_CFLAGS=-I/usr/include/rdma \
|
||||||
export rdmacm_LIBS=-lrdmacm \
|
export rdmacm_LIBS=-lrdmacm \
|
||||||
%{configure} \
|
|
||||||
--enable-nss \
|
|
||||||
--enable-rdma
|
|
||||||
%else
|
|
||||||
%{configure} \
|
|
||||||
--enable-nss
|
|
||||||
%endif
|
%endif
|
||||||
|
%{configure} \
|
||||||
|
%if %{with_testagents}
|
||||||
|
--enable-testagents \
|
||||||
|
--enable-augeas \
|
||||||
|
--enable-debug \
|
||||||
|
%endif
|
||||||
|
%if %{with watchdog}
|
||||||
|
--enable-watchdog \
|
||||||
|
%endif
|
||||||
|
%if %{with monitoring}
|
||||||
|
--enable-monitoring \
|
||||||
|
%endif
|
||||||
|
%if %{with snmp}
|
||||||
|
--enable-snmp \
|
||||||
|
%endif
|
||||||
|
%if %{with rdma}
|
||||||
|
--enable-rdma \
|
||||||
|
%endif
|
||||||
|
%if %{with_systemd}
|
||||||
|
--enable-systemd \
|
||||||
|
%endif
|
||||||
|
%if %{with upstart}
|
||||||
|
--enable-upstart \
|
||||||
|
%endif
|
||||||
|
%if %{with xmlconf}
|
||||||
|
--enable-xmlconf \
|
||||||
|
%endif
|
||||||
|
--with-initddir=%{_initrddir} \
|
||||||
|
--with-systemddir=%{_unitdir} \
|
||||||
|
--with-upstartdir=%{_sysconfdir}/init
|
||||||
|
|
||||||
make %{_smp_mflags}
|
make %{_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=%{buildroot}
|
make install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
|
%if %{with dbus}
|
||||||
|
mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
|
||||||
|
install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
|
||||||
|
%endif
|
||||||
# removed to discourage use of init.d/corosync (openais should be
|
# removed to discourage use of init.d/corosync (openais should be
|
||||||
# used instead)
|
# used instead)
|
||||||
#%if 0%{?suse_version}
|
#%if 0%{?suse_version}
|
||||||
#ln -sf ../../etc/init.d/corosync %{buildroot}%{_sbindir}/rccorosync
|
#ln -sf ../../etc/init.d/corosync %{buildroot}%{_sbindir}/rccorosync
|
||||||
#%endif
|
#%endif
|
||||||
rm -f %{buildroot}%{_initrddir}/corosync
|
#rm -f %{buildroot}%{_initrddir}/corosync
|
||||||
rm -f %{buildroot}%{_initrddir}/corosync-notifyd
|
#rm -f %{buildroot}%{_initrddir}/corosync-notifyd
|
||||||
rm -f %{buildroot}/usr/sbin/corosync-notifyd
|
#rm -f %{buildroot}/usr/sbin/corosync-notifyd
|
||||||
rm -f %{buildroot}/usr/share/man/man8/corosync-notifyd.8
|
#rm -f %{buildroot}/usr/share/man/man8/corosync-notifyd.8
|
||||||
## tree fixup
|
## tree fixup
|
||||||
# drop static libs
|
# drop static libs
|
||||||
rm -f %{buildroot}%{_libdir}/*.a
|
rm -f %{buildroot}%{_libdir}/*.a
|
||||||
|
rm -f %{buildroot}%{_libdir}/*.la
|
||||||
# drop docs and html docs for now
|
# drop docs and html docs for now
|
||||||
rm -rf %{buildroot}%{_docdir}/*
|
rm -rf %{buildroot}%{_docdir}/*
|
||||||
# the docdir is /usr/share/doc/<pkg> in the configuration
|
|
||||||
rm -rf %{buildroot}%{_datadir}/doc/*
|
rm -rf %{buildroot}%{_datadir}/doc/*
|
||||||
|
|
||||||
|
# /etc/sysconfig/corosync-notifyd
|
||||||
|
#mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||||
|
#install -m 644 tools/corosync-notifyd.sysconfig.example \
|
||||||
|
# %{buildroot}%{_sysconfdir}/sysconfig/corosync-notifyd
|
||||||
|
#%{__install} -d -m 0755 %{buildroot}/usr/lib/tmpfiles.d/
|
||||||
|
#%{__install} -m 0644 %{buildroot}/usr/lib/tmpfiles.d/corosync-notifyd
|
||||||
|
mkdir -p %{buildroot}/usr/lib/tmpfiles.d/
|
||||||
|
install -m 0644 tools/corosync-notifyd.sysconfig.example %{buildroot}/usr/lib/tmpfiles.d/corosync-notifyd
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
@ -115,78 +178,139 @@ This package contains the Corosync Cluster Engine Executive, several
|
|||||||
default APIs and libraries, default configuration files, and an init
|
default APIs and libraries, default configuration files, and an init
|
||||||
script.
|
script.
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%if %{with_systemd} && 0%{?systemd_post:1}
|
||||||
|
%service_add_pre corosync.service corosync-notifyd.service
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%post
|
||||||
|
%if %{with_systemd} && 0%{?systemd_post:1}
|
||||||
|
%service_add_post corosync.service corosync-notifyd.service
|
||||||
|
%else
|
||||||
|
if [ $1 -eq 1 ]; then
|
||||||
|
/sbin/chkconfig --add corosync || :
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%if %{with_systemd} && 0%{?systemd_preun:1}
|
||||||
|
#%systemd_preun corosync.service corosync-notifyd.service
|
||||||
|
%service_del_preun corosync.service corosync-notifyd.service
|
||||||
|
%else
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
/sbin/service corosync stop &>/dev/null || :
|
||||||
|
/sbin/chkconfig --del corosync || :
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%if %{with_systemd} && 0%{?systemd_postun:1}
|
||||||
|
#%systemd_postun corosync.service corosync-notifyd.service
|
||||||
|
%service_del_postun corosync.service corosync-notifyd.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE SECURITY
|
%doc LICENSE SECURITY
|
||||||
%{_bindir}/corosync-blackbox
|
|
||||||
%{_sbindir}/corosync
|
%{_sbindir}/corosync
|
||||||
%{_sbindir}/corosync-keygen
|
%{_sbindir}/corosync-keygen
|
||||||
%{_sbindir}/corosync-objctl
|
%{_sbindir}/corosync-cmapctl
|
||||||
%{_sbindir}/corosync-cfgtool
|
%{_sbindir}/corosync-cfgtool
|
||||||
%{_sbindir}/corosync-fplay
|
|
||||||
%{_sbindir}/corosync-pload
|
|
||||||
%{_sbindir}/corosync-cpgtool
|
%{_sbindir}/corosync-cpgtool
|
||||||
%{_sbindir}/corosync-quorumtool
|
%{_sbindir}/corosync-quorumtool
|
||||||
|
%{_sbindir}/corosync-notifyd
|
||||||
|
%{_bindir}/corosync-blackbox
|
||||||
|
%if %{with xmlconf}
|
||||||
|
%{_bindir}/corosync-xmlproc
|
||||||
|
%config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
|
||||||
|
%dir %{_datadir}/corosync
|
||||||
|
%{_datadir}/corosync/xml2conf.xsl
|
||||||
|
%{_mandir}/man8/corosync-xmlproc.8*
|
||||||
|
%{_mandir}/man5/corosync.xml.5*
|
||||||
|
%endif
|
||||||
%dir %{_sysconfdir}/corosync
|
%dir %{_sysconfdir}/corosync
|
||||||
%dir %{_sysconfdir}/corosync/service.d
|
|
||||||
%dir %{_sysconfdir}/corosync/uidgid.d
|
%dir %{_sysconfdir}/corosync/uidgid.d
|
||||||
%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
|
%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
|
||||||
%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
|
%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
|
||||||
%dir %{_libexecdir}/lcrso
|
#%config(noreplace) %{_sysconfdir}/sysconfig/corosync-notifyd
|
||||||
%{_libexecdir}/lcrso/coroparse.lcrso
|
%config(noreplace) /usr/lib/tmpfiles.d/corosync-notifyd
|
||||||
%{_libexecdir}/lcrso/objdb.lcrso
|
%if %{with dbus}
|
||||||
%{_libexecdir}/lcrso/service_cfg.lcrso
|
%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
|
||||||
%{_libexecdir}/lcrso/service_cpg.lcrso
|
%endif
|
||||||
%{_libexecdir}/lcrso/service_evs.lcrso
|
%if %{with snmp}
|
||||||
%{_libexecdir}/lcrso/service_confdb.lcrso
|
%{_datadir}/snmp/mibs/COROSYNC-MIB.txt
|
||||||
%{_libexecdir}/lcrso/service_pload.lcrso
|
%endif
|
||||||
%{_libexecdir}/lcrso/quorum_votequorum.lcrso
|
%if %{with_systemd}
|
||||||
%{_libexecdir}/lcrso/quorum_testquorum.lcrso
|
%{_unitdir}/corosync.service
|
||||||
%{_libexecdir}/lcrso/vsf_quorum.lcrso
|
%{_unitdir}/corosync-notifyd.service
|
||||||
%{_libexecdir}/lcrso/vsf_ykd.lcrso
|
%dir %{_datadir}/corosync
|
||||||
|
%{_datadir}/corosync/corosync
|
||||||
|
%{_datadir}/corosync/corosync-notifyd
|
||||||
|
%else
|
||||||
|
%{_initrddir}/corosync
|
||||||
|
%{_initrddir}/corosync-notifyd
|
||||||
|
%endif
|
||||||
|
%if %{with upstart}
|
||||||
|
%{_sysconfdir}/init/corosync.conf
|
||||||
|
%{_sysconfdir}/init/corosync-notifyd.conf
|
||||||
|
%endif
|
||||||
%dir %{_localstatedir}/lib/corosync
|
%dir %{_localstatedir}/lib/corosync
|
||||||
%dir %{_localstatedir}/log/cluster
|
%dir %{_localstatedir}/log/cluster
|
||||||
%{_mandir}/man8/confdb_keys.8*
|
%{_mandir}/man8/*.8*
|
||||||
%{_mandir}/man8/corosync_overview.8*
|
%{_mandir}/man5/*.5*
|
||||||
%{_mandir}/man8/corosync.8*
|
%{_mandir}/man3/*.3*
|
||||||
%{_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*
|
|
||||||
|
|
||||||
|
# optional testagent rpm
|
||||||
|
#
|
||||||
|
%if %{with_testagents}
|
||||||
|
|
||||||
|
%package -n corosync-testagents
|
||||||
|
Summary: The Corosync Cluster Engine Test Agents
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n corosync-testagents
|
||||||
|
This package contains corosync test agents.
|
||||||
|
|
||||||
|
%files -n corosync-testagents
|
||||||
|
%defattr(755,root,root,-)
|
||||||
|
%dir %{_datadir}/corosync/tests
|
||||||
|
%dir %{_datadir}/augeas
|
||||||
|
%dir %{_datadir}/augeas/lenses
|
||||||
|
%dir %{_datadir}/augeas/lenses/tests
|
||||||
|
%{_datadir}/corosync/tests/mem_leak_test.sh
|
||||||
|
%{_datadir}/corosync/tests/net_breaker.sh
|
||||||
|
%{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
|
||||||
|
%{_datadir}/corosync/tests/shm_leak_audit.sh
|
||||||
|
%{_datadir}/augeas/lenses/corosync.aug
|
||||||
|
%{_datadir}/augeas/lenses/tests/test_corosync.aug
|
||||||
|
%{_bindir}/cpg_test_agent
|
||||||
|
%{_bindir}/sam_test_agent
|
||||||
|
%{_bindir}/votequorum_test_agent
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# library
|
||||||
|
#
|
||||||
%package -n libcorosync4
|
%package -n libcorosync4
|
||||||
Summary: The Corosync Cluster Engine Libraries
|
Summary: The Corosync Cluster Engine Libraries
|
||||||
Group: Productivity/Clustering/HA
|
Group: Productivity/Clustering/HA
|
||||||
Conflicts: corosync < 0.92-7
|
#Requires: %{name} = %{version}-%{release}
|
||||||
Requires: %{name} = %{version}-%{release}
|
|
||||||
|
|
||||||
%description -n libcorosync4
|
%description -n libcorosync4
|
||||||
This package contains corosync libraries.
|
This package contains corosync libraries.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%files -n libcorosync4
|
%files -n libcorosync4
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
%{_libdir}/libcfg.so.*
|
%{_libdir}/libcfg.so.*
|
||||||
%{_libdir}/libcpg.so.*
|
%{_libdir}/libcpg.so.*
|
||||||
%{_libdir}/libconfdb.so.*
|
%{_libdir}/libcmap.so.*
|
||||||
%{_libdir}/libevs.so.*
|
|
||||||
%{_libdir}/libtotem_pg.so.*
|
%{_libdir}/libtotem_pg.so.*
|
||||||
%{_libdir}/liblogsys.so.*
|
|
||||||
%{_libdir}/libcoroipcc.so.*
|
|
||||||
%{_libdir}/libcoroipcs.so.*
|
|
||||||
%{_libdir}/libquorum.so.*
|
%{_libdir}/libquorum.so.*
|
||||||
%{_libdir}/libvotequorum.so.*
|
%{_libdir}/libvotequorum.so.*
|
||||||
%{_libdir}/libpload.so.*
|
|
||||||
%{_libdir}/libsam.so.*
|
%{_libdir}/libsam.so.*
|
||||||
|
%{_libdir}/libcorosync_common.so.*
|
||||||
|
|
||||||
%post -n libcorosync4 -p /sbin/ldconfig
|
%post -n libcorosync4 -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -196,74 +320,42 @@ This package contains corosync libraries.
|
|||||||
Summary: The Corosync Cluster Engine Development Kit
|
Summary: The Corosync Cluster Engine Development Kit
|
||||||
Group: Productivity/Clustering/HA
|
Group: Productivity/Clustering/HA
|
||||||
Requires: libcorosync4 = %{version}-%{release}
|
Requires: libcorosync4 = %{version}-%{release}
|
||||||
|
Requires: libqb-devel
|
||||||
Requires: pkgconfig
|
Requires: pkgconfig
|
||||||
|
Provides: corosync-devel = %{version}
|
||||||
|
Obsoletes: corosync-devel < 0.92-7
|
||||||
|
|
||||||
%description -n libcorosync-devel
|
%description -n libcorosync-devel
|
||||||
This package contains include files and man pages used to develop using
|
This package contains include files and man pages used to develop using
|
||||||
The Corosync Cluster Engine APIs.
|
The Corosync Cluster Engine APIs.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%files -n libcorosync-devel
|
%files -n libcorosync-devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE README.devmap
|
%doc LICENSE
|
||||||
%dir %{_includedir}/corosync/
|
%dir %{_includedir}/corosync/
|
||||||
%{_includedir}/corosync/cs_config.h
|
|
||||||
%{_includedir}/corosync/corodefs.h
|
%{_includedir}/corosync/corodefs.h
|
||||||
%{_includedir}/corosync/coroipc_types.h
|
|
||||||
%{_includedir}/corosync/coroipcs.h
|
|
||||||
%{_includedir}/corosync/coroipcc.h
|
|
||||||
%{_includedir}/corosync/cfg.h
|
%{_includedir}/corosync/cfg.h
|
||||||
%{_includedir}/corosync/confdb.h
|
%{_includedir}/corosync/cmap.h
|
||||||
%{_includedir}/corosync/corotypes.h
|
%{_includedir}/corosync/corotypes.h
|
||||||
%{_includedir}/corosync/cpg.h
|
%{_includedir}/corosync/cpg.h
|
||||||
%{_includedir}/corosync/evs.h
|
|
||||||
%{_includedir}/corosync/hdb.h
|
%{_includedir}/corosync/hdb.h
|
||||||
%{_includedir}/corosync/list.h
|
|
||||||
%{_includedir}/corosync/mar_gen.h
|
|
||||||
%{_includedir}/corosync/sam.h
|
%{_includedir}/corosync/sam.h
|
||||||
%{_includedir}/corosync/swab.h
|
|
||||||
%{_includedir}/corosync/quorum.h
|
%{_includedir}/corosync/quorum.h
|
||||||
%{_includedir}/corosync/votequorum.h
|
%{_includedir}/corosync/votequorum.h
|
||||||
%dir %{_includedir}/corosync/totem/
|
%dir %{_includedir}/corosync/totem/
|
||||||
%{_includedir}/corosync/totem/coropoll.h
|
|
||||||
%{_includedir}/corosync/totem/totem.h
|
%{_includedir}/corosync/totem/totem.h
|
||||||
%{_includedir}/corosync/totem/totemip.h
|
%{_includedir}/corosync/totem/totemip.h
|
||||||
%{_includedir}/corosync/totem/totempg.h
|
%{_includedir}/corosync/totem/totempg.h
|
||||||
%dir %{_includedir}/corosync/lcr/
|
|
||||||
%{_includedir}/corosync/lcr/lcr_ckpt.h
|
|
||||||
%{_includedir}/corosync/lcr/lcr_comp.h
|
|
||||||
%{_includedir}/corosync/lcr/lcr_ifact.h
|
|
||||||
%dir %{_includedir}/corosync/engine
|
|
||||||
%{_includedir}/corosync/engine/config.h
|
|
||||||
%{_includedir}/corosync/engine/coroapi.h
|
|
||||||
%{_includedir}/corosync/engine/logsys.h
|
|
||||||
%{_includedir}/corosync/engine/objdb.h
|
|
||||||
%{_includedir}/corosync/engine/quorum.h
|
|
||||||
%{_libdir}/libcfg.so
|
%{_libdir}/libcfg.so
|
||||||
%{_libdir}/libcpg.so
|
%{_libdir}/libcpg.so
|
||||||
%{_libdir}/libconfdb.so
|
%{_libdir}/libcmap.so
|
||||||
%{_libdir}/libevs.so
|
|
||||||
%{_libdir}/libtotem_pg.so
|
%{_libdir}/libtotem_pg.so
|
||||||
%{_libdir}/liblogsys.so
|
|
||||||
%{_libdir}/libcoroipcc.so
|
|
||||||
%{_libdir}/libcoroipcs.so
|
|
||||||
%{_libdir}/libquorum.so
|
%{_libdir}/libquorum.so
|
||||||
%{_libdir}/libvotequorum.so
|
%{_libdir}/libvotequorum.so
|
||||||
%{_libdir}/libpload.so
|
|
||||||
%{_libdir}/libsam.so
|
%{_libdir}/libsam.so
|
||||||
|
%{_libdir}/libcorosync_common.so
|
||||||
%{_libdir}/pkgconfig/*.pc
|
%{_libdir}/pkgconfig/*.pc
|
||||||
%{_mandir}/man3/cpg_*3*
|
%post -n libcorosync-devel -p /sbin/ldconfig
|
||||||
%{_mandir}/man3/evs_*3*
|
%postun -n libcorosync-devel -p /sbin/ldconfig
|
||||||
%{_mandir}/man3/confdb_*3*
|
|
||||||
%{_mandir}/man3/votequorum_*3*
|
|
||||||
%{_mandir}/man3/sam_*3*
|
|
||||||
%{_mandir}/man8/cpg_overview.8*
|
|
||||||
%{_mandir}/man8/evs_overview.8*
|
|
||||||
%{_mandir}/man8/confdb_overview.8*
|
|
||||||
%{_mandir}/man8/logsys_overview.8*
|
|
||||||
%{_mandir}/man8/votequorum_overview.8*
|
|
||||||
%{_mandir}/man8/coroipc_overview.8*
|
|
||||||
%{_mandir}/man8/sam_overview.8*
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
Index: corosync-1.4.4/exec/main.c
|
|
||||||
===================================================================
|
|
||||||
--- corosync-1.4.4.orig/exec/main.c
|
|
||||||
+++ corosync-1.4.4/exec/main.c
|
|
||||||
@@ -1268,7 +1268,8 @@ static void corosync_setscheduler (void)
|
|
||||||
#if defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX) && defined(HAVE_SCHED_SETSCHEDULER)
|
|
||||||
int res;
|
|
||||||
|
|
||||||
- sched_priority = sched_get_priority_max (SCHED_RR);
|
|
||||||
+ /*use the minimal priority same as pacemaker */
|
|
||||||
+ sched_priority = sched_get_priority_min (SCHED_RR);
|
|
||||||
if (sched_priority != -1) {
|
|
||||||
global_sched_param.sched_priority = sched_priority;
|
|
||||||
res = sched_setscheduler (0, SCHED_RR, &global_sched_param);
|
|
@ -1,71 +0,0 @@
|
|||||||
Index: corosync-1.4.5/conf/corosync.conf.example
|
|
||||||
===================================================================
|
|
||||||
--- corosync-1.4.5.orig/conf/corosync.conf.example
|
|
||||||
+++ corosync-1.4.5/conf/corosync.conf.example
|
|
||||||
@@ -41,7 +41,10 @@ totem {
|
|
||||||
max_messages: 20
|
|
||||||
|
|
||||||
# Limit generated nodeids to 31-bits (positive signed integers)
|
|
||||||
- clear_node_high_bit: yes
|
|
||||||
+ # you would set it to 'yes', the new option 'new' means wiping
|
|
||||||
+ # off the highest bit in network order to avoid possible nodeid
|
|
||||||
+ # conflicting.
|
|
||||||
+ clear_node_high_bit: new
|
|
||||||
|
|
||||||
# secauth: Enable mutual node authentication. If you choose to
|
|
||||||
# enable this ("on"), then do remember to create a shared
|
|
||||||
Index: corosync-1.4.5/exec/totemconfig.c
|
|
||||||
===================================================================
|
|
||||||
--- corosync-1.4.5.orig/exec/totemconfig.c
|
|
||||||
+++ corosync-1.4.5/exec/totemconfig.c
|
|
||||||
@@ -338,6 +338,9 @@ printf ("couldn't find totem handle\n");
|
|
||||||
if (strcmp (str, "yes") == 0) {
|
|
||||||
totem_config->clear_node_high_bit = 1;
|
|
||||||
}
|
|
||||||
+ if (strcmp (str, "new") == 0) {
|
|
||||||
+ totem_config->clear_node_high_bit = 2;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
objdb_get_int (objdb,object_totem_handle, "threads", &totem_config->threads);
|
|
||||||
Index: corosync-1.4.5/exec/totemip.c
|
|
||||||
===================================================================
|
|
||||||
--- corosync-1.4.5.orig/exec/totemip.c
|
|
||||||
+++ corosync-1.4.5/exec/totemip.c
|
|
||||||
@@ -626,10 +626,20 @@ int totemip_iface_check(struct totem_ip_
|
|
||||||
*/
|
|
||||||
if (ipaddr.family == AF_INET && ipaddr.nodeid == 0) {
|
|
||||||
unsigned int nodeid = 0;
|
|
||||||
+ unsigned int new_nodeid = 0;
|
|
||||||
memcpy (&nodeid, ipaddr.addr, sizeof (int));
|
|
||||||
- if (mask_high_bit) {
|
|
||||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
||||||
+ new_nodeid = swab32 (nodeid);
|
|
||||||
+#else
|
|
||||||
+ new_nodeid = nodeid;
|
|
||||||
+#endif
|
|
||||||
+ if (mask_high_bit == 1) {
|
|
||||||
nodeid &= 0x7FFFFFFF;
|
|
||||||
}
|
|
||||||
+ if (mask_high_bit == 2) {
|
|
||||||
+ new_nodeid &= 0x7FFFFFFF;
|
|
||||||
+ nodeid = new_nodeid;
|
|
||||||
+ }
|
|
||||||
ipaddr.nodeid = nodeid;
|
|
||||||
}
|
|
||||||
totemip_copy (boundto, &ipaddr);
|
|
||||||
Index: corosync-1.4.5/man/corosync.conf.5
|
|
||||||
===================================================================
|
|
||||||
--- corosync-1.4.5.orig/man/corosync.conf.5
|
|
||||||
+++ corosync-1.4.5/man/corosync.conf.5
|
|
||||||
@@ -175,7 +175,9 @@ This configuration option is optional an
|
|
||||||
specified. Some openais clients require a signed 32 bit nodeid that is greater
|
|
||||||
than zero however by default openais uses all 32 bits of the IPv4 address space
|
|
||||||
when generating a nodeid. Set this option to yes to force the high bit to be
|
|
||||||
-zero and therefor ensure the nodeid is a positive signed 32 bit integer.
|
|
||||||
+zero and therefor ensure the nodeid is a positive signed 32 bit integer. Set
|
|
||||||
+this option to new to force the high bit in network order to be zero which
|
|
||||||
+intends to avoid possible nodeid conflicting.
|
|
||||||
|
|
||||||
WARNING: The clusters behavior is undefined if this option is enabled on only
|
|
||||||
a subset of the cluster (for example during a rolling upgrade).
|
|
Loading…
Reference in New Issue
Block a user