Hello community,

here is the log from the commit of package corosync.12411 for 
openSUSE:Leap:15.1:Update checked in at 2020-04-26 18:26:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.1:Update/corosync.12411 (Old)
 and      /work/SRC/openSUSE:Leap:15.1:Update/.corosync.12411.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "corosync.12411"

Sun Apr 26 18:26:14 2020 rev:1 rq:796603 version:2.4.4

Changes:
--------
New Changes file:

--- /dev/null   2020-04-14 14:47:33.391806949 +0200
+++ 
/work/SRC/openSUSE:Leap:15.1:Update/.corosync.12411.new.2738/corosync.changes   
    2020-04-26 18:26:15.809020956 +0200
@@ -0,0 +1,1108 @@
+-------------------------------------------------------------------
+Wed Apr 22 13:56:28 UTC 2020 - XinLiang <[email protected]>
+
+- Revoke the patch bug-1163460-totemip-Add-support-for-sin6_scope_id.patch
+  Deleted: bug-1163460-totemip-Add-support-for-sin6_scope_id.patch
+
+  Reason: That path will cause problems while doing rolling upgrade, see 
bsc#1168771
+
+-------------------------------------------------------------------
+Fri Mar 20 14:53:13 UTC 2020 - XinLiang <[email protected]>
+
+- Fix bsc#1163460 Corosync does not support link-local IPv6 addresses
+  Added: bug-1163460-totemip-Add-support-for-sin6_scope_id.patch 
+
+-------------------------------------------------------------------
+Wed May  2 02:36:56 UTC 2018 - [email protected]
+
+- cpg: Inform clients about left nodes during pause(bsc#1091593)
+    Added: 0012-cpg-Inform-clients-about-left-nodes-during-pause.patch
+
+-------------------------------------------------------------------
+Thu Apr 26 06:43:54 UTC 2018 - [email protected]
+
+- NSS_NoDB_Init: the parameter is reserved, must be NULL(bsc#1090996)
+    Added: 0011-NSS_NoDB_Init-the-parameter-is-reserved-must-be-NULL.patch
+
+-------------------------------------------------------------------
+Tue Apr 17 10:19:52 UTC 2018 - [email protected]
+
+- corosync-2.4.4 is available now(bsc#1089836)
+      man:fix in corosync-qdevice.8
+      quorumtool: remove duplicated help message
+      cfg: nodeid should be unsigned int
+      coroparse: Use readdir instead of readdir_r
+      wd: fix snprintf warnings
+      Fix compile errors in qdevice on FreeBSD
+      qdevice: mv free(str) after port validation
+      Fix various typos
+      Fix typo: recomended -> recommended
+      man: support SOURCE_DATE_EPOCH
+      configure: add --with-initconfigdir option
+      Use static case blocks to determine distro flavor
+      Use RuntimeDirectory instead of tmpfiles.d
+      coroparse: Do not convert empty uid, gid to 0
+      sam: Fix snprintf compiler warnings
+      quorumtool: Use full buffer size in snprintf
+      man: Add note about qdevice parallel cmds start
+      sync: Remove unneeded determine sync code
+      sync: Call sync_init of all services at once
+      corosync.conf: publicize nodelist.node.name
+      totemudp[u]: Drop truncated packets on receive
+      logging: Make blackbox configurable
+      logging: Close before and open blackbox after fork
+      init: Quote subshell result properly
+      blackbox: Quote subshell result properly
+      qdevice: quote certutils scripts properly
+      sam_test_agent: Remove unused assignment
+      qdevice: Fix NULL pointer dereference
+      quorumtool: Don't set our_flags without v_handle
+      qdevice: Nodelist is set into string not array
+      qdevice: Check if user_data can be dereferenced
+      qdevice: Add safer wrapper of strtoll
+      qdevice: Replace strtol by strtonum
+      qnetd: Replace strtol by strtonum
+      main: Set errno before calling of strtol
+      totemcrypto: Implement bad crypto header guess
+      cpg: Use list_del instead of qb_list_del
+      totemcrypto: Check length of the packet
+      totemsrp: Implement sanity checks of received msgs
+      totemsrp: Check join and leave msg length
+      totemudp: Check lenght of message to sent
+      qdevice msgio: Fix reading of msg longer than i32
+      logsys: Avoid redundant callsite section checking
+      man: corosync-qdevice: fix formatting vs. punctuation
+      man: corosync-qdevice: some more stylistics
+      man: fix cpg_mcast_joined.3.in
+      libcpg: Fix issue with partial big packet assembly
+      totempg: Fix fragmentation segfault
+      totempg: use iovec[i].iov_len instead of copy_len
+      totempg: Fix corrupted messages
+      cpg: Handle fragmented message sending interrupt
+      corosync.aug: Add missing options
+      systemd: Delete unnecessary soft_margin
+
+    Added:
+        corosync-2.4.4.tar.gz
+        0010-qdevice-net-instance.c-optarg-should-be-str.patch
+    Deleted:
+        0007-sync-Call-sync_init-of-all-services-at-once.patch
+        0008-wd-fix-snprintf-warnings.patch
+        0009-add-config-for-corosync-qnetd.patch
+        0010-qdevice-mv-free-str-after-port-validation.patch
+        0011-libcpg-Fix-issue-with-partial-big-packet-assembly.patch
+        0012-totemudp-u-Drop-truncated-packets-on-receive.patch
+        0013-logging-Make-blackbox-configurable.patch
+        0014-logging-Close-before-and-open-blackbox-after-fork.patch
+        0015-coverity-fixes.patch
+        0018-bsc#1089346-corosync-Integer-overflow-in-totemcrypto.patch
+        corosync-2.4.3.tar.gz
+    Renamed:
+        0009-add-config-for-corosync-qnetd.patch -> 
0007-add-config-for-corosync-qnetd.patch
+        0016-bsc#1083561-upgrade-from-1-x-y.patch -> 
0008-bsc#1083561-upgrade-from-1-x-y.patch
+        0017-bsc#1088619-add-version.patch -> 
0009-bsc#1088619-add-version.patch
+
+-------------------------------------------------------------------
+Fri Apr 13 05:17:10 UTC 2018 - [email protected]
+
+-  (CVE-2018-1084) VUL-0: CVE-2018-1084: corosync: Integer overflow in 
totemcrypto(bsc#1089346)
+    Added: 0018-bsc#1089346-corosync-Integer-overflow-in-totemcrypto.patch
+    
+-------------------------------------------------------------------
+Tue Apr 10 02:46:08 UTC 2018 - [email protected]
+
+- UNKNOWN version in corosync pkg-config(bsc#1088619)
+    Added: 0017-bsc#1088619-add-version.patch
+
+-------------------------------------------------------------------
+Thu Mar  8 06:19:09 UTC 2018 - [email protected]
+
+- [Build 489.1] Corosync is not working after upgrade from sle11sp4-ha to 
sle15-ha(bsc#1083561) 
+    Added: 0016-bsc#1083561-upgrade-from-1-x-y.patch
+
+-------------------------------------------------------------------
+Mon Mar  5 08:24:30 UTC 2018 - [email protected]
+
+- some coverity fixes for corosync on upstream(bsc#1083895)
+    Added: 0015-coverity-fixes.patch
+
+-------------------------------------------------------------------
+Wed Jan 31 05:59:06 UTC 2018 - [email protected]
+
+- corosync exposes itself for a self-crash under rare circumstance(bsc#1078412)
+    Added: 0013-logging-Make-blackbox-configurable.patch
+           0014-logging-Close-before-and-open-blackbox-after-fork.patch
+
+    Modified: remove unncessary git commit messages
+           0001-coroapi-Use-size_t-for-private_data_size.patch
+           0002-fix-ifdown-udp.patch
+           0005-do-not-convert-empty-uid-gid-to-0.patch
+           0008-wd-fix-snprintf-warnings.patch
+           0010-qdevice-mv-free-str-after-port-validation.patch
+           0011-libcpg-Fix-issue-with-partial-big-packet-assembly.patch
+           0012-totemudp-u-Drop-truncated-packets-on-receive.patch
+
+-------------------------------------------------------------------
+Wed Jan 10 02:36:24 UTC 2018 - [email protected]
+
+- totemudp[u]: Drop truncated packets on receive(bsc#1075300)
+    Added: 0012-totemudp-u-Drop-truncated-packets-on-receive.patch
+
+-------------------------------------------------------------------
+Thu Jan  4 04:36:41 UTC 2018 - [email protected]
+
+- issue with partial packets assembly when multiple nodes are sending big 
packets(bsc#1074929) 
+    Added: 0011-libcpg-Fix-issue-with-partial-big-packet-assembly.patch
+
+-------------------------------------------------------------------
+Tue Jan  2 06:15:29 UTC 2018 - [email protected]
+
+- qdevice failed to run(bsc#1074276)
+    Added: 0010-qdevice-mv-free-str-after-port-validation.patch
+
+-------------------------------------------------------------------
+Wed Dec 27 05:49:39 UTC 2017 - [email protected]
+
+- add support for corosync-qdevice in yast2-cluster and bootstrap(bsc#1070961)
+    Added: 0009-add-config-for-corosync-qnetd.patch
+
+-------------------------------------------------------------------
+Tue Dec  5 06:13:13 UTC 2017 - [email protected]
+
+- wd: gcc shows snprintf warnings(bsc#1071187)  
+    Added: 0008-wd-fix-snprintf-warnings.patch
+
+-------------------------------------------------------------------
+Thu Nov 23 13:48:33 UTC 2017 - [email protected]
+
+- Replace references to /var/adm/fillup-templates with new 
+  %_fillupdir macro (boo#1069468)
+
+-------------------------------------------------------------------
+Fri Nov 17 02:54:23 UTC 2017 - [email protected]
+
+- corosync race condition when node leaves immediately after 
joining(bsc#1067958)
+    Added: 0007-sync-Call-sync_init-of-all-services-at-once.patch
+
+-------------------------------------------------------------------
+Thu Nov  9 03:06:36 UTC 2017 - [email protected]
+
+- gcc: snprintf gives warning: ā€˜%s’ directive output may be truncated writing
+       8 bytes into a region of size between 1 and 255(bsc#1066090)
+    Added: 0006-Fix-compile-warnings-with-GCC-7.2.1.patch
+
+-------------------------------------------------------------------
+Mon Nov  6 09:14:55 UTC 2017 - [email protected]
+
+- coroparse: uidgid with empty uid or gid results into add uid 0(bsc#1066585) 
++++ 911 more lines (skipped)
++++ between /dev/null
++++ and 
/work/SRC/openSUSE:Leap:15.1:Update/.corosync.12411.new.2738/corosync.changes

New:
----
  0001-coroapi-Use-size_t-for-private_data_size.patch
  0002-fix-ifdown-udp.patch
  0003-fix-tmpfiles-create.patch
  0004-mark-corosync-as-a-static-service.patch
  0005-do-not-convert-empty-uid-gid-to-0.patch
  0006-Fix-compile-warnings-with-GCC-7.2.1.patch
  0007-add-config-for-corosync-qnetd.patch
  0008-bsc#1083561-upgrade-from-1-x-y.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
  baselibs.conf
  bnc#872651-stop-cluster.patch
  bnc#882449-corosync-conf-example.patch
  bsc#1001164-corosync.conf-example.patch
  corosync-2.3.4-fix-bashisms.patch
  corosync-2.4.4.tar.gz
  corosync-init-lockfile-path-error.patch
  corosync-start-stop-level.patch
  corosync.changes
  corosync.spec
  disable-build-html-docs.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ corosync.spec ++++++
++++ 700 lines (skipped)

++++++ 0001-coroapi-Use-size_t-for-private_data_size.patch ++++++
diff --git a/exec/ipc_glue.c b/exec/ipc_glue.c
index d0a25d98..8b34d495 100644
--- a/exec/ipc_glue.c
+++ b/exec/ipc_glue.c
@@ -272,7 +272,7 @@ static void cs_ipcs_connection_created(qb_ipcs_connection_t 
*c)
        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 --git a/include/corosync/coroapi.h b/include/corosync/coroapi.h
index ff02a54f..3a36f255 100644
--- a/include/corosync/coroapi.h
+++ b/include/corosync/coroapi.h
@@ -494,7 +494,7 @@ struct corosync_service_engine {
        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 *);
-- 
2.12.0

++++++ 0002-fix-ifdown-udp.patch ++++++
>From ec2dfbec877fee166b31493e2dba41a850380608 Mon Sep 17 00:00:00 2001
From: Bin Liu <[email protected]>
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

++++++ 0003-fix-tmpfiles-create.patch ++++++
--- corosync-2.4.2.orig/tools/corosync-notifyd.sysconfig.example    2016-11-08 
00:39:12.000000000 +0800
+++ corosync-2.4.2/tools/corosync-notifyd.sysconfig.example 2017-08-16 
11:41:00.485913615 +0800
@@ -6,5 +6,4 @@
 #
 
 # Send DBUS signals on all events (for SNMP traps, use -s)
-OPTIONS="-d"
-
+# OPTIONS="-d"
++++++ 0004-mark-corosync-as-a-static-service.patch ++++++
>From f1c6610de162a1bcf4bedab28398ab3f0ac6bb9d Mon Sep 17 00:00:00 2001
From: Bin Liu <[email protected]>
Date: Tue, 17 Apr 2018 17:00:28 +0800
Subject: [PATCH] mark corosync as a static service

---
 init/corosync.service.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/corosync.service.in b/init/corosync.service.in
index 7733a98..e6c1805 100644
--- a/init/corosync.service.in
+++ b/init/corosync.service.in
@@ -23,4 +23,4 @@ Type=forking
 #ExecStartPre=/sbin/modprobe softdog
 
 [Install]
-WantedBy=multi-user.target
+#WantedBy=multi-user.target
-- 
2.13.6

++++++ 0005-do-not-convert-empty-uid-gid-to-0.patch ++++++
>From 31d931be66ef9ebf0aeb8e1dffa33e3280bfe732 Mon Sep 17 00:00:00 2001
From: Bin Liu <[email protected]>
Date: Tue, 17 Apr 2018 17:06:20 +0800
Subject: [PATCH] do not convert empty uid gid to 0

---
 exec/coroparse.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/exec/coroparse.c b/exec/coroparse.c
index 96bb83a..da82d54 100644
--- a/exec/coroparse.c
+++ b/exec/coroparse.c
@@ -139,6 +139,12 @@ static int uid_determine (const char *req_user)
        long int id;
        char *ep;
 
+       if(*req_user == '\0') {
+               sprintf (error_string_response,
+                       "The user can not be empty, please read the 
documentation.");
+               return (-1);
+       }
+
        id = strtol(req_user, &ep, 10);
        if (*req_user != '\0' && *ep == '\0' && id >= 0 && id <= UINT_MAX) {
                return (id);
@@ -193,6 +199,12 @@ static int gid_determine (const char *req_group)
        long int id;
        char *ep;
 
+       if(*req_group == '\0') {
+               sprintf (error_string_response,
+                       "The group can not be empty, please read the 
documentation.");
+               return (-1);
+       }
+
        id = strtol(req_group, &ep, 10);
        if (*req_group != '\0' && *ep == '\0' && id >= 0 && id <= UINT_MAX) {
                return (id);
-- 
2.13.6

++++++ 0006-Fix-compile-warnings-with-GCC-7.2.1.patch ++++++
//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);
-                       snprintf (log_pt->log, LOG_STR_SIZE, "%s,%u,%u,left",
-                               groupName->value, 
left_list[i].nodeid,left_list[i].pid);
+                       assert(snprintf (log_pt->log, LOG_STR_SIZE, 
"%s,%u,%u,left",
+                               groupName->value, 
left_list[i].nodeid,left_list[i].pid) < LOG_STR_SIZE);
                        list_add_tail(&log_pt->list, &config_chg_log_head);
                        qb_log (LOG_INFO, "cpg event %s", log_pt->log);
                }
@@ -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);
-                       snprintf (log_pt->log, LOG_STR_SIZE, "%s,%u,%u,join",
-                               groupName->value, 
joined_list[i].nodeid,joined_list[i].pid);
+                       assert(snprintf (log_pt->log, LOG_STR_SIZE, 
"%s,%u,%u,join",
+                               groupName->value, 
joined_list[i].nodeid,joined_list[i].pid) < LOG_STR_SIZE);
                        list_add_tail (&log_pt->list, &config_chg_log_head);
                        qb_log (LOG_INFO, "cpg event %s", log_pt->log);
                }
-- 
2.13.6

++++++ 0007-add-config-for-corosync-qnetd.patch ++++++
--- corosync-2.4.3.orig/init/corosync-qnetd.sysconfig.example    2017-09-21 
23:14:59.000000000 +0800
+++ corosync-2.4.3/init/corosync-qnetd.sysconfig.example    2017-12-27 
13:39:01.024262758 +0800
@@ -3,7 +3,7 @@
 # COROSYNC_QNETD_OPTIONS specifies options passed to corosync-qnetd command
 # (default is no options).
 # See "man corosync-qnetd" for detailed descriptions of the options.
-COROSYNC_QNETD_OPTIONS=""
+COROSYNC_QNETD_OPTIONS="-4 -l 0.0.0.0 -p 5403 -s off"
 
 # COROSYNC_QNETD_RUNAS specifies user under which qnetd daemon should be 
running
 # (not set or empty is default and means "user who executes init script")
++++++ 0008-bsc#1083561-upgrade-from-1-x-y.patch ++++++
>From 374895340ebaa41bee26a2c2272bc9e3906ede22 Mon Sep 17 00:00:00 2001
From: Bin Liu <[email protected]>
Date: Thu, 8 Mar 2018 13:34:54 +0800
Subject: [PATCH] add init-upgrade.patch

---
 init/upgrade.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 init/upgrade.sh

diff --git a/init/upgrade.sh b/init/upgrade.sh
new file mode 100644
index 00000000..774aece9
--- /dev/null
+++ b/init/upgrade.sh
@@ -0,0 +1,18 @@
+#! /bin/bash
+CONFIG_FILE=/etc/corosync/corosync.conf
+CONFIG_FILE_OLD=/etc/corosync/corosync.conf.old
+
+if [ -f $CONFIG_FILE ]; then
+    cp $CONFIG_FILE $CONFIG_FILE_OLD
+    #lots of operations
+    sed -i "/amf\ *{/,/\ *}/d" $CONFIG_FILE && \
+    sed -i "/aisexec\ *{/,/\ *}/d" $CONFIG_FILE && \
+    sed -i "/service\ *{/,/\ *}/d" $CONFIG_FILE && \
+    #sed -i "/token:/,/max_messages:/d" $CONFIG_FILE && \
+    sed -i "s/AMF/QUORUM/g" $CONFIG_FILE
+    if [ $? -ne 0 ]; then
+        cp $CONFIG_FILE_OLD $CONFIG_FILE
+    else
+        rm $CONFIG_FILE_OLD
+    fi
+fi
-- 
2.13.6

++++++ 0009-bsc#1088619-add-version.patch ++++++
--- /dev/null 2018-04-10 08:30:37.121221591 +0800
+++ corosync-2.4.3/.tarball-version 2018-04-10 18:30:37.907779088 +0800
@@ -0,0 +1 @@
+2.4.4
++++++ 0010-qdevice-net-instance.c-optarg-should-be-str.patch ++++++
>From fab3ef5e63e1ad61d03b1230e8f900bf1279cc81 Mon Sep 17 00:00:00 2001
From: Bin Liu <[email protected]>
Date: Thu, 19 Apr 2018 16:52:27 +0800
Subject: [PATCH] qdevice-net-instance.c: optarg should be str

---
 qdevices/qdevice-net-instance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qdevices/qdevice-net-instance.c b/qdevices/qdevice-net-instance.c
index 87cf3ee0..a3231cd5 100644
--- a/qdevices/qdevice-net-instance.c
+++ b/qdevices/qdevice-net-instance.c
@@ -273,7 +273,7 @@ qdevice_net_instance_init_from_cmap(struct qdevice_instance 
*instance)
        host_addr = str;
 
        if (cmap_get_string(cmap_handle, "quorum.device.net.port", &str) == 
CS_OK) {
-               if (utils_strtonum(optarg, 1, UINT16_MAX, &lli) == -1) {
+               if (utils_strtonum(str, 1, UINT16_MAX, &lli) == -1) {
                        qdevice_log(LOG_ERR, "quorum.device.net.port must be in 
range 1-%u", UINT16_MAX);
                        free(str);
                        goto error_free_host_addr;
-- 
2.13.6

++++++ 0011-NSS_NoDB_Init-the-parameter-is-reserved-must-be-NULL.patch ++++++
>From 4f6a22ae78055da7b89e237ea6bf6449610a1b90 Mon Sep 17 00:00:00 2001
From: Bin Liu <[email protected]>
Date: Thu, 26 Apr 2018 14:30:31 +0800
Subject: [PATCH] NSS_NoDB_Init: the parameter is reserved, must be NULL

---
 cts/agents/cpg_test_agent.c | 2 +-
 exec/totemcrypto.c          | 2 +-
 test/cpgverify.c            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cts/agents/cpg_test_agent.c b/cts/agents/cpg_test_agent.c
index 0837c69c..9ac9b4c2 100644
--- a/cts/agents/cpg_test_agent.c
+++ b/cts/agents/cpg_test_agent.c
@@ -788,7 +788,7 @@ main(int argc, char *argv[])
        list_init (&msg_log_head);
        list_init (&config_chg_log_head);
 
-       if (NSS_NoDB_Init(".") != SECSuccess) {
+       if (NSS_NoDB_Init(NULL) != SECSuccess) {
                qb_log(LOG_ERR, "Couldn't initialize nss");
                exit (0);
        }
diff --git a/exec/totemcrypto.c b/exec/totemcrypto.c
index 64246c98..b35683f9 100644
--- a/exec/totemcrypto.c
+++ b/exec/totemcrypto.c
@@ -670,7 +670,7 @@ static int init_nss_db(struct crypto_instance *instance)
                return 0;
        }
 
-       if (NSS_NoDB_Init(".") != SECSuccess) {
+       if (NSS_NoDB_Init(NULL) != SECSuccess) {
                log_printf(instance->log_level_security, "NSS DB initialization 
failed (err %d)",
                           PR_GetError());
                return -1;
diff --git a/test/cpgverify.c b/test/cpgverify.c
index 928eff33..0462a34d 100644
--- a/test/cpgverify.c
+++ b/test/cpgverify.c
@@ -137,7 +137,7 @@ int main (int argc, char *argv[])
                exit (0);
        }
 
-       if (NSS_NoDB_Init(".") != SECSuccess) {
+       if (NSS_NoDB_Init(NULL) != SECSuccess) {
                printf ("Couldn't initialize nss\n");
                exit (0);
        }
-- 
2.13.6

++++++ 0012-cpg-Inform-clients-about-left-nodes-during-pause.patch ++++++
Subject: [PATCH] cpg: Inform clients about left nodes during pause

Patch tries to fix incorrect behaviour during following test-case:
- 3 nodes
- Node 1 is paused
- Node 2 and 3 detects node 1 as failed and informs CPG clients
- Node 1 is unpaused
- Node 1 clients are informed about new membership, but not about Node 1
  being paused, so from Node 1 point-of-view, Node 2 and 3 failure

Solution is to:
- Remove downlist master choose and always choose local node downlist.
  For Node 1 in example above, downlist contains Node 2 and 3.
- Keep code which informs clients about left nodes
- Use joinlist as a authoritative source of nodes/clients which exists
  in membership

---
 exec/cpg.c | 164 +++++--------------------------------------------------------
 1 file changed, 11 insertions(+), 153 deletions(-)

diff --git a/exec/cpg.c b/exec/cpg.c
index 78ac1e9e..b851cba3 100644
--- a/exec/cpg.c
+++ b/exec/cpg.c
@@ -139,13 +139,6 @@ enum cpg_sync_state {
        CPGSYNC_JOINLIST
 };
 
-enum cpg_downlist_state_e {
-       CPG_DOWNLIST_NONE,
-       CPG_DOWNLIST_WAITING_FOR_MESSAGES,
-       CPG_DOWNLIST_APPLYING,
-};
-static enum cpg_downlist_state_e downlist_state;
-static struct list_head downlist_messages_head;
 static struct list_head joinlist_messages_head;
 
 struct cpg_pd {
@@ -295,9 +288,7 @@ static int cpg_exec_send_downlist(void);
 
 static int cpg_exec_send_joinlist(void);
 
-static void downlist_messages_delete (void);
-
-static void downlist_master_choose_and_send (void);
+static void downlist_inform_clients (void);
 
 static void joinlist_inform_clients (void);
 
@@ -499,14 +490,6 @@ struct req_exec_cpg_downlist {
        mar_uint32_t nodeids[PROCESSOR_COUNT_MAX]  __attribute__((aligned(8)));
 };
 
-struct downlist_msg {
-       mar_uint32_t sender_nodeid;
-       mar_uint32_t old_members __attribute__((aligned(8)));
-       mar_uint32_t left_nodes __attribute__((aligned(8)));
-       mar_uint32_t nodeids[PROCESSOR_COUNT_MAX]  __attribute__((aligned(8)));
-       struct list_head list;
-};
-
 struct joinlist_msg {
        mar_uint32_t sender_nodeid;
        uint32_t pid;
@@ -566,8 +549,6 @@ static void cpg_sync_init (
        last_sync_ring_id.nodeid = ring_id->rep.nodeid;
        last_sync_ring_id.seq = ring_id->seq;
 
-       downlist_state = CPG_DOWNLIST_WAITING_FOR_MESSAGES;
-
        entries = 0;
        /*
         * Determine list of nodeids for downlist message
@@ -611,14 +592,10 @@ static void cpg_sync_activate (void)
                my_member_list_entries * sizeof (unsigned int));
        my_old_member_list_entries = my_member_list_entries;
 
-       if (downlist_state == CPG_DOWNLIST_WAITING_FOR_MESSAGES) {
-               downlist_master_choose_and_send ();
-       }
+       downlist_inform_clients ();
 
        joinlist_inform_clients ();
 
-       downlist_messages_delete ();
-       downlist_state = CPG_DOWNLIST_NONE;
        joinlist_messages_delete ();
 
        notify_lib_totem_membership (NULL, my_member_list_entries, 
my_member_list);
@@ -626,8 +603,7 @@ static void cpg_sync_activate (void)
 
 static void cpg_sync_abort (void)
 {
-       downlist_state = CPG_DOWNLIST_NONE;
-       downlist_messages_delete ();
+
        joinlist_messages_delete ();
 }
 
@@ -800,76 +776,17 @@ static int notify_lib_joinlist(
        return CS_OK;
 }
 
-static void downlist_log(const char *msg, struct downlist_msg* dl)
+static void downlist_log(const char *msg, struct req_exec_cpg_downlist *dl)
 {
        log_printf (LOG_DEBUG,
-                   "%s: sender %s; members(old:%d left:%d)",
+                   "%s: members(old:%d left:%d)",
                    msg,
-                   api->totem_ifaces_print(dl->sender_nodeid),
                    dl->old_members,
                    dl->left_nodes);
 }
 
-static struct downlist_msg* downlist_master_choose (void)
+static void downlist_inform_clients (void)
 {
-       struct downlist_msg *cmp;
-       struct downlist_msg *best = NULL;
-       struct list_head *iter;
-       uint32_t cmp_members;
-       uint32_t best_members;
-       uint32_t i;
-       int ignore_msg;
-
-       for (iter = downlist_messages_head.next;
-               iter != &downlist_messages_head;
-               iter = iter->next) {
-
-               cmp = list_entry(iter, struct downlist_msg, list);
-               downlist_log("comparing", cmp);
-
-               ignore_msg = 0;
-               for (i = 0; i < cmp->left_nodes; i++) {
-                       if (cmp->nodeids[i] == api->totem_nodeid_get()) {
-                               log_printf (LOG_DEBUG, "Ignoring this entry 
because I'm in the left list\n");
-
-                               ignore_msg = 1;
-                               break;
-                       }
-               }
-
-               if (ignore_msg) {
-                       continue ;
-               }
-
-               if (best == NULL) {
-                       best = cmp;
-                       continue;
-               }
-
-               best_members = best->old_members - best->left_nodes;
-               cmp_members = cmp->old_members - cmp->left_nodes;
-
-               if (cmp_members > best_members) {
-                       best = cmp;
-               } else if (cmp_members == best_members) {
-                       if (cmp->old_members > best->old_members) {
-                               best = cmp;
-                       } else if (cmp->old_members == best->old_members) {
-                               if (cmp->sender_nodeid < best->sender_nodeid) {
-                                       best = cmp;
-                               }
-                       }
-               }
-       }
-
-       assert (best != NULL);
-
-       return best;
-}
-
-static void downlist_master_choose_and_send (void)
-{
-       struct downlist_msg *stored_msg;
        struct list_head *iter;
        struct process_info *left_pi;
        qb_map_t *group_map;
@@ -884,14 +801,7 @@ static void downlist_master_choose_and_send (void)
        qb_map_iter_t *miter;
        int i, size;
 
-       downlist_state = CPG_DOWNLIST_APPLYING;
-
-       stored_msg = downlist_master_choose ();
-       if (!stored_msg) {
-               log_printf (LOGSYS_LEVEL_DEBUG, "NO chosen downlist");
-               return;
-       }
-       downlist_log("chosen downlist", stored_msg);
+       downlist_log("my downlist", &g_req_exec_cpg_downlist);
 
        group_map = qb_skiplist_create();
 
@@ -905,9 +815,9 @@ static void downlist_master_choose_and_send (void)
                iter = iter->next;
 
                left_pi = NULL;
-               for (i = 0; i < stored_msg->left_nodes; i++) {
+               for (i = 0; i < g_req_exec_cpg_downlist.left_nodes; i++) {
 
-                       if (pi->nodeid == stored_msg->nodeids[i]) {
+                       if (pi->nodeid == g_req_exec_cpg_downlist.nodeids[i]) {
                                left_pi = pi;
                                break;
                        }
@@ -1039,23 +949,6 @@ static void joinlist_inform_clients (void)
        joinlist_remove_zombie_pi_entries ();
 }
 
-static void downlist_messages_delete (void)
-{
-       struct downlist_msg *stored_msg;
-       struct list_head *iter, *iter_next;
-
-       for (iter = downlist_messages_head.next;
-               iter != &downlist_messages_head;
-               iter = iter_next) {
-
-               iter_next = iter->next;
-
-               stored_msg = list_entry(iter, struct downlist_msg, list);
-               list_del (&stored_msg->list);
-               free (stored_msg);
-       }
-}
-
 static void joinlist_messages_delete (void)
 {
        struct joinlist_msg *stored_msg;
@@ -1076,7 +969,6 @@ static void joinlist_messages_delete (void)
 
 static char *cpg_exec_init_fn (struct corosync_api_v1 *corosync_api)
 {
-       list_init (&downlist_messages_head);
        list_init (&joinlist_messages_head);
        api = corosync_api;
        return (NULL);
@@ -1338,43 +1230,9 @@ static void message_handler_req_exec_cpg_downlist(
        unsigned int nodeid)
 {
        const struct req_exec_cpg_downlist *req_exec_cpg_downlist = message;
-       int i;
-       struct list_head *iter;
-       struct downlist_msg *stored_msg;
-       int found;
-
-       if (downlist_state != CPG_DOWNLIST_WAITING_FOR_MESSAGES) {
-               log_printf (LOGSYS_LEVEL_WARNING, "downlist left_list: %d 
received in state %d",
-                       req_exec_cpg_downlist->left_nodes, downlist_state);
-               return;
-       }
-
-       stored_msg = malloc (sizeof (struct downlist_msg));
-       stored_msg->sender_nodeid = nodeid;
-       stored_msg->old_members = req_exec_cpg_downlist->old_members;
-       stored_msg->left_nodes = req_exec_cpg_downlist->left_nodes;
-       memcpy (stored_msg->nodeids, req_exec_cpg_downlist->nodeids,
-               req_exec_cpg_downlist->left_nodes * sizeof (mar_uint32_t));
-       list_init (&stored_msg->list);
-       list_add (&stored_msg->list, &downlist_messages_head);
-
-       for (i = 0; i < my_member_list_entries; i++) {
-               found = 0;
-               for (iter = downlist_messages_head.next;
-                       iter != &downlist_messages_head;
-                       iter = iter->next) {
-
-                       stored_msg = list_entry(iter, struct downlist_msg, 
list);
-                       if (my_member_list[i] == stored_msg->sender_nodeid) {
-                               found = 1;
-                       }
-               }
-               if (!found) {
-                       return;
-               }
-       }
 
-       downlist_master_choose_and_send ();
+       log_printf (LOGSYS_LEVEL_WARNING, "downlist left_list: %d received",
+                       req_exec_cpg_downlist->left_nodes);
 }
 
 
-- 
2.13.6

++++++ baselibs.conf ++++++
libcfg6
libcmap4
libcorosync_common4
        obsoletes "libcorosync4-<targettype> < <version>"
        provides "libcorosync4-<targettype> = <version>"
libcpg4
libquorum5
libsam4
libtotem_pg5
libvotequorum8
++++++ bnc#872651-stop-cluster.patch ++++++
--- corosync-2.4.3.orig/init/corosync.service.in        2015-07-21 
11:09:11.911660803 +0800
+++ corosync-2.4.3/init/corosync.service.in     2015-07-21 13:25:08.239783189 
+0800
@@ -3,6 +3,7 @@
 ConditionKernelCommandLine=!nocluster
 Requires=network-online.target
 After=network-online.target
+StopWhenUnneeded=yes
 
 [Service]
 ExecStart=@INITWRAPPERSDIR@/corosync start
++++++ bnc#882449-corosync-conf-example.patch ++++++
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
 }
++++++ bsc#1001164-corosync.conf-example.patch ++++++
--- corosync-2.3.3.orig/conf/corosync.conf.example      2016-09-27 
12:18:13.559737049 +0800
+++ corosync-2.3.3/conf/corosync.conf.example   2016-09-27 14:29:41.952519958 
+0800
@@ -9,6 +9,26 @@
        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
+       
+       # 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)
        # you would set it to 'yes', the new option 'new' means wiping 
        # off the highest bit in network order to avoid possible nodeid
++++++ corosync-2.3.4-fix-bashisms.patch ++++++
--- 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
++++++ corosync-init-lockfile-path-error.patch ++++++
--- corosync-2.4.3.orig/init/corosync.in        2017-09-21 23:14:59.000000000 
+0800
+++ corosync-2.4.3/init/corosync.in     2017-10-23 12:09:54.209149758 +0800
@@ -29,6 +29,7 @@
 success()
 {
        echo -ne "[  OK  ]\r"
+       rtrn=0
 }
 
 failure()
@@ -109,6 +110,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 $prog > /dev/null 2>&1; then
                success
++++++ corosync-start-stop-level.patch ++++++
>From b827e7f33fee652a79713d302aa9be56b456fa7d Mon Sep 17 00:00:00 2001
From: Bin Liu <[email protected]>
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

++++++ disable-build-html-docs.patch ++++++
--- corosync-2.4.2.orig/configure.ac    2016-11-08 00:39:12.000000000 +0800
+++ corosync-2.4.2/configure.ac 2016-12-06 16:43:05.586962439 +0800
@@ -726,7 +726,8 @@
 AM_CONDITIONAL(AUGTOOL, test -n "${AUGTOOL}")
 AC_SUBST([NSS_LDFLAGS])
 
-AM_CONDITIONAL(BUILD_HTML_DOCS, test -n "${GROFF}")
+AM_CONDITIONAL(BUILD_HTML_DOCS, false)
+#AM_CONDITIONAL(BUILD_HTML_DOCS, test -n "${GROFF}")
 
 AC_SUBST([LINT_FLAGS])
 

Reply via email to