Accepting request 724896 from home:yuanren10

Upgrade to corosync-2.4.5

OBS-URL: https://build.opensuse.org/request/show/724896
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=153
This commit is contained in:
Yuan Ren 2019-08-21 03:00:36 +00:00 committed by Git OBS Bridge
parent f2ba1a2fd2
commit b39d72432a
12 changed files with 650 additions and 48 deletions

View File

@ -1,11 +0,0 @@
--- corosync-2.4.5/configure.ac 2019-07-30 20:26:27.000000000 +0800
+++ corosync-2.4.5-new/configure.ac 2019-08-02 18:06:00.703167465 +0800
@@ -737,7 +737,7 @@
AM_CONDITIONAL(AUGTOOL, test -n "${AUGTOOL}")
AC_SUBST([NSS_LDFLAGS])
-AM_CONDITIONAL(BUILD_HTML_DOCS, test -n "${GROFF}")
+AM_CONDITIONAL(BUILD_HTML_DOCS, false)
AC_SUBST([LINT_FLAGS])

View File

@ -1,6 +1,16 @@
--- corosync-2.4.5/cts/agents/cpg_test_agent.c 2019-07-30 20:26:27.000000000 +0800
+++ corosync-2.4.5-new/cts/agents/cpg_test_agent.c 2019-08-05 13:42:47.494088257 +0800
@@ -211,8 +211,8 @@
//cpg_test_agent: Fix snprintf compiler warnings
---
cts/agents/cpg_test_agent.c | 8 ++++----
exec/coroparse.c | 18 +++---------------
lib/sam.c | 36 ++++++++++++++++++++++++++++--------
tools/corosync-quorumtool.c | 2 +-
4 files changed, 36 insertions(+), 28 deletions(-)
diff --git a/cts/agents/cpg_test_agent.c b/cts/agents/cpg_test_agent.c
index 0837c69c..2224141c 100644
--- a/cts/agents/cpg_test_agent.c
+++ b/cts/agents/cpg_test_agent.c
@@ -211,8 +211,8 @@ static void config_change_callback (
if (record_config_events_g > 0) {
log_pt = malloc (sizeof(log_entry_t));
list_init (&log_pt->list);
@ -11,7 +21,7 @@
list_add_tail(&log_pt->list, &config_chg_log_head);
qb_log (LOG_INFO, "cpg event %s", log_pt->log);
}
@@ -221,8 +221,8 @@
@@ -221,8 +221,8 @@ static void config_change_callback (
if (record_config_events_g > 0) {
log_pt = malloc (sizeof(log_entry_t));
list_init (&log_pt->list);
@ -22,3 +32,6 @@
list_add_tail (&log_pt->list, &config_chg_log_head);
qb_log (LOG_INFO, "cpg event %s", log_pt->log);
}
--
2.13.6

View File

@ -0,0 +1,23 @@
diff -Naur corosync-2.4.5/conf/corosync.conf.example corosync-2.4.5-new/conf/corosync.conf.example
--- corosync-2.4.5/conf/corosync.conf.example 2019-08-16 17:30:52.306726801 +0800
+++ corosync-2.4.5-new/conf/corosync.conf.example 2019-08-16 17:33:25.687567471 +0800
@@ -9,6 +9,19 @@
crypto_cipher: none
crypto_hash: none
+ # 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
+
+ # 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)
# you would set it to 'yes', the new option 'new' means wiping
# off the highest bit in network order to avoid possible nodeid

View File

@ -0,0 +1,363 @@
From ec2dfbec877fee166b31493e2dba41a850380608 Mon Sep 17 00:00:00 2001
From: Bin Liu <bliu@suse.com>
Date: Tue, 17 Apr 2018 18:04:52 +0800
Subject: [PATCH] totemudp: Add local loop support for unicast msgs
---
exec/totemudp.c | 218 ++++++++++++++++++++++++++++++++------------------------
1 file changed, 126 insertions(+), 92 deletions(-)
diff --git a/exec/totemudp.c b/exec/totemudp.c
index 4b644ae..ea18897 100644
--- a/exec/totemudp.c
+++ b/exec/totemudp.c
@@ -205,8 +205,6 @@ static int totemudp_build_sockets (
struct totemudp_socket *sockets,
struct totem_ip_address *bound_to);
-static struct totem_ip_address localhost;
-
static void totemudp_instance_initialize (struct totemudp_instance *instance)
{
memset (instance, 0, sizeof (struct totemudp_instance));
@@ -267,6 +265,7 @@ static inline void ucast_sendmsg (
struct sockaddr_storage sockaddr;
struct iovec iovec;
int addrlen;
+ int send_sock;
if (msg_len + crypto_get_current_sec_header_size(instance->crypto_inst) > sizeof(buf_out)) {
log_printf(LOGSYS_LEVEL_CRIT, "UDP message for ucast is too big. Ignoring message");
@@ -317,11 +316,19 @@ static inline void ucast_sendmsg (
#endif
+ if (instance->netif_bind_state == BIND_STATE_REGULAR) {
+ send_sock = instance->totemudp_sockets.mcast_send;
+ } else {
+ send_sock = instance->totemudp_sockets.local_mcast_loop[1];
+ msg_ucast.msg_name = NULL;
+ msg_ucast.msg_namelen = 0;
+ }
+
/*
* Transmit unicast message
* An error here is recovered by totemsrp
*/
- res = sendmsg (instance->totemudp_sockets.mcast_send, &msg_ucast,
+ res = sendmsg (send_sock, &msg_ucast,
MSG_NOSIGNAL);
if (res < 0) {
LOGSYS_PERROR (errno, instance->totemudp_log_level_debug,
@@ -390,18 +397,20 @@ static inline void mcast_sendmsg (
msg_mcast.msg_accrightslen = 0;
#endif
- /*
- * Transmit multicast message
- * An error here is recovered by totemsrp
- */
- res = sendmsg (instance->totemudp_sockets.mcast_send, &msg_mcast,
- MSG_NOSIGNAL);
- if (res < 0) {
- LOGSYS_PERROR (errno, instance->totemudp_log_level_debug,
- "sendmsg(mcast) failed (non-critical)");
- instance->stats->continuous_sendmsg_failures++;
- } else {
- instance->stats->continuous_sendmsg_failures = 0;
+ if (instance->netif_bind_state == BIND_STATE_REGULAR) {
+ /*
+ * Transmit multicast message
+ * An error here is recovered by totemsrp
+ */
+ res = sendmsg (instance->totemudp_sockets.mcast_send, &msg_mcast,
+ MSG_NOSIGNAL);
+ if (res < 0) {
+ LOGSYS_PERROR (errno, instance->totemudp_log_level_debug,
+ "sendmsg(mcast) failed (non-critical)");
+ instance->stats->continuous_sendmsg_failures++;
+ } else {
+ instance->stats->continuous_sendmsg_failures = 0;
+ }
}
/*
@@ -580,7 +589,6 @@ static void timer_function_netif_check_timeout (
struct totemudp_instance *instance = (struct totemudp_instance *)data;
int interface_up;
int interface_num;
- struct totem_ip_address *bind_address;
/*
* Build sockets for every interface
@@ -617,28 +625,31 @@ static void timer_function_netif_check_timeout (
qb_loop_poll_del (instance->totemudp_poll_handle,
instance->totemudp_sockets.mcast_recv);
close (instance->totemudp_sockets.mcast_recv);
+ instance->totemudp_sockets.mcast_recv = -1;
}
if (instance->totemudp_sockets.mcast_send > 0) {
close (instance->totemudp_sockets.mcast_send);
- }
- if (instance->totemudp_sockets.local_mcast_loop[0] > 0) {
- qb_loop_poll_del (instance->totemudp_poll_handle,
- instance->totemudp_sockets.local_mcast_loop[0]);
- close (instance->totemudp_sockets.local_mcast_loop[0]);
- close (instance->totemudp_sockets.local_mcast_loop[1]);
+ instance->totemudp_sockets.mcast_send = -1;
}
if (instance->totemudp_sockets.token > 0) {
qb_loop_poll_del (instance->totemudp_poll_handle,
instance->totemudp_sockets.token);
close (instance->totemudp_sockets.token);
+ instance->totemudp_sockets.token = -1;
}
if (interface_up == 0) {
+ if (instance->netif_bind_state == BIND_STATE_UNBOUND) {
+ log_printf (instance->totemudp_log_level_error,
+ "One of your ip addresses are now bound to localhost. "
+ "Corosync would not work correctly.");
+ exit(COROSYNC_DONE_FATAL_ERR);
+ }
+
/*
* Interface is not up
*/
instance->netif_bind_state = BIND_STATE_LOOPBACK;
- bind_address = &localhost;
/*
* Add a timer to retry building interfaces and request memb_gather_enter
@@ -654,34 +665,29 @@ static void timer_function_netif_check_timeout (
* Interface is up
*/
instance->netif_bind_state = BIND_STATE_REGULAR;
- bind_address = &instance->totem_interface->bindnet;
}
/*
* Create and bind the multicast and unicast sockets
*/
(void)totemudp_build_sockets (instance,
&instance->mcast_address,
- bind_address,
+ &instance->totem_interface->bindnet,
&instance->totemudp_sockets,
&instance->totem_interface->boundto);
- qb_loop_poll_add (
- instance->totemudp_poll_handle,
- QB_LOOP_MED,
- instance->totemudp_sockets.mcast_recv,
- POLLIN, instance, net_deliver_fn);
-
- qb_loop_poll_add (
- instance->totemudp_poll_handle,
- QB_LOOP_MED,
- instance->totemudp_sockets.local_mcast_loop[0],
- POLLIN, instance, net_deliver_fn);
+ if (instance->netif_bind_state == BIND_STATE_REGULAR) {
+ qb_loop_poll_add (
+ instance->totemudp_poll_handle,
+ QB_LOOP_MED,
+ instance->totemudp_sockets.mcast_recv,
+ POLLIN, instance, net_deliver_fn);
- qb_loop_poll_add (
- instance->totemudp_poll_handle,
- QB_LOOP_MED,
- instance->totemudp_sockets.token,
- POLLIN, instance, net_deliver_fn);
+ qb_loop_poll_add (
+ instance->totemudp_poll_handle,
+ QB_LOOP_MED,
+ instance->totemudp_sockets.token,
+ POLLIN, instance, net_deliver_fn);
+ }
totemip_copy (&instance->my_id, &instance->totem_interface->boundto);
@@ -732,6 +738,66 @@ static void totemudp_traffic_control_set(struct totemudp_instance *instance, int
#endif
}
+static int totemudp_build_local_sockets(
+ struct totemudp_instance *instance,
+ struct totemudp_socket *sockets)
+{
+ int i;
+ unsigned int sendbuf_size;
+ unsigned int recvbuf_size;
+ unsigned int optlen = sizeof (sendbuf_size);
+ int res;
+
+ /*
+ * Create local multicast loop socket
+ */
+ if (socketpair(AF_UNIX, SOCK_DGRAM, 0, sockets->local_mcast_loop) == -1) {
+ LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+ "socket() failed");
+ return (-1);
+ }
+
+ for (i = 0; i < 2; i++) {
+ totemip_nosigpipe (sockets->local_mcast_loop[i]);
+ res = fcntl (sockets->local_mcast_loop[i], F_SETFL, O_NONBLOCK);
+ if (res == -1) {
+ LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
+ "Could not set non-blocking operation on multicast socket");
+ return (-1);
+ }
+ }
+
+ recvbuf_size = MCAST_SOCKET_BUFFER_SIZE;
+ sendbuf_size = MCAST_SOCKET_BUFFER_SIZE;
+
+ res = setsockopt (sockets->local_mcast_loop[0], SOL_SOCKET, SO_RCVBUF, &recvbuf_size, optlen);
+ if (res == -1) {
+ LOGSYS_PERROR (errno, instance->totemudp_log_level_debug,
+ "Unable to set SO_RCVBUF size on UDP local mcast loop socket");
+ return (-1);
+ }
+ res = setsockopt (sockets->local_mcast_loop[1], SOL_SOCKET, SO_SNDBUF, &sendbuf_size, optlen);
+ if (res == -1) {
+ LOGSYS_PERROR (errno, instance->totemudp_log_level_debug,
+ "Unable to set SO_SNDBUF size on UDP local mcast loop socket");
+ return (-1);
+ }
+
+ res = getsockopt (sockets->local_mcast_loop[0], SOL_SOCKET, SO_RCVBUF, &recvbuf_size, &optlen);
+ if (res == 0) {
+ log_printf (instance->totemudp_log_level_debug,
+ "Local receive multicast loop socket recv buffer size (%d bytes).", recvbuf_size);
+ }
+
+ res = getsockopt (sockets->local_mcast_loop[1], SOL_SOCKET, SO_SNDBUF, &sendbuf_size, &optlen);
+ if (res == 0) {
+ log_printf (instance->totemudp_log_level_debug,
+ "Local transmit multicast loop socket send buffer size (%d bytes).", sendbuf_size);
+ }
+
+ return (0);
+}
+
static int totemudp_build_sockets_ip (
struct totemudp_instance *instance,
struct totem_ip_address *mcast_address,
@@ -755,7 +821,6 @@ static int totemudp_build_sockets_ip (
int res;
int flag;
uint8_t sflag;
- int i;
/*
* Create multicast recv socket
@@ -786,27 +851,6 @@ static int totemudp_build_sockets_ip (
}
/*
- * Create local multicast loop socket
- */
- if (socketpair(AF_UNIX, SOCK_DGRAM, 0, sockets->local_mcast_loop) == -1) {
- LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
- "socket() failed");
- return (-1);
- }
-
- for (i = 0; i < 2; i++) {
- totemip_nosigpipe (sockets->local_mcast_loop[i]);
- res = fcntl (sockets->local_mcast_loop[i], F_SETFL, O_NONBLOCK);
- if (res == -1) {
- LOGSYS_PERROR (errno, instance->totemudp_log_level_warning,
- "Could not set non-blocking operation on multicast socket");
- return (-1);
- }
- }
-
-
-
- /*
* Setup mcast send socket
*/
sockets->mcast_send = socket (bindnet_address->family, SOCK_DGRAM, 0);
@@ -930,18 +974,6 @@ static int totemudp_build_sockets_ip (
"Unable to set SO_SNDBUF size on UDP mcast socket");
return (-1);
}
- res = setsockopt (sockets->local_mcast_loop[0], SOL_SOCKET, SO_RCVBUF, &recvbuf_size, optlen);
- if (res == -1) {
- LOGSYS_PERROR (errno, instance->totemudp_log_level_debug,
- "Unable to set SO_RCVBUF size on UDP local mcast loop socket");
- return (-1);
- }
- res = setsockopt (sockets->local_mcast_loop[1], SOL_SOCKET, SO_SNDBUF, &sendbuf_size, optlen);
- if (res == -1) {
- LOGSYS_PERROR (errno, instance->totemudp_log_level_debug,
- "Unable to set SO_SNDBUF size on UDP local mcast loop socket");
- return (-1);
- }
res = getsockopt (sockets->mcast_recv, SOL_SOCKET, SO_RCVBUF, &recvbuf_size, &optlen);
if (res == 0) {
@@ -955,19 +987,6 @@ static int totemudp_build_sockets_ip (
"Transmit multicast socket send buffer size (%d bytes).", sendbuf_size);
}
- res = getsockopt (sockets->local_mcast_loop[0], SOL_SOCKET, SO_RCVBUF, &recvbuf_size, &optlen);
- if (res == 0) {
- log_printf (instance->totemudp_log_level_debug,
- "Local receive multicast loop socket recv buffer size (%d bytes).", recvbuf_size);
- }
-
- res = getsockopt (sockets->local_mcast_loop[1], SOL_SOCKET, SO_SNDBUF, &sendbuf_size, &optlen);
- if (res == 0) {
- log_printf (instance->totemudp_log_level_debug,
- "Local transmit multicast loop socket send buffer size (%d bytes).", sendbuf_size);
- }
-
-
/*
* Join group membership on socket
*/
@@ -1256,8 +1275,19 @@ int totemudp_initialize (
instance->totemudp_target_set_completed = target_set_completed;
- totemip_localhost (instance->mcast_address.family, &localhost);
- localhost.nodeid = instance->totem_config->node_id;
+ /*
+ * Create static local mcast sockets
+ */
+ if (totemudp_build_local_sockets(instance, &instance->totemudp_sockets) == -1) {
+ free(instance);
+ return (-1);
+ }
+
+ qb_loop_poll_add (
+ instance->totemudp_poll_handle,
+ QB_LOOP_MED,
+ instance->totemudp_sockets.local_mcast_loop[0],
+ POLLIN, instance, net_deliver_fn);
/*
* RRP layer isn't ready to receive message because it hasn't
@@ -1320,10 +1350,14 @@ int totemudp_recv_flush (void *udp_context)
for (i = 0; i < 2; i++) {
sock = -1;
if (i == 0) {
- sock = instance->totemudp_sockets.mcast_recv;
+ if (instance->netif_bind_state == BIND_STATE_REGULAR) {
+ sock = instance->totemudp_sockets.mcast_recv;
+ } else {
+ continue;
+ }
}
if (i == 1) {
- sock = instance->totemudp_sockets.local_mcast_loop[0];
+ sock = instance->totemudp_sockets.local_mcast_loop[0];
}
assert(sock != -1);
--
2.13.6

View File

@ -0,0 +1,67 @@
Index: corosync-2.3.3/conf/corosync.conf.example
===================================================================
--- corosync-2.3.3.orig/conf/corosync.conf.example
+++ corosync-2.3.3/conf/corosync.conf.example
@@ -9,6 +9,12 @@ totem {
crypto_cipher: none
crypto_hash: none
+ # Limit generated nodeids to 31-bits (positive signed integers)
+ # 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: yes
+
# interface: define at least one interface to communicate
# over. If you define more than one interface stanza, you must
# also set rrp_mode.
@@ -58,8 +64,8 @@ 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
# Log debug messages (very verbose). When in doubt, leave off.
@@ -77,5 +83,5 @@ logging {
quorum {
# Enable and configure quorum subsystem (default: off)
# see also corosync.conf.5 and votequorum.5
- #provider: corosync_votequorum
+ provider: corosync_votequorum
}
Index: corosync-2.3.3/conf/corosync.conf.example.udpu
===================================================================
--- corosync-2.3.3.orig/conf/corosync.conf.example.udpu
+++ corosync-2.3.3/conf/corosync.conf.example.udpu
@@ -5,6 +5,8 @@ totem {
crypto_cipher: none
crypto_hash: none
+ clear_node_high_bit: yes
+
interface {
ringnumber: 0
bindnetaddr: 10.16.35.0
@@ -16,9 +18,9 @@ totem {
logging {
fileline: off
- to_logfile: yes
+ #to_logfile: no
to_syslog: yes
- logfile: /var/log/cluster/corosync.log
+ #logfile: /var/log/cluster/corosync.log
debug: off
timestamp: on
logger_subsys {
@@ -54,5 +56,5 @@ nodelist {
quorum {
# Enable and configure quorum subsystem (default: off)
# see also corosync.conf.5 and votequorum.5
- #provider: corosync_votequorum
+ provider: corosync_votequorum
}

View File

@ -0,0 +1,33 @@
--- corosync-2.3.5.orig/cts/agents/mem_leak_test.sh 2015-07-21 13:47:30.058803324 +0800
+++ corosync-2.3.5/cts/agents/mem_leak_test.sh 2015-07-27 10:03:53.903380662 +0800
@@ -41,14 +41,14 @@
find $f | sed "s|\.|_|g" | sed "s|/|.|g" | while read l
do
echo $l.count u64 $COUNT >> $temp_file
- let COUNT="$COUNT+1"
+ COUNT="$COUNT+1"
done
corosync-cmapctl -p $temp_file
corosync-cmapctl -D usr
done
AFTER=$(get_mem $TYPE)
- let DIFF="$AFTER - $BEFORE"
+ DIFF="$AFTER - $BEFORE"
rm -f $temp_file
#echo $f diff $TYPE $DIFF
echo $DIFF
@@ -76,11 +76,11 @@
find /usr/bin | sed "s|\.|_|g" | sed "s|/|.|g" | while read l
do
corosync-cmapctl -s $l u32 $COUNT
- let COUNT="$COUNT+1"
+ COUNT="$COUNT+1"
done
corosync-cmapctl -D usr
AFTER=$(get_mem $TYPE)
- let DIFF="$AFTER - $BEFORE"
+ DIFF="$AFTER - $BEFORE"
echo $DIFF
exit 0

View File

@ -0,0 +1,19 @@
diff -Naur corosync-2.4.5/init/corosync.in corosync-2.4.5-new/init/corosync.in
--- corosync-2.4.5/init/corosync.in 2019-08-16 18:38:12.029553632 +0800
+++ corosync-2.4.5-new/init/corosync.in 2019-08-16 18:39:59.138161517 +0800
@@ -30,6 +30,7 @@
success()
{
echo -ne "[ OK ]\r"
+ rtrn=0
}
failure()
@@ -150,6 +151,7 @@
# they also assume that init scripts will create
# required subdirectories for proper operations
mkdir -p @LOCALSTATEDIR@/run
+ mkdir -p @LOCALSTATEDIR@/lock/subsys
if status -p "$prog_pid_file" "$prog" > /dev/null 2>&1; then
success

View File

@ -0,0 +1,59 @@
From b827e7f33fee652a79713d302aa9be56b456fa7d Mon Sep 17 00:00:00 2001
From: Bin Liu <bliu@suse.com>
Date: Wed, 19 Oct 2016 15:59:17 +0800
Subject: [PATCH] modify default run level for corosync daemons
---
init/corosync-qdevice.in | 4 ++--
init/corosync-qnetd.in | 4 ++--
init/corosync.in | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/init/corosync-qdevice.in b/init/corosync-qdevice.in
index 913e033..4949c4e 100755
--- a/init/corosync-qdevice.in
+++ b/init/corosync-qdevice.in
@@ -13,8 +13,8 @@
# Provides: corosync-qdevice
# Required-Start: $corosync
# Required-Stop: $corosync
-# Default-Start:
-# Default-Stop:
+# Default-Start: 3
+# Default-Stop: 1
# Short-Description: Starts and stops Corosync Qdevice daemon.
# Description: Starts and stops Corosync Qdevice daemon.
### END INIT INFO
diff --git a/init/corosync-qnetd.in b/init/corosync-qnetd.in
index 15d30ea..ed73ee0 100755
--- a/init/corosync-qnetd.in
+++ b/init/corosync-qnetd.in
@@ -13,8 +13,8 @@
# Provides: corosync-qnetd
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
-# Default-Start:
-# Default-Stop:
+# Default-Start: 3
+# Default-Stop: 1
# Short-Description: Starts and stops Corosync Qdevice Network daemon.
# Description: Starts and stops Corosync Qdevice Network daemon.
### END INIT INFO
diff --git a/init/corosync.in b/init/corosync.in
index c93f971..366b5d6 100755
--- a/init/corosync.in
+++ b/init/corosync.in
@@ -14,8 +14,8 @@
# Provides: corosync
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
-# Default-Start:
-# Default-Stop:
+# Default-Start: 3
+# Default-Stop: 1
# Short-Description: Starts and stops Corosync Cluster Engine.
# Description: Starts and stops Corosync Cluster Engine.
### END INIT INFO
--
2.6.6

View File

@ -1,34 +1,34 @@
-------------------------------------------------------------------
Fri Aug 2 09:39:35 UTC 2019 - Yuan Ren <yren@suse.com>
Fri Aug 16 09:50:28 UTC 2019 - Yuan Ren <yren@suse.com>
- corosync-2.4.5 upgrade(bsc#1144200)
block_unlisted_ips block package from ips not in nodelist
Qnetd now supports updated NSS database format
Partly fixed problem with ifdown (only for UDPU)
Add: 0001-disable-build-html-docs.patch
Add: bsc#1083561-upgrade-from-1-x-y.patch
Add: 0002-Fix-compile-warnings-with-GCC-7.2.1.patch
Remove: disable-build-html-docs.patch
Remove: 0001-coroapi-Use-size_t-for-private_data_size.patch
Remove: 0002-fix-ifdown-udp.patch
Remove: 0003-fix-tmpfiles-create.patch
Remove: 0004-mark-corosync-as-a-static-service.patch
Remove: 0005-do-not-convert-empty-uid-gid-to-0.patch
Remove: 0006-Fix-compile-warnings-with-GCC-7.2.1.patch
Remove: 0007-add-config-for-corosync-qnetd.patch
Remove: 0008-bsc#1083561-upgrade-from-1-x-y.patch
Remove: 0009-bsc#1088619-add-version.patch
Remove: 0010-qdevice-net-instance.c-optarg-should-be-str.patch
Remove: 0011-NSS_NoDB_Init-the-parameter-is-reserved-must-be-NULL.patch
Remove: 0012-cpg-Inform-clients-about-left-nodes-during-pause.patch
Remove: bnc#872651-stop-cluster.patch
Remove: bnc#882449-corosync-conf-example.patch
Remove: bsc#1001164-corosync.conf-example.patch
Remove: bsc#1141536-corosync-qdevice-Nss-new-database-files.patch
Remove: corosync-2.3.4-fix-bashisms.patch
Remove: corosync-init-lockfile-path-error.patch
Remove: corosync-start-stop-level.patch
Added:
corosync-2.4.5.tar.gz
bug-1001164_corosync.conf-example.patch
corosync-init-lockfile-path-error.patch
Deleted:
corosync-2.4.4.tar.gz
0003-fix-tmpfiles-create.patch
0004-mark-corosync-as-a-static-service.patch
0005-do-not-convert-empty-uid-gid-to-0.patch
0007-add-config-for-corosync-qnetd.patch
0009-bsc#1088619-add-version.patch
0010-qdevice-net-instance.c-optarg-should-be-str.patch
0011-NSS_NoDB_Init-the-parameter-is-reserved-must-be-NULL.patch
0012-cpg-inform-clients-about-left-nodes-during-pause.patch
bnc#872651-stop-cluster.patch
disable-build-html-docs.patch
Renamed:
0001-coroapi-Use-size_t-for-private_data_size.patch -> upstream-afd97d7884940_coroapi-Use-size_t-for-private_data_size.patch
0006-Fix-compile-warnings-with-GCC-7.2.1.patch -> Fix-compile-warnings-with-GCC-7.2.1.patch
0008-bsc#1083561-upgrade-from-1-x-y.patch -> bug-1083561_upgrade-from-1-x-y.patch
bnc#882449-corosync-conf-example.patch -> bug-882449_corosync-conf-example.patch
0002-fix-ifdown-udp.patch -> bug-1032634_fix-ifdown-udp.patch
bsc#1001164-corosync.conf-example.patch -> bug-1001164_corosync.conf-example.patch
-------------------------------------------------------------------
Wed May 2 02:36:56 UTC 2018 - bliu@suse.com

View File

@ -55,9 +55,15 @@ Release: 0
Url: http://corosync.github.io/corosync/
Source0: %{name}-%{version}.tar.gz
Source2: baselibs.conf
Patch1: bsc#1083561-upgrade-from-1-x-y.patch
Patch2: 0001-disable-build-html-docs.patch
Patch3: 0002-Fix-compile-warnings-with-GCC-7.2.1.patch
Patch1: upstream-afd97d7884940_coroapi-Use-size_t-for-private_data_size.patch
Patch2: Fix-compile-warnings-with-GCC-7.2.1.patch
Patch3: bug-1083561_upgrade-from-1-x-y.patch
Patch4: bug-882449_corosync-conf-example.patch
Patch5: bug-1032634_fix-ifdown-udp.patch
Patch6: bug-1001164_corosync.conf-example.patch
Patch7: corosync-2.3.4-fix-bashisms.patch
Patch8: corosync-init-lockfile-path-error.patch
Patch9: corosync-start-stop-level.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# openais is indeed gone and should be uninstalled. Yes, we do not
@ -81,7 +87,7 @@ Conflicts: openais <= 0.89, openais-devel <= 0.89
# Build bits
BuildRequires: groff
BuildRequires: groff-full
BuildRequires: libqb-devel
BuildRequires: mozilla-nss-devel
BuildRequires: zlib-devel
@ -126,6 +132,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%build
%if %{with runautogen}

View File

@ -0,0 +1,24 @@
diff -Naur corosync-2.4.5/exec/ipc_glue.c corosync-2.4.5-new/exec/ipc_glue.c
--- corosync-2.4.5/exec/ipc_glue.c 2019-07-30 20:26:27.000000000 +0800
+++ corosync-2.4.5-new/exec/ipc_glue.c 2019-08-13 13:54:38.187443967 +0800
@@ -272,7 +272,7 @@
struct cs_ipcs_conn_context *context;
char proc_name[32];
struct qb_ipcs_connection_stats stats;
- int32_t size = sizeof(struct cs_ipcs_conn_context);
+ size_t size = sizeof(struct cs_ipcs_conn_context);
char key_name[ICMAP_KEYNAME_MAXLEN];
int set_client_pid = 0;
int set_proc_name = 0;
diff -Naur corosync-2.4.5/include/corosync/coroapi.h corosync-2.4.5-new/include/corosync/coroapi.h
--- corosync-2.4.5/include/corosync/coroapi.h 2019-07-30 20:26:27.000000000 +0800
+++ corosync-2.4.5-new/include/corosync/coroapi.h 2019-08-13 13:55:26.031711198 +0800
@@ -494,7 +494,7 @@
unsigned short priority; /* Lower priority are loaded first, unloaded last.
* 0 is a special case which always loaded _and_ unloaded last
*/
- unsigned int private_data_size;
+ size_t private_data_size;
enum cs_lib_flow_control flow_control;
enum cs_lib_allow_inquorate allow_inquorate;
char *(*exec_init_fn) (struct corosync_api_v1 *);