[SCM] Samba Shared Repository - branch master updated
Amitay Isaacs
amitay at samba.org
Fri Jan 3 00:01:04 UTC 2020
The branch, master has been updated
via 9edf15afc21 ctdb-tests: Skip some tests that don't work with IPv6
via 693080abe4d ctdb-scripts: Strip square brackets when gathering connection info
from df5040b1867 Happy New Year 2020!
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 9edf15afc219a1a782ec1e4d29909361bbabc744
Author: Martin Schwenke <martin at meltin.net>
Date: Thu Nov 28 14:00:58 2019 +1100
ctdb-tests: Skip some tests that don't work with IPv6
See the comments added to the tests.
It may be possible to rewrite these so they do something sane for
IPv6... some other time.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14227
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
Autobuild-Date(master): Fri Jan 3 00:00:55 UTC 2020 on sn-devel-184
commit 693080abe4d8bec96280af5a6aa668251a98ec5d
Author: Martin Schwenke <martin at meltin.net>
Date: Fri Dec 13 11:09:04 2019 +1100
ctdb-scripts: Strip square brackets when gathering connection info
ss added square brackets around IPv6 addresses in versions > 4.12.0
via commit aba9c23a6e1cb134840c998df14888dca469a485. CentOS 7 added
this feature somewhere mid-release. So, backward compatibility is
obviously needed.
As per the comment protocol/protocol_util.c should probably print and
parse such square brackets. However, for backward compatibility the
brackets would have to be stripped in both places in
update_tickles()... or added to the ss output when missing. Best to
leave this until we have a connection tracking daemon.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14227
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
-----------------------------------------------------------------------
Summary of changes:
ctdb/config/functions | 6 ++++++
ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh | 7 +++++++
ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh | 11 +++++++++++
3 files changed, 24 insertions(+)
Changeset truncated at 500 lines:
diff --git a/ctdb/config/functions b/ctdb/config/functions
index 994a30162fe..2395d8d4dc8 100755
--- a/ctdb/config/functions
+++ b/ctdb/config/functions
@@ -975,10 +975,16 @@ update_tickles ()
_my_connections="${tickledir}/${_port}.connections.$$"
# Parentheses are needed around the filters for precedence but
# the parentheses can't be empty!
+ #
+ # Recent versions of ss print square brackets around IPv6
+ # addresses. While it is desirable to update CTDB's address
+ # parsing and printing code, something needs to be done here
+ # for backward compatibility, so just delete the brackets.
ss -tn state established \
"${_ip_filter:+( ${_ip_filter} )}" \
"${_port_filter:+( ${_port_filter} )}" |
awk 'NR > 1 {print $4, $3}' |
+ tr -d '][' |
sort >"$_my_connections"
# Record our current tickles in a temporary file
diff --git a/ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh b/ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh
index d168cf22216..efa9ef2b6a1 100755
--- a/ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh
+++ b/ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh
@@ -14,6 +14,13 @@ select_test_node_and_ips
echo "Using $test_ip, which is onnode $test_node"
+# This test depends on being able to assign a duplicate address on a
+# 2nd node. However, IPv6 guards against this and causes the test to
+# fail.
+case "$test_ip" in
+*:*) ctdb_test_skip "This test is not supported for IPv6 addresses" ;;
+esac
+
get_test_ip_mask_and_iface
echo "Finding another node that knows about $test_ip"
diff --git a/ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh b/ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh
index d4fee69c96d..5ee4e544eeb 100755
--- a/ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh
+++ b/ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh
@@ -14,6 +14,17 @@ select_test_node_and_ips
echo "Running test against node $test_node and IP $test_ip"
+# This test puts an address on an interface and then needs to quickly
+# configure that address and cause an IP takeover. However, an IPv6
+# address will be tentative for a while so "quickly" is not possible".
+# When ctdb_control_takeover_ip() calls ctdb_sys_have_ip() it will
+# decide that the address is not present. It then attempts a takeip,
+# which can fail if the address is suddenly present because it is no
+# longer tentative.
+case "$test_ip" in
+*:*) ctdb_test_skip "This test is not supported for IPv6 addresses" ;;
+esac
+
get_test_ip_mask_and_iface
echo "Deleting IP $test_ip from all nodes"
--
Samba Shared Repository
More information about the samba-cvs
mailing list