diff -Nru corosync-3.1.2/ChangeLog corosync-3.1.6/ChangeLog --- corosync-3.1.2/ChangeLog 2021-04-06 10:03:45.000000000 +0000 +++ corosync-3.1.6/ChangeLog 2021-11-15 10:13:18.000000000 +0000 @@ -1,3 +1,355 @@ +2021-11-10 Jan Friesse + + build: Add explicit dependency for used libraries + Don't rely on implicit symbol finding (cs_strerror being most prominent + example) but rather use explicit one. + + This makes current debian experimental happy (compile source) + + Reviewed-by: Fabio M. Di Nitto + +2021-11-03 Jan Friesse + + totemsrp: Switch totempg buffers at the right time + Commit 92e0f9c7bb9b4b6a0da8d64bdf3b2e47ae55b1cc added switching of + totempg buffers in sync phase. But because buffers got switch too early + there was a problem when delivering recovered messages (messages got + corrupted and/or lost). Solution is to switch buffers after recovered + messages got delivered. + + I think it is worth to describe complete history with reproducers so it + doesn't get lost. + + It all started with 402638929e5045ef520a7339696c687fbed0b31b (more info + about original problem is described in + https://bugzilla.redhat.com/show_bug.cgi?id=820821). This patch + solves problem which is way to be reproduced with following reproducer: + - 2 nodes + - Both nodes running corosync and testcpg + - Pause node 1 (SIGSTOP of corosync) + - On node 1, send some messages by testcpg + (it's not answering but this doesn't matter). Simply hit ENTER key + few times is enough) + - Wait till node 2 detects that node 1 left + - Unpause node 1 (SIGCONT of corosync) + + and on node 1 newly mcasted cpg messages got sent before sync barrier, + so node 2 logs "Unknown node -> we will not deliver message". + + Solution was to add switch of totemsrp new messages buffer. + + This patch was not enough so new one + (92e0f9c7bb9b4b6a0da8d64bdf3b2e47ae55b1cc) was created. Reproducer of + problem was similar, just cpgverify was used instead of testcpg. + Occasionally when node 1 was unpaused it hang in sync phase because + there was a partial message in totempg buffers. New sync message had + different frag cont so it was thrown away and never delivered. + + After many years problem was found which is solved by this patch + (original issue describe in + https://github.com/corosync/corosync/issues/660). + Reproducer is more complex: + - 2 nodes + - Node 1 is rate-limited (used script on the hypervisor side): + ``` + iface=tapXXXX + # ~0.1MB/s in bit/s + rate=838856 + # 1mb/s + burst=1048576 + tc qdisc add dev $iface root handle 1: htb default 1 + tc class add dev $iface parent 1: classid 1:1 htb rate ${rate}bps \ + burst ${burst}b + tc qdisc add dev $iface handle ffff: ingress + tc filter add dev $iface parent ffff: prio 50 basic police rate \ + ${rate}bps burst ${burst}b mtu 64kb "drop" + ``` + - Node 2 is running corosync and cpgverify + - Node 1 keeps restarting of corosync and running cpgverify in cycle + - Console 1: while true; do corosync; sleep 20; \ + kill $(pidof corosync); sleep 20; done + - Console 2: while true; do ./cpgverify;done + + And from time to time (reproduced usually in less than 5 minutes) + cpgverify reports corrupted message. + + Reviewed-by: Fabio M. Di Nitto + +2021-10-25 Christine Caulfield + + cpghum: Allow to continue if corosync is restarted + Reviewed-by: Jan Friesse + +2021-10-18 miharahiro + + man: Fix consensus timeout + The consensus timeout is 1.2 * token_timeout, + which has been changeg from 1000 to 3000, so change also consensus + timeout. + + Reviewed-by: Christine Caulfield + Reviewed-by: Jan Friesse + +2021-09-13 Jan Friesse + + logsys: Unlock config mutex on error + Thanks Ryan Cai for reporting the problem. + + Reviewed-by: Christine Caulfield + +2021-08-20 Jan Friesse + + totem: Add cancel_hold_on_retransmit config option + Previously, existence of retransmit messages canceled holding + of token (and never allowed representative to enter token hold + state). + + This makes token rotating maximum speed and keeps processor + resending messages over and over again - overloading network + and reducing chance to successfully deliver the messages. + + Also there were reports of various Antivirus / IPS / IDS which slows + down delivery of packets with certain sizes (packets bigger than token) + what make Corosync retransmit messages over and over again. + + Proposed solution is to allow representative to enter token hold + state when there are only retransmit messages. This allows network to + handle overload and/or gives Antivirus/IPS/IDS enough time scan and + deliver packets without corosync entering "FAILED TO RECEIVE" state and + adding more load to network. + + Reviewed-by: Christine Caulfield + +2021-08-04 Jan Friesse + + totemconfig: Knet nodeid must be < 65536 + Knet limits maximum node id to 16-bit type. This was not ensured in + corosync and it was possible to set nodeid to value >= 65536 and + (surprisingly) most of the things were working quite well because of + overflow. corosync-cmapctl -m stats contained knet nodeid in + stats.knet. subtree, so for nodeid 65536 result was: + + Can't get value of stats.knet.node0.link0.connected. Error + CS_ERR_NOT_EXIST + + Commit implements checking of nodeid and limits it to KNET_MAX_HOST + value when knet is used. + + Reviewed-by: Christine Caulfield + + totemconfig: Ensure all knet hosts has a nodeid + Nodeid is required for knet for every node. Right now, existence of + nodeid is checked only for local for local node, so broaden the test. + + Reviewed-by: Christine Caulfield + +2021-08-02 Jan Friesse + + cfgtool: Use CS_PRI_NODE_ID for formatting nodeid + Reviewed-by: Christine Caulfield + + cfgtool: Fix brief mode display of localhost + Show 'n' also for first localhost link, so all localhost links + are marked consistently with non-brief display. + + Reviewed-by: Christine Caulfield + + cfgtool: Set nodeid indexes after sort + Needed for having correct index of localhost + + Reviewed-by: Christine Caulfield + + totemconfig: Put autogenerated nodeid back to cmap + Reviewed-by: Christine Caulfield + + cfgtool: Check existence of at least one of nodeid + Reviewed-by: Christine Caulfield + + totemconfig: Do not process totem.nodeid + totem.nodeid is relict from times when nodelist was not required and + totemsrp was sending whole membership with ip addresses. + + With Corosync 3 ip addresses are no longer sent so + it is not possible to find "next" node ip address where to send token + (because only nodeid is sent) without having information about all of + the nodes stored locally. + + When totem.nodeid was configured it was partly used and other parts + (most notably totemudpu_token_target_set) were using autogenerated + nodeid. Together it was not possible to create even single node + membership. + + Solution is to ignore totem.nodeid completely (and display warning when + it is set). + + Reviewed-by: Christine Caulfield + +2021-07-29 Christine Caulfield + + knet: Fix node status display + Currently if there is a gap in the links (eg link0 is missing) + corosync-cfgtool -s will still display the links as 0,1,2,3... + even if they are 1,2,5,6... + + Also display the KNET transport type with the link in + corosync-cfgtool -s & -n + + Reviewed-by: Jan Friesse + +2021-07-23 Jan Friesse + + main: Add support for cgroup v2 and auto mode + Support for cgroup v2 is very similar to cgroup v1 just checking (and + writing) different file. + + Because of all the problems described later with cgroup v2 new "auto" + mode (new default) is added. This mode first tries to set rr scheduling + and moves Corosync to root cgroup only if it fails. + + Testing this feature is a bit harder than with cgroup v1 so it's + probably worh noting in this commit message. + + 1. Copy some service file (I've used httpd service) and set + CPUQuota=30% in the [service] section. + 2. Check /sys/fs/cgroup/cgroup.subtree_control - there should be no + "cpu" + 3. Start modified service + 4. Check /sys/fs/cgroup/cgroup.subtree_control - there should be "cpu" + 5. Start corosync - It should be able to get rt priority + + When move_to_root_cgroup is disabled (applies only for kernels + with CONFIG_RT_GROUP_SCHED enabled), behavior differs: + - If corosync is started before modified service, so + there is no "cpu" in /sys/fs/cgroup/cgroup.subtree_control + corosync starts without problem and gets rt priority. + Starting modified service later will never add "cpu" into + /sys/fs/cgroup/cgroup.subtree_control (because corosync is holding + rt priority and it is placed in the non-root cgroup by systemd). + + - When corosync is started after modified service, so "cpu" + is in /sys/fs/cgroup/cgroup.subtree_control, corosync is not + able to get RT priority. + + It's worth noting problems when cgroup v2 is used together with systemd + logging described in corosync.conf(5) man page. + + Reviewed-by: Christine Caulfield + +2021-06-03 Christine Caulfield + + stats: fix crash when iterating over deleted keys + The libqb map API leaves 'ownership' of the data with the caller + but does its own lifetime management, so it can easily happen that + map_rm() is called and the data deleted by the caller. + But if an iterator is running over that item then the map entry + will not get removed (leaving dangling pointers) until later. + + libqb has a hack-y callback that tells the owner when it is safe to + delete the allocated memory, so we hook into that. icmap is already + using this. + + Reviewed-by: Jan Friesse + +2021-06-02 Jan Friesse + + man: Add note about single node configuration + Internally knet is using just one link for localhost so for single node + configuration knet_link_get_link_list returns only one entry. This is + propagated to `corosync-cfgtool -s`. + + Reviewed-by: Christine Caulfield + +2021-05-21 Jan Friesse + + Revert "main: Add support for cgroup v2" + This reverts commit 57e6b86b53010dd2612b0a6a4e04917673062ecf. + + We are in process of finding better solution so reverting for now. + + Revert "man: Add info about cgroup v2 behavior" + This reverts commit 9d3df5696ed6b04b379a2fe643eec1fcd5a4b10d. + + We are in process of finding better solution so reverting for now. + +2021-05-19 Jan Friesse + + man: Add info about cgroup v2 behavior + Reviewed-by: Christine Caulfield + + cfg: corosync_cfg_trackstop blocks forever + corosync_cfg_trackstop expects reply but that was never sent. Make sure + to send reply so corosync_cfg_trackstop works. + + Reviewed-by: Christine Caulfield + +2021-05-10 Jan Friesse + + main: Add support for cgroup v2 + Support for cgroup v2 is very similar to cgroup v1 just checking (and + writing) different file. + + Testing this feature is a bit harder than with cgroup v1 so it's + probably worh noting in this commit message. + + 1. Copy some service file (I've used httpd service) and set + CPUQuota=30% in the [service] section. + 2. Check /sys/fs/cgroup/cgroup.subtree_control - there should be no + "cpu" + 3. Start modified service + 4. Check /sys/fs/cgroup/cgroup.subtree_control - there should be "cpu" + 5. Start corosync - It should be able to get rt priority + + When move_to_root_cgroup is disabled, behavior differs: + - If corosync is started before modified service, so + there is no "cpu" in /sys/fs/cgroup/cgroup.subtree_control + corosync starts without problem and gets rt priority. + Starting modified service later will never add "cpu" into + /sys/fs/cgroup/cgroup.subtree_control (because corosync is holding + rt priority and it is placed in the non-root cgroup by systemd). + + - When corosync is started after modified service, so "cpu" + is in /sys/fs/cgroup/cgroup.subtree_control, corosync is not + able to get RT priority. + + Reviewed-by: Christine Caulfield + +2021-04-14 Jan Friesse + + main: Mark crypto_model key read only + ... to be in align with crypto_cypher and crypto_hash. + + Reload (corosync-cfgtool -R) works without any problem and changing of + key is not supported anyway, + + Reviewed-by: Christine Caulfield + + totemconfig: Ensure strncpy is always terminated + Reviewed-by: Christine Caulfield + + config: Properly check crypto and compress models + Use knet_get_crypto_list to find knet supported crypto models and use + them instead of hardcoded list. + + Also fix compression handling. Previously knet_compression_model + value was not checked at all and was directly passed to knet. + + Use knet_get_compress_list to find knet supported compress models and + use them to check validity of config file and for more informative + error message. + + Lastly enhance corosync version display with information + about available crypto/compression models. + + Reviewed-by: Christine Caulfield + +2021-04-07 Ferenc Wágner + + man: corosync-cfgtool.8: use proper single quotes + Apostrophe as the first character of the input line indicates a + request, so groff complained: macro 'onwire'' not defined. + + Reviewed-by: Jan Friesse + 2021-04-06 Fabio M. Di Nitto knet: pass correct handle to knet_handle_compress diff -Nru corosync-3.1.2/configure corosync-3.1.6/configure --- corosync-3.1.2/configure 2021-04-06 10:03:21.000000000 +0000 +++ corosync-3.1.6/configure 2021-11-15 10:12:52.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for corosync 3.1.2. +# Generated by GNU Autoconf 2.69 for corosync 3.1.6. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='corosync' PACKAGE_TARNAME='corosync' -PACKAGE_VERSION='3.1.2' -PACKAGE_STRING='corosync 3.1.2' +PACKAGE_VERSION='3.1.6' +PACKAGE_STRING='corosync 3.1.6' PACKAGE_BUGREPORT='users@clusterlabs.org' PACKAGE_URL='' @@ -1423,7 +1423,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures corosync 3.1.2 to adapt to many kinds of systems. +\`configure' configures corosync 3.1.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1493,7 +1493,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of corosync 3.1.2:";; + short | recursive ) echo "Configuration of corosync 3.1.6:";; esac cat <<\_ACEOF @@ -1653,7 +1653,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -corosync configure 3.1.2 +corosync configure 3.1.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2263,7 +2263,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by corosync $as_me 3.1.2, which was +It was created by corosync $as_me 3.1.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4442,7 +4442,7 @@ # Define the identity of the package. PACKAGE='corosync' - VERSION='3.1.2' + VERSION='3.1.6' cat >>confdefs.h <<_ACEOF @@ -17654,7 +17654,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by corosync $as_me 3.1.2, which was +This file was extended by corosync $as_me 3.1.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17720,7 +17720,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -corosync config.status 3.1.2 +corosync config.status 3.1.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru corosync-3.1.2/debian/changelog corosync-3.1.6/debian/changelog --- corosync-3.1.2/debian/changelog 2021-07-23 19:27:47.000000000 +0000 +++ corosync-3.1.6/debian/changelog 2022-01-12 10:58:06.000000000 +0000 @@ -1,3 +1,48 @@ +corosync (3.1.6-1ubuntu1) jammy; urgency=medium + + * Merge with Debian unstable (LP: #1946852). Remaining changes: + - d/control: corosync binary depends on libqb-dev (LP #1677684). + - d/p/Make-the-example-config-valid.patch: comment out the + node name in config file. With this, we will keep the same + behavior as we have in Bionic which is using the output of + "uname -n" as the node name (LP #1874719). + - d/p/lp1918735/0001-allow_knet_handle_fallback_default_yes.patch: + Retry knet_handle_new without privileged flag (LP #1918735). + - d/t/quorumtool: search for localhost instead of node1. + - d/t/control: add allow-stderr restriction. + + -- Miriam España Acebal Wed, 12 Jan 2022 11:58:06 +0100 + +corosync (3.1.6-1) unstable; urgency=medium + + * [1c6e48f] Make use of the execute_before_* feature of dh 12.8+ + * [e6b31ef] New upstream release (3.1.6) + * [81eed39] Refresh our patches + + -- Ferenc Wágner Mon, 22 Nov 2021 19:40:15 +0100 + +corosync (3.1.5-2) unstable; urgency=medium + + * [a836090] Revert "No need to override the default /usr/lib/systemd/system + systemd directory anymore" + This reverts commit e710e1f5bec1bcbc9d47f639701a6f2fde54346b. + dh_installsystemd apparently does not find the service files under + /usr/lib, and consequently does not insert the maintainer script + snippets necessary to start the services on installation (for example). + + -- Ferenc Wágner Fri, 01 Oct 2021 20:28:56 +0200 + +corosync (3.1.5-1) unstable; urgency=medium + + * [929fb0c] New upstream release (3.1.5) + * [56b0b8f] Remove upstreamed patches, refresh the rest + * [f231d94] Switch to Debhelper compatibility level 13 + * [65638bc] Update Standards-Version to 4.6.0 (no changes required) + * [e710e1f] No need to override the default /usr/lib/systemd/system systemd + directory anymore + + -- Ferenc Wágner Thu, 30 Sep 2021 22:38:39 +0200 + corosync (3.1.2-2ubuntu1) impish; urgency=medium * Merge with Debian unstable. Remaining changes: diff -Nru corosync-3.1.2/debian/control corosync-3.1.6/debian/control --- corosync-3.1.2/debian/control 2021-07-23 19:27:47.000000000 +0000 +++ corosync-3.1.6/debian/control 2022-01-12 10:58:06.000000000 +0000 @@ -6,9 +6,9 @@ Uploaders: Adrian Vondendriesch , Ferenc Wágner , -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Build-Depends: - debhelper-compat (= 12), + debhelper-compat (= 13), dctrl-tools, # maybe too strict, but the buster dwz failed: dwz (>= 0.13-5), diff -Nru corosync-3.1.2/debian/patches/Fix-various-typos-in-ChangeLog.patch corosync-3.1.6/debian/patches/Fix-various-typos-in-ChangeLog.patch --- corosync-3.1.2/debian/patches/Fix-various-typos-in-ChangeLog.patch 2021-07-23 19:08:14.000000000 +0000 +++ corosync-3.1.6/debian/patches/Fix-various-typos-in-ChangeLog.patch 2022-01-12 10:58:06.000000000 +0000 @@ -10,10 +10,10 @@ 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog -index dc9d199..2e87a72 100644 +index dc43cdb..2462508 100644 --- a/ChangeLog +++ b/ChangeLog -@@ -9387,7 +9387,7 @@ +@@ -9739,7 +9739,7 @@ 2012-02-07 Fabio M. Di Nitto @@ -22,7 +22,7 @@ Reviewed-by: Christine Caulfield 2012-02-07 Angus Salkeld -@@ -9572,7 +9572,7 @@ +@@ -9924,7 +9924,7 @@ Honor exec_init_fn call exec_init_fn now either returns NULL (success) or a string which indicates @@ -31,7 +31,7 @@ occurs, corosync will exit. This patch adds ykd and makes other suggestions from Fabio Di Nitto. -@@ -10936,7 +10936,7 @@ +@@ -11288,7 +11288,7 @@ start 5 nodes randomly at about same time, start 5 nodes randomly at about same time, wait 10 seconds and attempt to send a message. If message blocks @@ -40,7 +40,7 @@ cyclng the nodes and see if the TRY_AGAIN state becomes unblocked. If it doesn't the test case has failed -@@ -11327,7 +11327,7 @@ +@@ -11679,7 +11679,7 @@ is these last messages should be delivered after a transitional configuration to maintain SAFE agreement. We don't have support for SAFE atm, so it is probably safe just to throw these messages away. Without @@ -49,7 +49,7 @@ Tested-by: Tim Beale Reviewed-by: Jan Friesse -@@ -19075,7 +19075,7 @@ +@@ -19427,7 +19427,7 @@ 2007-08-11 Steven Dake @@ -58,7 +58,7 @@ git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1420 fd59a12c-fef9-0310-b244-a6a79926bd2f Allow make doxygen to work properly -@@ -19418,7 +19418,7 @@ +@@ -19770,7 +19770,7 @@ 2006-11-10 Steven Dake @@ -67,7 +67,7 @@ git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1299 fd59a12c-fef9-0310-b244-a6a79926bd2f Recovery algorithms described in this document. -@@ -25592,13 +25592,13 @@ +@@ -25944,13 +25944,13 @@ 2004-07-12 Steven Dake diff -Nru corosync-3.1.2/debian/patches/man-corosync-cfgtool.8-use-proper-single-quotes.patch corosync-3.1.6/debian/patches/man-corosync-cfgtool.8-use-proper-single-quotes.patch --- corosync-3.1.2/debian/patches/man-corosync-cfgtool.8-use-proper-single-quotes.patch 2021-07-23 19:08:14.000000000 +0000 +++ corosync-3.1.6/debian/patches/man-corosync-cfgtool.8-use-proper-single-quotes.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -From: =?utf-8?q?Ferenc_W=C3=A1gner?= -Date: Sat, 3 Apr 2021 13:14:28 +0200 -Subject: man: corosync-cfgtool.8: use proper single quotes -MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 8bit - -Apostrophe as the first character of the input line indicates a -request, so groff complained: macro 'onwire'' not defined. - -Signed-off-by: Ferenc Wágner ---- - man/corosync-cfgtool.8 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/man/corosync-cfgtool.8 b/man/corosync-cfgtool.8 -index 1198213..b83f899 100644 ---- a/man/corosync-cfgtool.8 -+++ b/man/corosync-cfgtool.8 -@@ -88,7 +88,7 @@ nodeid: 2 reachable onwire (min/max/cur): 0, 1, 1 - .P - Only reachable nodes are displayed so "reachable" should always be there. - .br --'onwire' versions are the knet on-wire versions that are supported/in use (where appropriate). -+\(oqonwire\(cq versions are the knet on-wire versions that are supported/in use (where appropriate). - .br - IP addresses are the local and remote IP addresses (for UDP[U] only the local IP address is shown) - .br diff -Nru corosync-3.1.2/debian/patches/series corosync-3.1.6/debian/patches/series --- corosync-3.1.2/debian/patches/series 2021-07-23 19:24:13.000000000 +0000 +++ corosync-3.1.6/debian/patches/series 2022-01-12 10:58:06.000000000 +0000 @@ -1,6 +1,4 @@ Fix-various-typos-in-ChangeLog.patch Enable-PrivateTmp-in-the-systemd-service-files.patch Make-the-example-config-valid.patch -man-corosync-cfgtool.8-use-proper-single-quotes.patch -stats-fix-crash-when-iterating-over-deleted-keys.patch lp1918735/0001-allow_knet_handle_fallback_default_yes.patch diff -Nru corosync-3.1.2/debian/patches/stats-fix-crash-when-iterating-over-deleted-keys.patch corosync-3.1.6/debian/patches/stats-fix-crash-when-iterating-over-deleted-keys.patch --- corosync-3.1.2/debian/patches/stats-fix-crash-when-iterating-over-deleted-keys.patch 2021-07-23 19:08:14.000000000 +0000 +++ corosync-3.1.6/debian/patches/stats-fix-crash-when-iterating-over-deleted-keys.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -From: Christine Caulfield -Date: Thu, 3 Jun 2021 07:53:28 +0100 -Subject: stats: fix crash when iterating over deleted keys - -The libqb map API leaves 'ownership' of the data with the caller -but does its own lifetime management, so it can easily happen that -map_rm() is called and the data deleted by the caller. -But if an iterator is running over that item then the map entry -will not get removed (leaving dangling pointers) until later. - -libqb has a hack-y callback that tells the owner when it is safe to -delete the allocated memory, so we hook into that. icmap is already -using this. - -Signed-off-by: Christine Caulfield -Reviewed-by: Jan Friesse ---- - exec/stats.c | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - -diff --git a/exec/stats.c b/exec/stats.c -index d5c1cbc..d9fd115 100644 ---- a/exec/stats.c -+++ b/exec/stats.c -@@ -270,6 +270,17 @@ static void stats_rm_entry(const char *key) - - if (item) { - qb_map_rm(stats_map, item->key_name); -+ /* Structures freed in callback below */ -+ } -+} -+ -+static void stats_map_free_cb(uint32_t event, -+ char* key, void* old_value, -+ void* value, void* user_data) -+{ -+ struct stats_item *item = (struct stats_item *)old_value; -+ -+ if (item) { - free(item->key_name); - free(item); - } -@@ -279,6 +290,7 @@ cs_error_t stats_map_init(const struct corosync_api_v1 *corosync_api) - { - int i; - char param[ICMAP_KEYNAME_MAXLEN]; -+ int32_t err; - - api = corosync_api; - -@@ -302,7 +314,12 @@ cs_error_t stats_map_init(const struct corosync_api_v1 *corosync_api) - } - - /* KNET, IPCS & SCHEDMISS stats are added when appropriate */ -- return CS_OK; -+ -+ -+ /* Call us when we can free things */ -+ err = qb_map_notify_add(stats_map, NULL, stats_map_free_cb, QB_MAP_NOTIFY_FREE, NULL); -+ -+ return (qb_to_cs_error(err)); - } - - cs_error_t stats_map_get(const char *key_name, diff -Nru corosync-3.1.2/debian/rules corosync-3.1.6/debian/rules --- corosync-3.1.2/debian/rules 2021-06-17 14:18:55.000000000 +0000 +++ corosync-3.1.6/debian/rules 2022-01-12 10:58:06.000000000 +0000 @@ -66,9 +66,5 @@ # we don't need the upstream license rm debian/tmp/usr/share/doc/corosync/LICENSE -override_dh_missing: - dh_missing --fail-missing - -override_dh_gencontrol: +execute_before_dh_gencontrol: debian/check_header_deps - dh_gencontrol diff -Nru corosync-3.1.2/exec/cfg.c corosync-3.1.6/exec/cfg.c --- corosync-3.1.2/exec/cfg.c 2021-03-29 12:07:44.000000000 +0000 +++ corosync-3.1.6/exec/cfg.c 2021-09-13 07:15:12.000000000 +0000 @@ -1106,9 +1106,17 @@ const void *msg) { struct cfg_info *ci = (struct cfg_info *)api->ipc_private_data_get (conn); + struct res_lib_cfg_trackstop res_lib_cfg_trackstop; ENTER(); remove_ci_from_shutdown(ci); + + res_lib_cfg_trackstop.header.size = sizeof(struct res_lib_cfg_trackstop); + res_lib_cfg_trackstop.header.id = MESSAGE_RES_CFG_STATETRACKSTOP; + res_lib_cfg_trackstop.header.error = CS_OK; + + api->ipc_response_send(conn, &res_lib_cfg_trackstop, + sizeof(res_lib_cfg_trackstop)); LEAVE(); } diff -Nru corosync-3.1.2/exec/coroparse.c corosync-3.1.6/exec/coroparse.c --- corosync-3.1.2/exec/coroparse.c 2021-03-29 12:07:44.000000000 +0000 +++ corosync-3.1.6/exec/coroparse.c 2021-09-13 07:15:12.000000000 +0000 @@ -555,6 +555,28 @@ return (0); } +static int handle_crypto_model(const char *val, const char **error_string) +{ + + if (util_is_valid_knet_crypto_model(val, NULL, 0, + "Invalid crypto model. Should be ", error_string) == 1) { + return (0); + } else { + return (-1); + } +} + +static int handle_compress_model(const char *val, const char **error_string) +{ + + if (util_is_valid_knet_compress_model(val, NULL, 0, + "Invalid compression model. Should be ", error_string) == 1) { + return (0); + } else { + return (-1); + } +} + static int main_config_parser_cb(const char *path, char *key, char *value, @@ -748,14 +770,11 @@ } } if (strcmp(path, "totem.crypto_model") == 0) { - if ((strcmp(value, "nss") != 0) && - (strcmp(value, "openssl") != 0)) { - *error_string = "Invalid crypto model. " - "Should be nss or openssl"; - + if (handle_crypto_model(value, error_string) != 0) { return (0); } } + if (strcmp(path, "totem.crypto_cipher") == 0) { if ((strcmp(value, "none") != 0) && (strcmp(value, "aes256") != 0) && @@ -780,6 +799,13 @@ return (0); } } + + if (strcmp(path, "totem.knet_compression_model") == 0) { + if (handle_compress_model(value, error_string) != 0) { + return (0); + } + } + break; case MAIN_CP_CB_DATA_STATE_SYSTEM: @@ -802,7 +828,8 @@ } if (strcmp(path, "system.move_to_root_cgroup") == 0) { if ((strcmp(value, "yes") != 0) && - (strcmp(value, "no") != 0)) { + (strcmp(value, "no") != 0) && + (strcmp(value, "auto") != 0)) { *error_string = "Invalid system.move_to_root_cgroup"; return (0); diff -Nru corosync-3.1.2/exec/logsys.c corosync-3.1.6/exec/logsys.c --- corosync-3.1.2/exec/logsys.c 2021-03-11 13:42:58.000000000 +0000 +++ corosync-3.1.6/exec/logsys.c 2021-11-09 10:33:02.000000000 +0000 @@ -379,6 +379,8 @@ qb_log_ctl(QB_LOG_BLACKBOX, QB_LOG_CONF_ENABLED, QB_FALSE); if (logsys_format_set(NULL) == -1) { + pthread_mutex_unlock (&logsys_config_mutex); + return -1; } diff -Nru corosync-3.1.2/exec/main.c corosync-3.1.6/exec/main.c --- corosync-3.1.2/exec/main.c 2021-03-29 12:07:44.000000000 +0000 +++ corosync-3.1.6/exec/main.c 2021-09-13 07:15:12.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2002-2006 MontaVista Software, Inc. - * Copyright (c) 2006-2018 Red Hat, Inc. + * Copyright (c) 2006-2021 Red Hat, Inc. * * All rights reserved. * @@ -169,6 +169,12 @@ static int lockfile_fd = -1; +enum move_to_root_cgroup_mode { + MOVE_TO_ROOT_CGROUP_MODE_OFF = 0, + MOVE_TO_ROOT_CGROUP_MODE_ON = 1, + MOVE_TO_ROOT_CGROUP_MODE_AUTO = 2, +}; + qb_loop_t *cs_poll_handle_get (void) { return (corosync_poll_handle); @@ -859,7 +865,12 @@ } -static int corosync_set_rr_scheduler (void) +/* + * Set main pid RR scheduler. + * silent: don't log sched_get_priority_max and sched_setscheduler errors + * Returns: 0 - success, -1 failure, -2 platform doesn't support SCHED_RR + */ +static int corosync_set_rr_scheduler (int silent) { int ret_val = 0; @@ -871,9 +882,11 @@ global_sched_param.sched_priority = sched_priority; res = sched_setscheduler (0, SCHED_RR, &global_sched_param); if (res == -1) { - LOGSYS_PERROR(errno, LOGSYS_LEVEL_WARNING, - "Could not set SCHED_RR at priority %d", - global_sched_param.sched_priority); + if (!silent) { + LOGSYS_PERROR(errno, LOGSYS_LEVEL_WARNING, + "Could not set SCHED_RR at priority %d", + global_sched_param.sched_priority); + } global_sched_param.sched_priority = 0; #ifdef HAVE_QB_LOG_THREAD_PRIORITY_SET @@ -898,15 +911,17 @@ } } } else { - LOGSYS_PERROR (errno, LOGSYS_LEVEL_WARNING, - "Could not get maximum scheduler priority"); + if (!silent) { + LOGSYS_PERROR (errno, LOGSYS_LEVEL_WARNING, + "Could not get maximum scheduler priority"); + } sched_priority = 0; ret_val = -1; } #else log_printf(LOGSYS_LEVEL_WARNING, "The Platform is missing process priority setting features. Leaving at default."); - ret_val = -1; + ret_val = -2; #endif return (ret_val); @@ -1045,6 +1060,7 @@ */ icmap_set_ro_access("totem.crypto_cipher", CS_FALSE, CS_TRUE); icmap_set_ro_access("totem.crypto_hash", CS_FALSE, CS_TRUE); + icmap_set_ro_access("totem.crypto_model", CS_FALSE, CS_TRUE); icmap_set_ro_access("totem.keyfile", CS_FALSE, CS_TRUE); icmap_set_ro_access("totem.key", CS_FALSE, CS_TRUE); icmap_set_ro_access("totem.secauth", CS_FALSE, CS_TRUE); @@ -1172,6 +1188,7 @@ static int corosync_move_to_root_cgroup(void) { FILE *f; int res = -1; + const char *cgroup_task_fname = NULL; /* * /sys/fs/cgroup is hardcoded, because most of Linux distributions are now @@ -1182,15 +1199,29 @@ */ f = fopen("/sys/fs/cgroup/cpu/cpu.rt_runtime_us", "rt"); if (f == NULL) { - log_printf(LOGSYS_LEVEL_DEBUG, "cpu.rt_runtime_us doesn't exists -> " - "system without cgroup or with disabled CONFIG_RT_GROUP_SCHED"); + /* + * Try cgroup v2 + */ + f = fopen("/sys/fs/cgroup/cgroup.procs", "rt"); + if (f == NULL) { + log_printf(LOG_DEBUG, "cpu.rt_runtime_us or cgroup.procs doesn't exist -> " + "system without cgroup or with disabled CONFIG_RT_GROUP_SCHED"); - res = 0; - goto exit_res; + res = 0; + goto exit_res; + } else { + log_printf(LOGSYS_LEVEL_DEBUG, "Moving main pid to cgroup v2 root cgroup"); + + cgroup_task_fname = "/sys/fs/cgroup/cgroup.procs"; + } + } else { + log_printf(LOGSYS_LEVEL_DEBUG, "Moving main pid to cgroup v1 root cgroup"); + + cgroup_task_fname = "/sys/fs/cgroup/cpu/tasks"; } (void)fclose(f); - f = fopen("/sys/fs/cgroup/cpu/tasks", "w"); + f = fopen(cgroup_task_fname, "w"); if (f == NULL) { log_printf(LOGSYS_LEVEL_WARNING, "Can't open cgroups tasks file for writing"); @@ -1214,13 +1245,49 @@ return (res); } +static void show_version_info_crypto(void) +{ + const char *error_string; + const char *list_str; + + if (util_is_valid_knet_crypto_model(NULL, &list_str, 1, "", &error_string) != -1) { + printf("Available crypto models: %s\n", list_str); + } else { + perror(error_string); + } +} + +static void show_version_info_compress(void) +{ + const char *error_string; + const char *list_str; + + if (util_is_valid_knet_compress_model(NULL, &list_str, 1, "", &error_string) != -1) { + printf("Available compression models: %s\n", list_str); + } else { + perror(error_string); + } +} + +static void show_version_info(void) +{ + + printf ("Corosync Cluster Engine, version '%s'\n", VERSION); + printf ("Copyright (c) 2006-2021 Red Hat, Inc.\n"); + + printf ("\nBuilt-in features:" PACKAGE_FEATURES "\n"); + + show_version_info_crypto(); + show_version_info_compress(); +} int main (int argc, char **argv, char **envp) { const char *error_string; struct totem_config totem_config; int res, ch; - int background, sched_rr, prio, testonly, move_to_root_cgroup; + int background, sched_rr, prio, testonly; + enum move_to_root_cgroup_mode move_to_root_cgroup; enum e_corosync_done flock_err; uint64_t totem_config_warnings; struct scheduler_pause_timeout_data scheduler_pause_timeout_data; @@ -1228,6 +1295,7 @@ char *ep; char *tmp_str; int log_subsys_id_totem; + int silent; /* default configuration */ @@ -1254,8 +1322,7 @@ testonly = 1; break; case 'v': - printf ("Corosync Cluster Engine, version '%s'\n", VERSION); - printf ("Copyright (c) 2006-2018 Red Hat, Inc.\n"); + show_version_info(); logsys_system_fini(); return EXIT_SUCCESS; @@ -1266,7 +1333,7 @@ " -c : Corosync config file path.\n"\ " -f : Start application in foreground.\n"\ " -t : Test configuration and exit.\n"\ - " -v : Display version and SVN revision of Corosync and exit.\n"); + " -v : Display version, git revision and some useful information about Corosync and exit.\n"); logsys_system_fini(); return EXIT_FAILURE; } @@ -1358,8 +1425,9 @@ log_printf (LOGSYS_LEVEL_WARNING, "member section is deprecated."); } - if (totem_config_warnings & TOTEM_CONFIG_WARNING_TOTEM_NODEID_IGNORED) { - log_printf (LOGSYS_LEVEL_WARNING, "nodeid appears both in totem section and nodelist. Nodelist one is used."); + if (totem_config_warnings & TOTEM_CONFIG_WARNING_TOTEM_NODEID_SET) { + log_printf (LOGSYS_LEVEL_WARNING, "nodeid in totem section is deprecated and ignored. " + "Nodelist (or autogenerated) nodeid is going to be used."); } if (totem_config_warnings & TOTEM_CONFIG_BINDNETADDR_NODELIST_SET) { @@ -1382,21 +1450,19 @@ } - move_to_root_cgroup = 1; + move_to_root_cgroup = MOVE_TO_ROOT_CGROUP_MODE_AUTO; if (icmap_get_string("system.move_to_root_cgroup", &tmp_str) == CS_OK) { - if (strcmp(tmp_str, "yes") != 0) { - move_to_root_cgroup = 0; + /* + * Validity of move_to_root_cgroup values checked in coroparse.c + */ + if (strcmp(tmp_str, "yes") == 0) { + move_to_root_cgroup = MOVE_TO_ROOT_CGROUP_MODE_ON; + } else if (strcmp(tmp_str, "no") == 0) { + move_to_root_cgroup = MOVE_TO_ROOT_CGROUP_MODE_OFF; } free(tmp_str); } - /* - * Try to move corosync into root cpu cgroup. Failure is not fatal and - * error is deliberately ignored. - */ - if (move_to_root_cgroup) { - (void)corosync_move_to_root_cgroup(); - } sched_rr = 1; if (icmap_get_string("system.sched_rr", &tmp_str) == CS_OK) { @@ -1427,11 +1493,31 @@ free(tmp_str); } + if (move_to_root_cgroup == MOVE_TO_ROOT_CGROUP_MODE_ON) { + /* + * Try to move corosync into root cpu cgroup. Failure is not fatal and + * error is deliberately ignored. + */ + (void)corosync_move_to_root_cgroup(); + } + /* * Set round robin realtime scheduling with priority 99 */ if (sched_rr) { - if (corosync_set_rr_scheduler () != 0) { + silent = (move_to_root_cgroup == MOVE_TO_ROOT_CGROUP_MODE_AUTO); + res = corosync_set_rr_scheduler (silent); + + if (res == -1 && move_to_root_cgroup == MOVE_TO_ROOT_CGROUP_MODE_AUTO) { + /* + * Try to move process to root cgroup and try set priority again + */ + (void)corosync_move_to_root_cgroup(); + + res = corosync_set_rr_scheduler (0); + } + + if (res != 0) { prio = INT_MIN; } else { prio = 0; diff -Nru corosync-3.1.2/exec/stats.c corosync-3.1.6/exec/stats.c --- corosync-3.1.2/exec/stats.c 2021-03-11 13:42:58.000000000 +0000 +++ corosync-3.1.6/exec/stats.c 2021-09-13 07:15:12.000000000 +0000 @@ -270,6 +270,17 @@ if (item) { qb_map_rm(stats_map, item->key_name); + /* Structures freed in callback below */ + } +} + +static void stats_map_free_cb(uint32_t event, + char* key, void* old_value, + void* value, void* user_data) +{ + struct stats_item *item = (struct stats_item *)old_value; + + if (item) { free(item->key_name); free(item); } @@ -279,6 +290,7 @@ { int i; char param[ICMAP_KEYNAME_MAXLEN]; + int32_t err; api = corosync_api; @@ -302,7 +314,12 @@ } /* KNET, IPCS & SCHEDMISS stats are added when appropriate */ - return CS_OK; + + + /* Call us when we can free things */ + err = qb_map_notify_add(stats_map, NULL, stats_map_free_cb, QB_MAP_NOTIFY_FREE, NULL); + + return (qb_to_cs_error(err)); } cs_error_t stats_map_get(const char *key_name, diff -Nru corosync-3.1.2/exec/totemconfig.c corosync-3.1.6/exec/totemconfig.c --- corosync-3.1.2/exec/totemconfig.c 2021-03-29 12:07:44.000000000 +0000 +++ corosync-3.1.6/exec/totemconfig.c 2021-11-09 10:33:02.000000000 +0000 @@ -81,6 +81,7 @@ #define MAX_MESSAGES 17 #define MISS_COUNT_CONST 5 #define BLOCK_UNLISTED_IPS 1 +#define CANCEL_TOKEN_HOLD_ON_RETRANSMIT 0 /* This constant is not used for knet */ #define UDP_NETMTU 1500 @@ -144,6 +145,8 @@ return totem_config->knet_compression_model; if (strcmp(param_name, "totem.block_unlisted_ips") == 0) return &totem_config->block_unlisted_ips; + if (strcmp(param_name, "totem.cancel_token_hold_on_retransmit") == 0) + return &totem_config->cancel_token_hold_on_retransmit; return NULL; } @@ -365,6 +368,9 @@ totem_volatile_config_set_boolean_value(totem_config, temp_map, "totem.block_unlisted_ips", deleted_key, BLOCK_UNLISTED_IPS); + + totem_volatile_config_set_boolean_value(totem_config, temp_map, "totem.cancel_token_hold_on_retransmit", + deleted_key, CANCEL_TOKEN_HOLD_ON_RETRANSMIT); } int totem_volatile_config_validate ( @@ -535,19 +541,16 @@ const char *tmp_cipher; const char *tmp_hash; const char *tmp_model; + char *crypto_model_str; + int res = 0; tmp_hash = "none"; tmp_cipher = "none"; tmp_model = "none"; - if (icmap_get_string_r(map, "totem.crypto_model", &str) == CS_OK) { - if (strcmp(str, "nss") == 0) { - tmp_model = "nss"; - } - if (strcmp(str, "openssl") == 0) { - tmp_model = "openssl"; - } - free(str); + crypto_model_str = NULL; + if (icmap_get_string_r(map, "totem.crypto_model", &crypto_model_str) == CS_OK) { + tmp_model = crypto_model_str; } else { tmp_model = "nss"; } @@ -601,12 +604,19 @@ if ((strcmp(tmp_cipher, "none") != 0) && (strcmp(tmp_hash, "none") == 0)) { *error_string = "crypto_cipher requires crypto_hash with value other than none"; - return -1; + res = -1; + + goto out_free_crypto_model_str; } if (strcmp(tmp_model, "none") == 0) { - *error_string = "crypto_model should be 'nss' or 'openssl'"; - return -1; + /* + * Shouldn't happen because it is handled by coroparse + */ + *error_string = "invalid crypto_model"; + res = -1; + + goto out_free_crypto_model_str; } if (strcmp(tmp_cipher, totem_config->crypto_cipher_type) || @@ -615,11 +625,19 @@ totem_config->crypto_changed = 1; } - strncpy(totem_config->crypto_cipher_type, tmp_cipher, CONFIG_STRING_LEN_MAX); - strncpy(totem_config->crypto_hash_type, tmp_hash, CONFIG_STRING_LEN_MAX); - strncpy(totem_config->crypto_model, tmp_model, CONFIG_STRING_LEN_MAX); + strncpy(totem_config->crypto_cipher_type, tmp_cipher, CONFIG_STRING_LEN_MAX - 1); + totem_config->crypto_cipher_type[CONFIG_STRING_LEN_MAX - 1] = '\0'; - return 0; + strncpy(totem_config->crypto_hash_type, tmp_hash, CONFIG_STRING_LEN_MAX - 1); + totem_config->crypto_hash_type[CONFIG_STRING_LEN_MAX - 1] = '\0'; + + strncpy(totem_config->crypto_model, tmp_model, CONFIG_STRING_LEN_MAX - 1); + totem_config->crypto_model[CONFIG_STRING_LEN_MAX - 1] = '\0'; + +out_free_crypto_model_str: + free(crypto_model_str); + + return (res); } static int nodelist_byname(icmap_map_t map, const char *find_name, int strip_domain) @@ -1404,10 +1422,37 @@ log_printf(LOGSYS_LEVEL_DEBUG, "Generated nodeid = " CS_PRI_NODE_ID " for %s", nodeid, str); + free(str); + /* + * Put nodeid back to nodelist to make cfgtool work + */ + snprintf(tmp_key, ICMAP_KEYNAME_MAXLEN, "nodelist.node.%u.nodeid", node_pos); + /* + * Not critical + */ + (void)icmap_set_uint32_r(map, tmp_key, nodeid); } } + if (!nodeid && totem_config->transport_number == TOTEM_TRANSPORT_KNET) { + sprintf(error_string_response, + "Knet requires an explicit nodeid to be specified " + "for address '%s'.", node_addr_str); + *error_string = error_string_response; + + return (-1); + } + + if (totem_config->transport_number == TOTEM_TRANSPORT_KNET && nodeid >= KNET_MAX_HOST) { + sprintf(error_string_response, + "Knet requires nodeid to be less than %u " + "for address '%s'.", KNET_MAX_HOST, node_addr_str); + *error_string = error_string_response; + + return (-1); + } + member_count = totem_config->interfaces[linknumber].member_count; res = totemip_parse(&totem_config->interfaces[linknumber].member_list[member_count], node_addr_str, totem_config->ip_version); @@ -1743,7 +1788,7 @@ uint16_t u16; int i; int local_node_pos; - int nodeid_set; + uint32_t u32; *warnings = 0; @@ -1799,7 +1844,9 @@ free(str); } - icmap_get_uint32("totem.nodeid", &totem_config->node_id); + if (icmap_get_uint32("totem.nodeid", &u32) == CS_OK) { + *warnings |= TOTEM_CONFIG_WARNING_TOTEM_NODEID_SET; + } totem_config->clear_node_high_bit = 0; if (icmap_get_string("totem.clear_node_high_bit", &str) == CS_OK) { @@ -1892,12 +1939,12 @@ local_node_pos = find_local_node(icmap_get_global_map(), 1); if (local_node_pos != -1) { + assert(totem_config->node_id == 0); + snprintf(tmp_key, ICMAP_KEYNAME_MAXLEN, "nodelist.node.%u.nodeid", local_node_pos); + (void)icmap_get_uint32(tmp_key, &totem_config->node_id); + - nodeid_set = (totem_config->node_id != 0); - if (icmap_get_uint32(tmp_key, &totem_config->node_id) == CS_OK && nodeid_set) { - *warnings |= TOTEM_CONFIG_WARNING_TOTEM_NODEID_IGNORED; - } if ((totem_config->transport_number == TOTEM_TRANSPORT_KNET) && (!totem_config->node_id)) { *error_string = "Knet requires an explicit nodeid for the local node"; return -1; diff -Nru corosync-3.1.2/exec/totemconfig.h corosync-3.1.6/exec/totemconfig.h --- corosync-3.1.2/exec/totemconfig.h 2021-03-11 13:42:58.000000000 +0000 +++ corosync-3.1.6/exec/totemconfig.h 2021-09-13 07:15:12.000000000 +0000 @@ -44,8 +44,8 @@ #define TOTEM_CONFIG_WARNING_MEMBERS_IGNORED (1<<1) #define TOTEM_CONFIG_WARNING_MEMBERS_DEPRECATED (1<<2) -#define TOTEM_CONFIG_WARNING_TOTEM_NODEID_IGNORED (1<<3) -#define TOTEM_CONFIG_BINDNETADDR_NODELIST_SET (1<<4) +#define TOTEM_CONFIG_WARNING_TOTEM_NODEID_SET (1<<3) +#define TOTEM_CONFIG_BINDNETADDR_NODELIST_SET (1<<4) extern int totem_config_read ( struct totem_config *totem_config, diff -Nru corosync-3.1.2/exec/totemknet.c corosync-3.1.6/exec/totemknet.c --- corosync-3.1.2/exec/totemknet.c 2021-04-06 09:09:02.000000000 +0000 +++ corosync-3.1.6/exec/totemknet.c 2021-09-13 07:15:12.000000000 +0000 @@ -540,6 +540,7 @@ return (-1); } + /* node_status[] has been zeroed for us in totempg.c */ for (i=0; i < num_links; i++) { if (!instance->totem_config->interfaces[link_list[i]].configured) { continue; @@ -550,12 +551,12 @@ &link_status, sizeof(link_status)); if (res == 0) { - node_status->link_status[i].enabled = link_status.enabled; - node_status->link_status[i].connected = link_status.connected; - node_status->link_status[i].dynconnected = link_status.dynconnected; - node_status->link_status[i].mtu = link_status.mtu; - memcpy(node_status->link_status[i].src_ipaddr, link_status.src_ipaddr, KNET_MAX_HOST_LEN); - memcpy(node_status->link_status[i].dst_ipaddr, link_status.dst_ipaddr, KNET_MAX_HOST_LEN); + node_status->link_status[link_list[i]].enabled = link_status.enabled; + node_status->link_status[link_list[i]].connected = link_status.connected; + node_status->link_status[link_list[i]].dynconnected = link_status.dynconnected; + node_status->link_status[link_list[i]].mtu = link_status.mtu; + memcpy(node_status->link_status[link_list[i]].src_ipaddr, link_status.src_ipaddr, KNET_MAX_HOST_LEN); + memcpy(node_status->link_status[link_list[i]].dst_ipaddr, link_status.dst_ipaddr, KNET_MAX_HOST_LEN); } else { knet_log_printf (LOGSYS_LEVEL_WARNING, "knet_link_get_link_status(%d, %d) failed: %d", nodeid, link_list[i], res); } diff -Nru corosync-3.1.2/exec/totemsrp.c corosync-3.1.6/exec/totemsrp.c --- corosync-3.1.2/exec/totemsrp.c 2021-03-29 12:07:44.000000000 +0000 +++ corosync-3.1.6/exec/totemsrp.c 2021-11-09 10:33:02.000000000 +0000 @@ -1989,13 +1989,27 @@ trans_memb_list_totemip, instance->my_trans_memb_entries, left_list, instance->my_left_memb_entries, 0, 0, &instance->my_ring_id); + /* + * Switch new totemsrp messages queue. Messages sent from now on are stored + * in different queue so synchronization messages are delivered first. Totempg + * buffers will be switched later. + */ instance->waiting_trans_ack = 1; - instance->totemsrp_waiting_trans_ack_cb_fn (1); // TODO we need to filter to ensure we only deliver those // messages which are part of instance->my_deliver_memb messages_deliver_to_app (instance, 1, instance->old_ring_state_high_seq_received); + /* + * Switch totempg buffers. This used to be right after + * instance->waiting_trans_ack = 1; + * line. This was causing problem, because there may be not yet + * processed parts of messages in totempg buffers. + * So when buffers were switched and recovered messages + * got delivered it was not possible to assemble them. + */ + instance->totemsrp_waiting_trans_ack_cb_fn (1); + instance->my_aru = aru_save; /* @@ -3981,8 +3995,9 @@ transmits_allowed = fcc_calculate (instance, token); mcasted_retransmit = orf_token_rtr (instance, token, &transmits_allowed); - if (instance->my_token_held == 1 && - (token->rtr_list_entries > 0 || mcasted_retransmit > 0)) { + if (instance->totem_config->cancel_token_hold_on_retransmit && + instance->my_token_held == 1 && + (token->rtr_list_entries > 0 || mcasted_retransmit > 0)) { instance->my_token_held = 0; forward_token = 1; } diff -Nru corosync-3.1.2/exec/util.c corosync-3.1.6/exec/util.c --- corosync-3.1.2/exec/util.c 2021-03-11 13:42:58.000000000 +0000 +++ corosync-3.1.6/exec/util.c 2021-09-13 07:15:12.000000000 +0000 @@ -43,6 +43,8 @@ #include #include +#include + #include #include #include @@ -188,3 +190,154 @@ return (path); } + +static int safe_strcat(char *dst, size_t dst_len, const char *src) +{ + + if (strlen(dst) + strlen(src) >= dst_len - 1) { + return (-1); + } + + strcat(dst, src); + + return (0); +} + +/* + * val - knet crypto model to find + * crypto_list_str - string with concatenated list of available crypto models - can be NULL + * machine_parseable_str - 0 - split strings by space, 1 - use human form (split by "," and last item with "or") + * error_string_prefix - Prefix to add into error string + * error_string - Complete error string + */ +int util_is_valid_knet_crypto_model(const char *val, + const char **list_str, int machine_parseable_str, + const char *error_string_prefix, const char **error_string) +{ + size_t entries; + struct knet_crypto_info crypto_list[16]; + size_t zi; + static char local_error_str[512]; + static char local_list_str[256]; + int model_found = 0; + + if (list_str != NULL) { + *list_str = local_list_str; + } + + memset(local_error_str, 0, sizeof(local_error_str)); + memset(local_list_str, 0, sizeof(local_list_str)); + + safe_strcat(local_error_str, sizeof(local_error_str), error_string_prefix); + + if (knet_get_crypto_list(NULL, &entries) != 0) { + *error_string = "internal error - cannot get knet crypto list"; + return (-1); + } + + if (entries > sizeof(crypto_list) / sizeof(crypto_list[0])) { + *error_string = "internal error - too many knet crypto list entries"; + return (-1); + } + + if (knet_get_crypto_list(crypto_list, &entries) != 0) { + *error_string = "internal error - cannot get knet crypto list"; + return (-1); + } + + for (zi = 0; zi < entries; zi++) { + if (zi == 0) { + } else if (zi == entries - 1) { + if (machine_parseable_str) { + (void)safe_strcat(local_list_str, sizeof(local_list_str), " "); + } else { + (void)safe_strcat(local_list_str, sizeof(local_list_str), " or "); + } + } else { + if (machine_parseable_str) { + (void)safe_strcat(local_list_str, sizeof(local_list_str), " "); + } else { + (void)safe_strcat(local_list_str, sizeof(local_list_str), ", "); + } + } + + (void)safe_strcat(local_list_str, sizeof(local_list_str), crypto_list[zi].name); + + if (val != NULL && strcmp(val, crypto_list[zi].name) == 0) { + model_found = 1; + } + } + + if (!model_found) { + (void)safe_strcat(local_error_str, sizeof(local_error_str), local_list_str); + *error_string = local_error_str; + } + + return (model_found); +} + +int util_is_valid_knet_compress_model(const char *val, + const char **list_str, int machine_parseable_str, + const char *error_string_prefix, const char **error_string) +{ + size_t entries; + struct knet_compress_info compress_list[16]; + size_t zi; + static char local_error_str[512]; + static char local_list_str[256]; + int model_found = 0; + + if (list_str != NULL) { + *list_str = local_list_str; + } + + memset(local_error_str, 0, sizeof(local_error_str)); + memset(local_list_str, 0, sizeof(local_list_str)); + + safe_strcat(local_error_str, sizeof(local_error_str), error_string_prefix); + + if (knet_get_compress_list(NULL, &entries) != 0) { + *error_string = "internal error - cannot get knet compress list"; + return (-1); + } + + if (entries > sizeof(compress_list) / sizeof(compress_list[0])) { + *error_string = "internal error - too many knet compress list entries"; + return (-1); + } + + if (knet_get_compress_list(compress_list, &entries) != 0) { + *error_string = "internal error - cannot get knet compress list"; + return (-1); + } + + for (zi = 0; zi < entries; zi++) { + if (zi == 0) { + } else if (zi == entries - 1) { + if (machine_parseable_str) { + (void)safe_strcat(local_list_str, sizeof(local_list_str), " "); + } else { + (void)safe_strcat(local_list_str, sizeof(local_list_str), " or "); + } + } else { + if (machine_parseable_str) { + (void)safe_strcat(local_list_str, sizeof(local_list_str), " "); + } else { + (void)safe_strcat(local_list_str, sizeof(local_list_str), ", "); + } + } + + (void)safe_strcat(local_list_str, sizeof(local_list_str), compress_list[zi].name); + + if (val != NULL && strcmp(val, compress_list[zi].name) == 0) { + model_found = 1; + } + } + + if (!model_found) { + (void)safe_strcat(local_error_str, sizeof(local_error_str), local_list_str); + *error_string = local_error_str; + } + + return (model_found); +} diff -Nru corosync-3.1.2/exec/util.h corosync-3.1.6/exec/util.h --- corosync-3.1.2/exec/util.h 2021-03-11 13:42:58.000000000 +0000 +++ corosync-3.1.6/exec/util.h 2021-09-13 07:15:12.000000000 +0000 @@ -87,4 +87,12 @@ */ const char *get_state_dir(void); +extern int util_is_valid_knet_crypto_model(const char *val, + const char **list_str, int machine_parseable_str, + const char *error_string_prefix, const char **error_string); + +extern int util_is_valid_knet_compress_model(const char *val, + const char **list_str, int machine_parseable_str, + const char *error_string_prefix, const char **error_string); + #endif /* UTIL_H_DEFINED */ diff -Nru corosync-3.1.2/include/corosync/corotypes.h corosync-3.1.6/include/corosync/corotypes.h --- corosync-3.1.2/include/corosync/corotypes.h 2021-03-11 13:42:58.000000000 +0000 +++ corosync-3.1.6/include/corosync/corotypes.h 2021-09-13 07:15:12.000000000 +0000 @@ -57,6 +57,7 @@ #define CS_MAX(x, y) (((x) > (y)) ? (x) : (y)) #define CS_PRI_NODE_ID "%" PRIu32 +#define CS_PRI_NODE_ID_PADDED "%10" PRIu32 #define CS_PRI_RING_ID_SEQ "%" PRIx64 #define CS_PRI_RING_ID "%" PRIx32 ".%" PRIx64 /** diff -Nru corosync-3.1.2/include/corosync/totem/totem.h corosync-3.1.6/include/corosync/totem/totem.h --- corosync-3.1.2/include/corosync/totem/totem.h 2021-03-29 12:07:44.000000000 +0000 +++ corosync-3.1.6/include/corosync/totem/totem.h 2021-11-09 10:33:02.000000000 +0000 @@ -244,6 +244,8 @@ unsigned int block_unlisted_ips; + unsigned int cancel_token_hold_on_retransmit; + void (*totem_memb_ring_id_create_or_load) ( struct memb_ring_id *memb_ring_id, unsigned int nodeid); diff -Nru corosync-3.1.2/man/corosync.8 corosync-3.1.6/man/corosync.8 --- corosync-3.1.2/man/corosync.8 2021-03-11 13:42:58.000000000 +0000 +++ corosync-3.1.6/man/corosync.8 2021-09-13 07:15:12.000000000 +0000 @@ -1,5 +1,5 @@ .\"/* -.\" * Copyright (C) 2010-2018 Red Hat, Inc. +.\" * Copyright (C) 2010-2021 Red Hat, Inc. .\" * .\" * All rights reserved. .\" * @@ -31,7 +31,7 @@ .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" * THE POSSIBILITY OF SUCH DAMAGE. .\" */ -.TH COROSYNC 8 2018-11-12 +.TH COROSYNC 8 2021-04-09 .SH NAME corosync \- The Corosync Cluster Engine. .SH SYNOPSIS @@ -54,7 +54,9 @@ Test configuration and then exit. .TP .B -v -Display version and SVN revision of Corosync and exit. +Display version, git revision, compiled features and available crypto and compression +models and exit. + .SH SEE ALSO .BR corosync_overview (7), .BR corosync.conf (5), diff -Nru corosync-3.1.2/man/corosync-cfgtool.8 corosync-3.1.6/man/corosync-cfgtool.8 --- corosync-3.1.2/man/corosync-cfgtool.8 2021-03-29 12:07:44.000000000 +0000 +++ corosync-3.1.6/man/corosync-cfgtool.8 2021-09-13 07:15:12.000000000 +0000 @@ -31,7 +31,7 @@ .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" * THE POSSIBILITY OF SUCH DAMAGE. .\" */ -.TH "COROSYNC-CFGTOOL" "8" "2020-02-10" "" "" +.TH "COROSYNC-CFGTOOL" "8" "2020-06-02" "" "" .SH "NAME" corosync-cfgtool \- An administrative tool for corosync. .SH "SYNOPSIS" @@ -56,6 +56,9 @@ nodeid 1: localhost nodeid 2: connected nodeid 3: connected + +Please note that only one link is returned for a single node cluster configuration, +no matter how many links are configured. .TP .B -b Displays the brief status of the current links on this node when used @@ -88,7 +91,7 @@ .P Only reachable nodes are displayed so "reachable" should always be there. .br -'onwire' versions are the knet on-wire versions that are supported/in use (where appropriate). +\(oqonwire\(cq versions are the knet on-wire versions that are supported/in use (where appropriate). .br IP addresses are the local and remote IP addresses (for UDP[U] only the local IP address is shown) .br diff -Nru corosync-3.1.2/man/corosync.conf.5 corosync-3.1.6/man/corosync.conf.5 --- corosync-3.1.2/man/corosync.conf.5 2021-03-29 12:07:44.000000000 +0000 +++ corosync-3.1.6/man/corosync.conf.5 2021-11-09 10:33:02.000000000 +0000 @@ -1,6 +1,6 @@ .\"/* .\" * Copyright (c) 2005 MontaVista Software, Inc. -.\" * Copyright (c) 2006-2020 Red Hat, Inc. +.\" * Copyright (c) 2006-2021 Red Hat, Inc. .\" * .\" * All rights reserved. .\" * @@ -32,7 +32,7 @@ .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" * THE POSSIBILITY OF SUCH DAMAGE. .\" */ -.TH COROSYNC_CONF 5 2020-10-12 "corosync Man Page" "Corosync Cluster Engine Programmer's Manual" +.TH COROSYNC_CONF 5 2021-08-11 "corosync Man Page" "Corosync Cluster Engine Programmer's Manual" .SH NAME corosync.conf - corosync executive configuration file @@ -204,8 +204,10 @@ .TP crypto_model -This specifies which cryptographic library should be used by knet. Options -are nss and openssl. +This specifies which cryptographic library should be used by knet. +Supported values depend on the libknet build and on the installed +cryptography libraries. Typically nss and openssl will be available +but gcrypt and others could also be allowed. The default is nss. @@ -469,7 +471,7 @@ guarantee virtual synchrony, as node count grows if consensus is less than token. -The default is 1200 milliseconds. +The default is 3600 milliseconds. .TP merge @@ -582,6 +584,19 @@ The default value is yes. +.TP +cancel_token_hold_on_retransmit +Allows Corosync to hold token by representative when there is too much +retransmit messages. This allows network to process increased load without +overloading it. Used mechanism is same as described for +.B hold +directive. + +Some deployments may prefer to never hold token when there is +retransmit messages. If so, option should be set to yes. + +The default value is no. + .PP Within the .B logging @@ -797,9 +812,37 @@ .TP move_to_root_cgroup -Should be set to yes (default) if corosync should try to move itself to root -cgroup. This feature is available only for systems with cgroups with RT -sched enabled (Linux with CONFIG_RT_GROUP_SCHED kernel option). +Can be one of +.B yes +(Corosync always moves itself to root cgroup), +.B no +(Corosync never tries to move itself to root cgroup) or +.B auto +(Corosync first checks if sched_rr is enabled, and if +so, it tries to set round robin realtime scheduling with maximal priority to itself. +If setting of priority fails, corosync tries to move itself to root +cgroup and retries setting of priority). + +This feature is available only for systems with cgroups v1 with RT +sched enabled (Linux with CONFIG_RT_GROUP_SCHED kernel option) and cgroups v2. + +It's worth noting that currently (May 3 2021) cgroup2 doesn’t yet +support control of realtime processes and the cpu controller can only be +enabled when all RT processes are in the root cgroup (applies only for kernel +with CONFIG_RT_GROUP_SCHED enabled). So when move_to_root_cgroup +is disabled, kernel is compiled with CONFIG_RT_GROUP_SCHED and systemd is used, +it may be impossible to make systemd options +like CPUQuota working correctly until corosync is stopped. + +Also when moving to root cgroup is enforced and used together with cgroup2 and systemd +it makes impossible (most of the time) for journald to add systemd specific +metadata (most importantly _SYSTEMD_UNIT) properly, because corosync is +moved out of cgroup created by systemd. This means +it is not possible to filter corosync logged messages based on these metadata +(for example using -u or _SYSTEMD_UNIT=UNIT pattern) and also running +systemctl status doesn't display (all) corosync log messages. +The problem is even worse because journald caches pid for some time +(approx. 5 sec) so initial corosync messages have correct metadata. .TP allow_knet_handle_fallback diff -Nru corosync-3.1.2/.tarball-version corosync-3.1.6/.tarball-version --- corosync-3.1.2/.tarball-version 2021-04-06 10:03:45.000000000 +0000 +++ corosync-3.1.6/.tarball-version 2021-11-15 10:13:18.000000000 +0000 @@ -1 +1 @@ -3.1.2 +3.1.6 diff -Nru corosync-3.1.2/test/cpghum.c corosync-3.1.6/test/cpghum.c --- corosync-3.1.2/test/cpghum.c 2021-03-11 13:42:58.000000000 +0000 +++ corosync-3.1.6/test/cpghum.c 2021-11-09 10:33:02.000000000 +0000 @@ -431,7 +431,7 @@ } } -static void cpg_test ( +static int cpg_test ( cpg_handle_t handle_in, int write_size, int delay_time, @@ -458,6 +458,10 @@ send_retries++; goto resend; } + if (res == CS_ERR_LIBRARY) { + send_counter--; + return -1; + } if (res != CS_OK) { cpgh_log_printf(CPGH_LOG_ERR, "send failed: %d\n", res); send_fails++; @@ -478,7 +482,7 @@ cpgh_log_printf(CPGH_LOG_RTT, "RTT min/avg/max: %ld/%ld/%ld\n", min_rtt, avg_rtt, max_rtt); } } - + return 0; } static void sigalrm_handler (int num) @@ -572,6 +576,41 @@ return value * multiplier; } +static int connect_and_join(int model, int verbose) +{ + int res; + + switch (model) { + case 0: + res = cpg_initialize (&handle, &callbacks); + break; + case 1: + res = cpg_model_initialize (&handle, CPG_MODEL_V1, (cpg_model_data_t *)&model1_data, NULL); + break; + default: + res=999; // can't get here but it keeps the compiler happy + break; + } + + if (res != CS_OK) { + if (verbose) { + cpgh_log_printf(CPGH_LOG_ERR, "cpg_initialize failed with result %d\n", res); + } + return -1; + } + + res = cpg_join (handle, &group_name); + if (res != CS_OK) { + if (verbose) { + cpgh_log_printf(CPGH_LOG_ERR, "cpg_join failed with result %d\n", res); + } + cpg_finalize(handle); + return -1; + } + pthread_create (&thread, NULL, dispatch_thread, NULL); + return CS_OK; +} + int main (int argc, char *argv[]) { int i; @@ -707,36 +746,17 @@ signal (SIGALRM, sigalrm_handler); signal (SIGINT, sigint_handler); - switch (model) { - case 0: - res = cpg_initialize (&handle, &callbacks); - break; - case 1: - res = cpg_model_initialize (&handle, CPG_MODEL_V1, (cpg_model_data_t *)&model1_data, NULL); - break; - default: - res=999; // can't get here but it keeps the compiler happy - break; - } - if (res != CS_OK) { - cpgh_log_printf(CPGH_LOG_ERR, "cpg_initialize failed with result %d\n", res); - exit (1); + if (connect_and_join(model, 1) != CS_OK) { + exit(1); } + res = cpg_local_get(handle, &g_our_nodeid); if (res != CS_OK) { cpgh_log_printf(CPGH_LOG_ERR, "cpg_local_get failed with result %d\n", res); exit (1); } - pthread_create (&thread, NULL, dispatch_thread, NULL); - - res = cpg_join (handle, &group_name); - if (res != CS_OK) { - cpgh_log_printf(CPGH_LOG_ERR, "cpg_join failed with result %d\n", res); - exit (1); - } - if (listen_only) { int secs = 0; @@ -786,7 +806,23 @@ else { send_counter = -1; /* So we start from zero to allow listeners to sync */ for (i = 0; i < repetitions && !stopped; i++) { - cpg_test (handle, write_size, delay_time, print_time); + if (cpg_test (handle, write_size, delay_time, print_time) == -1) { + /* Try to reconnect when corosync stops */ + res = -1; + cpg_finalize(handle); + pthread_cancel(thread); + signal (SIGINT, SIG_DFL); + printf("Reconnecting..."); + fflush(stdout); + while (res != CS_OK) { + sleep(1); + printf("."); + fflush(stdout); + res = connect_and_join(model, 0); + } + printf("done\n"); + signal (SIGINT, sigint_handler); + } signal (SIGALRM, sigalrm_handler); } } diff -Nru corosync-3.1.2/test/Makefile.am corosync-3.1.6/test/Makefile.am --- corosync-3.1.2/test/Makefile.am 2021-03-29 12:07:44.000000000 +0000 +++ corosync-3.1.6/test/Makefile.am 2021-11-10 07:24:45.000000000 +0000 @@ -55,8 +55,10 @@ testvotequorum2_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libvotequorum.la cpgbound_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la cpgbench_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la -cpgbenchzc_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la -testsam_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libsam.la +cpgbenchzc_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la \ + $(top_builddir)/common_lib/libcorosync_common.la +testsam_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libsam.la \ + $(top_builddir)/lib/libcmap.la testcfg_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcfg.la if HAVE_CRC32 diff -Nru corosync-3.1.2/test/Makefile.in corosync-3.1.6/test/Makefile.in --- corosync-3.1.2/test/Makefile.in 2021-04-06 10:03:24.000000000 +0000 +++ corosync-3.1.6/test/Makefile.in 2021-11-15 10:12:54.000000000 +0000 @@ -151,7 +151,8 @@ cpgbenchzc_SOURCES = cpgbenchzc.c cpgbenchzc_OBJECTS = cpgbenchzc.$(OBJEXT) cpgbenchzc_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/libcpg.la + $(top_builddir)/lib/libcpg.la \ + $(top_builddir)/common_lib/libcorosync_common.la cpgbound_SOURCES = cpgbound.c cpgbound_OBJECTS = cpgbound.$(OBJEXT) cpgbound_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @@ -203,7 +204,7 @@ testsam_SOURCES = testsam.c testsam_OBJECTS = testsam.$(OBJEXT) testsam_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/libsam.la + $(top_builddir)/lib/libsam.la $(top_builddir)/lib/libcmap.la testvotequorum1_SOURCES = testvotequorum1.c testvotequorum1_OBJECTS = testvotequorum1.$(OBJEXT) testvotequorum1_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @@ -460,8 +461,12 @@ testvotequorum2_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libvotequorum.la cpgbound_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la cpgbench_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la -cpgbenchzc_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la -testsam_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libsam.la +cpgbenchzc_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la \ + $(top_builddir)/common_lib/libcorosync_common.la + +testsam_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libsam.la \ + $(top_builddir)/lib/libcmap.la + testcfg_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcfg.la @HAVE_CRC32_TRUE@cpghum_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la -lz @HAVE_CRC32_TRUE@cpgverify_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la -lz diff -Nru corosync-3.1.2/test/testcfg.c corosync-3.1.6/test/testcfg.c --- corosync-3.1.2/test/testcfg.c 2021-03-29 12:07:44.000000000 +0000 +++ corosync-3.1.6/test/testcfg.c 2021-09-13 07:15:12.000000000 +0000 @@ -145,5 +145,15 @@ fprintf(stderr, "corosync_cfg_try_shutdown failed: %d\n", res); return 1; } + + /* + * Test bug presented in 3.1.1 and 3.1.2 that makes trackstop blocks forever + */ + res = corosync_cfg_trackstop(cfg_handle1); + if (res != CS_OK) { + fprintf(stderr, "corosync_cfg_trackstop failed: %d\n", res); + return 1; + } + return 0; } diff -Nru corosync-3.1.2/tools/corosync-cfgtool.c corosync-3.1.6/tools/corosync-cfgtool.c --- corosync-3.1.2/tools/corosync-cfgtool.c 2021-03-29 12:07:44.000000000 +0000 +++ corosync-3.1.6/tools/corosync-cfgtool.c 2021-09-13 07:15:12.000000000 +0000 @@ -108,6 +108,7 @@ char *str; char *transport_str = NULL; uint32_t nodeid_list[KNET_MAX_HOST]; + const char *link_transport[KNET_MAX_LINK]; int s = 0; int rc = EXIT_SUCCESS; int transport_number = TOTEM_TRANSPORT_KNET; @@ -171,20 +172,63 @@ continue; } if (cmap_get_uint32(cmap_handle, iter_key, &nodeid) == CS_OK) { - if (nodeid == local_nodeid) { - local_nodeid_index = s; - } else { - /* Bit of an odd one this. but local node only uses one link (of course, to itself) - so if we want to know which links are active across the cluster we need to look - at another node (any other) node's link list */ - other_nodeid_index = s; - } nodeid_list[s++] = nodeid; } } + + if (s == 0) { + fprintf(stderr, "No nodes found in nodelist\n"); + exit (EXIT_FAILURE); + } + /* It's nice to have these in nodeid order */ qsort(nodeid_list, s, sizeof(uint32_t), node_compare); + /* + * Find local and other nodeid index in nodeid_list + */ + for (i = 0; i < s; i++) { + if (nodeid_list[i] == local_nodeid) { + local_nodeid_index = i; + } else { + /* Bit of an odd one this. but local node only uses one link (of course, to itself) + so if we want to know which links are active across the cluster we need to look + at another node (any other) node's link list */ + other_nodeid_index = i; + } + } + + /* Get the transport of each link - but set reasonable defaults */ + if (transport_number == TOTEM_TRANSPORT_KNET) { + for (i = 0; i":"", @@ -251,14 +295,14 @@ for (i=0; i $@ -corosync_cmapctl_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcmap.la +corosync_cmapctl_LDADD = $(LIBQB_LIBS) $(top_builddir)/common_lib/libcorosync_common.la $(top_builddir)/lib/libcmap.la -corosync_cfgtool_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcfg.la $(top_builddir)/lib/libcmap.la +corosync_cfgtool_LDADD = $(LIBQB_LIBS) $(top_builddir)/common_lib/libcorosync_common.la \ + $(top_builddir)/lib/libcfg.la $(top_builddir)/lib/libcmap.la corosync_cpgtool_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcfg.la \ - $(top_builddir)/lib/libcpg.la + $(top_builddir)/lib/libcpg.la \ + $(top_builddir)/common_lib/libcorosync_common.la corosync_quorumtool_LDADD = $(LIBQB_LIBS) \ $(top_builddir)/lib/libcmap.la \ $(top_builddir)/lib/libcfg.la \ $(top_builddir)/lib/libquorum.la \ - $(top_builddir)/lib/libvotequorum.la + $(top_builddir)/lib/libvotequorum.la \ + $(top_builddir)/common_lib/libcorosync_common.la corosync_notifyd_CFLAGS = $(DBUS_CFLAGS) $(libsystemd_CFLAGS) corosync_notifyd_LDADD = $(LIBQB_LIBS) $(DBUS_LIBS) $(SNMP_LIBS) \ $(libsystemd_LIBS) \ $(top_builddir)/lib/libcmap.la \ $(top_builddir)/lib/libcfg.la \ - $(top_builddir)/lib/libquorum.la + $(top_builddir)/lib/libquorum.la \ + $(top_builddir)/common_lib/libcorosync_common.la lint: -splint $(LINT_FLAGS) $(DBUS_CFLAGS) $(CPPFLAGS) $(CFLAGS) *.c diff -Nru corosync-3.1.2/tools/Makefile.in corosync-3.1.6/tools/Makefile.in --- corosync-3.1.2/tools/Makefile.in 2021-04-06 10:03:24.000000000 +0000 +++ corosync-3.1.6/tools/Makefile.in 2021-11-15 10:12:54.000000000 +0000 @@ -140,6 +140,7 @@ corosync_cfgtool_OBJECTS = $(am_corosync_cfgtool_OBJECTS) am__DEPENDENCIES_1 = corosync_cfgtool_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(top_builddir)/common_lib/libcorosync_common.la \ $(top_builddir)/lib/libcfg.la $(top_builddir)/lib/libcmap.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -148,11 +149,13 @@ corosync_cmapctl_SOURCES = corosync-cmapctl.c corosync_cmapctl_OBJECTS = corosync-cmapctl.$(OBJEXT) corosync_cmapctl_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(top_builddir)/common_lib/libcorosync_common.la \ $(top_builddir)/lib/libcmap.la corosync_cpgtool_SOURCES = corosync-cpgtool.c corosync_cpgtool_OBJECTS = corosync-cpgtool.$(OBJEXT) corosync_cpgtool_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/libcfg.la $(top_builddir)/lib/libcpg.la + $(top_builddir)/lib/libcfg.la $(top_builddir)/lib/libcpg.la \ + $(top_builddir)/common_lib/libcorosync_common.la corosync_keygen_SOURCES = corosync-keygen.c corosync_keygen_OBJECTS = corosync-keygen.$(OBJEXT) corosync_keygen_LDADD = $(LDADD) @@ -162,7 +165,8 @@ corosync_notifyd_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(top_builddir)/lib/libcmap.la \ - $(top_builddir)/lib/libcfg.la $(top_builddir)/lib/libquorum.la + $(top_builddir)/lib/libcfg.la $(top_builddir)/lib/libquorum.la \ + $(top_builddir)/common_lib/libcorosync_common.la corosync_notifyd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(corosync_notifyd_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ @@ -173,7 +177,8 @@ corosync_quorumtool_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(top_builddir)/lib/libcmap.la $(top_builddir)/lib/libcfg.la \ $(top_builddir)/lib/libquorum.la \ - $(top_builddir)/lib/libvotequorum.la + $(top_builddir)/lib/libvotequorum.la \ + $(top_builddir)/common_lib/libcorosync_common.la am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -436,23 +441,28 @@ corosync_cfgtool_SOURCES = corosync-cfgtool.c util.c corosync_quorumtool_SOURCES = corosync-quorumtool.c util.c -corosync_cmapctl_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcmap.la -corosync_cfgtool_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcfg.la $(top_builddir)/lib/libcmap.la +corosync_cmapctl_LDADD = $(LIBQB_LIBS) $(top_builddir)/common_lib/libcorosync_common.la $(top_builddir)/lib/libcmap.la +corosync_cfgtool_LDADD = $(LIBQB_LIBS) $(top_builddir)/common_lib/libcorosync_common.la \ + $(top_builddir)/lib/libcfg.la $(top_builddir)/lib/libcmap.la + corosync_cpgtool_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcfg.la \ - $(top_builddir)/lib/libcpg.la + $(top_builddir)/lib/libcpg.la \ + $(top_builddir)/common_lib/libcorosync_common.la corosync_quorumtool_LDADD = $(LIBQB_LIBS) \ $(top_builddir)/lib/libcmap.la \ $(top_builddir)/lib/libcfg.la \ $(top_builddir)/lib/libquorum.la \ - $(top_builddir)/lib/libvotequorum.la + $(top_builddir)/lib/libvotequorum.la \ + $(top_builddir)/common_lib/libcorosync_common.la corosync_notifyd_CFLAGS = $(DBUS_CFLAGS) $(libsystemd_CFLAGS) corosync_notifyd_LDADD = $(LIBQB_LIBS) $(DBUS_LIBS) $(SNMP_LIBS) \ $(libsystemd_LIBS) \ $(top_builddir)/lib/libcmap.la \ $(top_builddir)/lib/libcfg.la \ - $(top_builddir)/lib/libquorum.la + $(top_builddir)/lib/libquorum.la \ + $(top_builddir)/common_lib/libcorosync_common.la all: all-am diff -Nru corosync-3.1.2/.version corosync-3.1.6/.version --- corosync-3.1.2/.version 2021-04-06 10:03:42.000000000 +0000 +++ corosync-3.1.6/.version 2021-11-15 10:13:15.000000000 +0000 @@ -1 +1 @@ -3.1.2 +3.1.6 diff -Nru corosync-3.1.2/vqsim/Makefile.am corosync-3.1.6/vqsim/Makefile.am --- corosync-3.1.2/vqsim/Makefile.am 2021-03-11 13:42:58.000000000 +0000 +++ corosync-3.1.6/vqsim/Makefile.am 2021-09-13 07:15:12.000000000 +0000 @@ -38,11 +38,14 @@ bin_PROGRAMS = corosync-vqsim +corosync_vqsim_CFLAGS = $(knet_CFLAGS) + corosync_vqsim_LDADD = $(top_builddir)/common_lib/libcorosync_common.la \ ../exec/corosync-votequorum.o ../exec/corosync-icmap.o \ ../exec/corosync-coroparse.o ../exec/corosync-logconfig.o \ ../exec/corosync-util.o ../exec/corosync-logsys.o \ - $(LIBQB_LIBS) + $(LIBQB_LIBS) $(knet_LIBS) + if VQSIM_READLINE corosync_vqsim_LDADD += -lreadline endif diff -Nru corosync-3.1.2/vqsim/Makefile.in corosync-3.1.6/vqsim/Makefile.in --- corosync-3.1.2/vqsim/Makefile.in 2021-04-06 10:03:24.000000000 +0000 +++ corosync-3.1.6/vqsim/Makefile.in 2021-11-15 10:12:54.000000000 +0000 @@ -135,15 +135,21 @@ PROGRAMS = $(bin_PROGRAMS) am__corosync_vqsim_SOURCES_DIST = vqmain.c parser.c vq_object.c \ vqsim_vq_engine.c -@BUILD_VQSIM_TRUE@am_corosync_vqsim_OBJECTS = vqmain.$(OBJEXT) \ -@BUILD_VQSIM_TRUE@ parser.$(OBJEXT) vq_object.$(OBJEXT) \ -@BUILD_VQSIM_TRUE@ vqsim_vq_engine.$(OBJEXT) +@BUILD_VQSIM_TRUE@am_corosync_vqsim_OBJECTS = \ +@BUILD_VQSIM_TRUE@ corosync_vqsim-vqmain.$(OBJEXT) \ +@BUILD_VQSIM_TRUE@ corosync_vqsim-parser.$(OBJEXT) \ +@BUILD_VQSIM_TRUE@ corosync_vqsim-vq_object.$(OBJEXT) \ +@BUILD_VQSIM_TRUE@ corosync_vqsim-vqsim_vq_engine.$(OBJEXT) corosync_vqsim_OBJECTS = $(am_corosync_vqsim_OBJECTS) am__DEPENDENCIES_1 = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = +corosync_vqsim_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(corosync_vqsim_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -367,6 +373,7 @@ top_srcdir = @top_srcdir@ MAINTAINERCLEANFILES = Makefile.in @BUILD_VQSIM_TRUE@noinst_HEADERS = vqsim.h +@BUILD_VQSIM_TRUE@corosync_vqsim_CFLAGS = $(knet_CFLAGS) @BUILD_VQSIM_TRUE@corosync_vqsim_LDADD = $(top_builddir)/common_lib/libcorosync_common.la \ @BUILD_VQSIM_TRUE@ ../exec/corosync-votequorum.o \ @BUILD_VQSIM_TRUE@ ../exec/corosync-icmap.o \ @@ -374,7 +381,7 @@ @BUILD_VQSIM_TRUE@ ../exec/corosync-logconfig.o \ @BUILD_VQSIM_TRUE@ ../exec/corosync-util.o \ @BUILD_VQSIM_TRUE@ ../exec/corosync-logsys.o $(LIBQB_LIBS) \ -@BUILD_VQSIM_TRUE@ $(am__append_1) +@BUILD_VQSIM_TRUE@ $(knet_LIBS) $(am__append_1) @BUILD_VQSIM_TRUE@corosync_vqsim_DEPENDENCIES = $(top_builddir)/common_lib/libcorosync_common.la @BUILD_VQSIM_TRUE@corosync_vqsim_SOURCES = vqmain.c parser.c vq_object.c vqsim_vq_engine.c all: all-am @@ -463,7 +470,7 @@ corosync-vqsim$(EXEEXT): $(corosync_vqsim_OBJECTS) $(corosync_vqsim_DEPENDENCIES) $(EXTRA_corosync_vqsim_DEPENDENCIES) @rm -f corosync-vqsim$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(corosync_vqsim_OBJECTS) $(corosync_vqsim_LDADD) $(LIBS) + $(AM_V_CCLD)$(corosync_vqsim_LINK) $(corosync_vqsim_OBJECTS) $(corosync_vqsim_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -471,10 +478,10 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vq_object.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vqmain.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vqsim_vq_engine.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/corosync_vqsim-parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/corosync_vqsim-vq_object.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/corosync_vqsim-vqmain.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/corosync_vqsim-vqsim_vq_engine.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -497,6 +504,62 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +corosync_vqsim-vqmain.o: vqmain.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -MT corosync_vqsim-vqmain.o -MD -MP -MF $(DEPDIR)/corosync_vqsim-vqmain.Tpo -c -o corosync_vqsim-vqmain.o `test -f 'vqmain.c' || echo '$(srcdir)/'`vqmain.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/corosync_vqsim-vqmain.Tpo $(DEPDIR)/corosync_vqsim-vqmain.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vqmain.c' object='corosync_vqsim-vqmain.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -c -o corosync_vqsim-vqmain.o `test -f 'vqmain.c' || echo '$(srcdir)/'`vqmain.c + +corosync_vqsim-vqmain.obj: vqmain.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -MT corosync_vqsim-vqmain.obj -MD -MP -MF $(DEPDIR)/corosync_vqsim-vqmain.Tpo -c -o corosync_vqsim-vqmain.obj `if test -f 'vqmain.c'; then $(CYGPATH_W) 'vqmain.c'; else $(CYGPATH_W) '$(srcdir)/vqmain.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/corosync_vqsim-vqmain.Tpo $(DEPDIR)/corosync_vqsim-vqmain.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vqmain.c' object='corosync_vqsim-vqmain.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -c -o corosync_vqsim-vqmain.obj `if test -f 'vqmain.c'; then $(CYGPATH_W) 'vqmain.c'; else $(CYGPATH_W) '$(srcdir)/vqmain.c'; fi` + +corosync_vqsim-parser.o: parser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -MT corosync_vqsim-parser.o -MD -MP -MF $(DEPDIR)/corosync_vqsim-parser.Tpo -c -o corosync_vqsim-parser.o `test -f 'parser.c' || echo '$(srcdir)/'`parser.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/corosync_vqsim-parser.Tpo $(DEPDIR)/corosync_vqsim-parser.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parser.c' object='corosync_vqsim-parser.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -c -o corosync_vqsim-parser.o `test -f 'parser.c' || echo '$(srcdir)/'`parser.c + +corosync_vqsim-parser.obj: parser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -MT corosync_vqsim-parser.obj -MD -MP -MF $(DEPDIR)/corosync_vqsim-parser.Tpo -c -o corosync_vqsim-parser.obj `if test -f 'parser.c'; then $(CYGPATH_W) 'parser.c'; else $(CYGPATH_W) '$(srcdir)/parser.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/corosync_vqsim-parser.Tpo $(DEPDIR)/corosync_vqsim-parser.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parser.c' object='corosync_vqsim-parser.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -c -o corosync_vqsim-parser.obj `if test -f 'parser.c'; then $(CYGPATH_W) 'parser.c'; else $(CYGPATH_W) '$(srcdir)/parser.c'; fi` + +corosync_vqsim-vq_object.o: vq_object.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -MT corosync_vqsim-vq_object.o -MD -MP -MF $(DEPDIR)/corosync_vqsim-vq_object.Tpo -c -o corosync_vqsim-vq_object.o `test -f 'vq_object.c' || echo '$(srcdir)/'`vq_object.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/corosync_vqsim-vq_object.Tpo $(DEPDIR)/corosync_vqsim-vq_object.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vq_object.c' object='corosync_vqsim-vq_object.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -c -o corosync_vqsim-vq_object.o `test -f 'vq_object.c' || echo '$(srcdir)/'`vq_object.c + +corosync_vqsim-vq_object.obj: vq_object.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -MT corosync_vqsim-vq_object.obj -MD -MP -MF $(DEPDIR)/corosync_vqsim-vq_object.Tpo -c -o corosync_vqsim-vq_object.obj `if test -f 'vq_object.c'; then $(CYGPATH_W) 'vq_object.c'; else $(CYGPATH_W) '$(srcdir)/vq_object.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/corosync_vqsim-vq_object.Tpo $(DEPDIR)/corosync_vqsim-vq_object.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vq_object.c' object='corosync_vqsim-vq_object.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -c -o corosync_vqsim-vq_object.obj `if test -f 'vq_object.c'; then $(CYGPATH_W) 'vq_object.c'; else $(CYGPATH_W) '$(srcdir)/vq_object.c'; fi` + +corosync_vqsim-vqsim_vq_engine.o: vqsim_vq_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -MT corosync_vqsim-vqsim_vq_engine.o -MD -MP -MF $(DEPDIR)/corosync_vqsim-vqsim_vq_engine.Tpo -c -o corosync_vqsim-vqsim_vq_engine.o `test -f 'vqsim_vq_engine.c' || echo '$(srcdir)/'`vqsim_vq_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/corosync_vqsim-vqsim_vq_engine.Tpo $(DEPDIR)/corosync_vqsim-vqsim_vq_engine.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vqsim_vq_engine.c' object='corosync_vqsim-vqsim_vq_engine.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -c -o corosync_vqsim-vqsim_vq_engine.o `test -f 'vqsim_vq_engine.c' || echo '$(srcdir)/'`vqsim_vq_engine.c + +corosync_vqsim-vqsim_vq_engine.obj: vqsim_vq_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -MT corosync_vqsim-vqsim_vq_engine.obj -MD -MP -MF $(DEPDIR)/corosync_vqsim-vqsim_vq_engine.Tpo -c -o corosync_vqsim-vqsim_vq_engine.obj `if test -f 'vqsim_vq_engine.c'; then $(CYGPATH_W) 'vqsim_vq_engine.c'; else $(CYGPATH_W) '$(srcdir)/vqsim_vq_engine.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/corosync_vqsim-vqsim_vq_engine.Tpo $(DEPDIR)/corosync_vqsim-vqsim_vq_engine.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vqsim_vq_engine.c' object='corosync_vqsim-vqsim_vq_engine.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(corosync_vqsim_CFLAGS) $(CFLAGS) -c -o corosync_vqsim-vqsim_vq_engine.obj `if test -f 'vqsim_vq_engine.c'; then $(CYGPATH_W) 'vqsim_vq_engine.c'; else $(CYGPATH_W) '$(srcdir)/vqsim_vq_engine.c'; fi` + mostlyclean-libtool: -rm -f *.lo