You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by dc...@apache.org on 2020/08/26 22:11:03 UTC
[cassandra-dtest] branch master updated: Resolve JMX output
inconsistencies from CASSANDRA-7544 storage-port-configurable-per-node
This is an automated email from the ASF dual-hosted git repository.
dcapwell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
The following commit(s) were added to refs/heads/master by this push:
new 36e2514 Resolve JMX output inconsistencies from CASSANDRA-7544 storage-port-configurable-per-node
36e2514 is described below
commit 36e25140a013843faf91be938c3301495957ed1d
Author: Jon Meredith <Jon Meredith>
AuthorDate: Wed Aug 26 12:57:07 2020 -0700
Resolve JMX output inconsistencies from CASSANDRA-7544 storage-port-configurable-per-node
patch by Jon Meredith; reviewed by David Capwell for CASSANDRA-15937
---
replace_address_test.py | 23 +++++++++++------------
secondary_indexes_test.py | 2 +-
snitch_test.py | 24 +++++++++++++++---------
3 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/replace_address_test.py b/replace_address_test.py
index 0a34ac8..18b01a3 100644
--- a/replace_address_test.py
+++ b/replace_address_test.py
@@ -158,15 +158,14 @@ class BaseReplaceAddressTest(Tester):
def _verify_replacement(self, node, same_address):
if not same_address:
if self.cluster.cassandra_version() >= '2.2.7':
- address_prefix = '' if self.cluster.cassandra_version() >= '4.0' else '/'
- node.watch_log_for("Node {}{} is replacing {}{}"
- .format(address_prefix, self.replacement_node.address_for_current_version(),
- address_prefix, self.replaced_node.address_for_current_version()),
+ node.watch_log_for("Node {} is replacing {}"
+ .format(self.replacement_node.address_for_current_version_slashy(),
+ self.replaced_node.address_for_current_version_slashy()),
timeout=60, filename='debug.log')
- node.watch_log_for("Node {}{} will complete replacement of {}{} for tokens"
- .format(address_prefix, self.replacement_node.address_for_current_version(),
- address_prefix, self.replaced_node.address_for_current_version()), timeout=10)
- node.watch_log_for("removing endpoint {}{}".format(address_prefix, self.replaced_node.address_for_current_version()),
+ node.watch_log_for("Node {} will complete replacement of {} for tokens"
+ .format(self.replacement_node.address_for_current_version_slashy(),
+ self.replaced_node.address_for_current_version_slashy()), timeout=10)
+ node.watch_log_for("removing endpoint {}".format(self.replaced_node.address_for_current_version_slashy()),
timeout=60, filename='debug.log')
else:
node.watch_log_for("between /{} and /{}; /{} is the new owner"
@@ -183,8 +182,8 @@ class BaseReplaceAddressTest(Tester):
num_tokens = int(self.replacement_node.get_conf_option('num_tokens'))
logger.debug("Verifying {} tokens migrated successfully".format(num_tokens))
- replmnt_address = ("/" + self.replacement_node.address()) if self.cluster.version() < '4.0' else self.replacement_node.address_and_port()
- repled_address = ("/" + self.replaced_node.address()) if self.cluster.version() < '4.0' else self.replaced_node.address_and_port()
+ replmnt_address = self.replacement_node.address_for_current_version_slashy()
+ repled_address = self.replaced_node.address_for_current_version_slashy()
token_ownership_log = r"Token (.*?) changing ownership from {} to {}".format(repled_address,
replmnt_address)
logs = self.replacement_node.grep_log(token_ownership_log)
@@ -324,7 +323,7 @@ class TestReplaceAddress(BaseReplaceAddressTest):
self._do_replace(replace_address='127.0.0.5', wait_for_binary_proto=False)
logger.debug("Waiting for replace to fail")
- node_log_str = "/127.0.0.5" if self.cluster.version() < '4.0' else "127.0.0.5:7000"
+ node_log_str = "/127.0.0.5" if self.cluster.version() < '4.0' else "/127.0.0.5:7000"
self.replacement_node.watch_log_for("java.lang.RuntimeException: Cannot replace_address "
+ node_log_str + " because it doesn't exist in gossip")
assert_not_running(self.replacement_node)
@@ -509,7 +508,7 @@ class TestReplaceAddress(BaseReplaceAddressTest):
self.replacement_node.stop()
logger.debug("Waiting other nodes to detect node stopped")
- node_log_str = ("/" + self.replacement_node.address()) if self.cluster.version() < '4.0' else self.replacement_node.address_and_port()
+ node_log_str = self.replacement_node.address_for_current_version_slashy()
self.query_node.watch_log_for("FatClient {} has been silent for 30000ms, removing from gossip".format(node_log_str), timeout=120)
self.query_node.watch_log_for("Node {} failed during replace.".format(node_log_str), timeout=120, filename='debug.log')
diff --git a/secondary_indexes_test.py b/secondary_indexes_test.py
index 6b8ab3e..a447bf9 100644
--- a/secondary_indexes_test.py
+++ b/secondary_indexes_test.py
@@ -1165,7 +1165,7 @@ class TestPreJoinCallback(Tester):
r'Streaming error occurred',
r'\[Stream.*\] Streaming error occurred',
r'\[Stream.*\] Remote peer 127.0.0.\d failed stream session',
- r'\[Stream.*\] Remote peer 127.0.0.\d:7000 failed stream session',
+ r'\[Stream.*\] Remote peer /127.0.0.\d:7000 failed stream session',
r'Error while waiting on bootstrap to complete. Bootstrap will have to be restarted.'
]
diff --git a/snitch_test.py b/snitch_test.py
index 8aa3288..03b09c8 100644
--- a/snitch_test.py
+++ b/snitch_test.py
@@ -43,6 +43,9 @@ class TestGossipingPropertyFileSnitch(Tester):
NODE1_40_LISTEN_ADDRESS = '127.0.0.1:7000'
NODE1_40_BROADCAST_ADDRESS = '127.0.0.3:7000'
+ NODE1_40_LISTEN_FMT_ADDRESS = '/127.0.0.1:7000'
+ NODE1_40_BROADCAST_FMT_ADDRESS = '/127.0.0.3:7000'
+
NODE2_LISTEN_ADDRESS = '127.0.0.2'
NODE2_BROADCAST_ADDRESS = '127.0.0.4'
@@ -52,6 +55,9 @@ class TestGossipingPropertyFileSnitch(Tester):
NODE2_40_LISTEN_ADDRESS = '127.0.0.2:7000'
NODE2_40_BROADCAST_ADDRESS = '127.0.0.4:7000'
+ NODE2_40_LISTEN_FMT_ADDRESS = '/127.0.0.2:7000'
+ NODE2_40_BROADCAST_FMT_ADDRESS = '/127.0.0.4:7000'
+
STORAGE_PORT = 7000
cluster = self.cluster
@@ -75,8 +81,8 @@ class TestGossipingPropertyFileSnitch(Tester):
node1.start(wait_for_binary_proto=True)
if running40:
- node1.watch_log_for("Listening on address: \({}:{}\)".format(NODE1_40_LISTEN_ADDRESS[:-5], STORAGE_PORT), timeout=60)
- node1.watch_log_for("Listening on address: \({}:{}\)".format(NODE1_40_BROADCAST_ADDRESS[:-5], STORAGE_PORT), timeout=60)
+ node1.watch_log_for("Listening on address: \({}:{}\)".format(NODE1_40_LISTEN_FMT_ADDRESS[:-5], STORAGE_PORT), timeout=60)
+ node1.watch_log_for("Listening on address: \({}:{}\)".format(NODE1_40_BROADCAST_FMT_ADDRESS[:-5], STORAGE_PORT), timeout=60)
else:
node1.watch_log_for("Starting Messaging Service on {}:{}".format(NODE1_LISTEN_FMT_ADDRESS, STORAGE_PORT), timeout=60)
node1.watch_log_for("Starting Messaging Service on {}:{}".format(NODE1_BROADCAST_FMT_ADDRESS, STORAGE_PORT), timeout=60)
@@ -93,8 +99,8 @@ class TestGossipingPropertyFileSnitch(Tester):
node2.start(wait_for_binary_proto=True, wait_other_notice=False)
if running40:
- node2.watch_log_for("Listening on address: \({}:{}\)".format(NODE2_40_LISTEN_ADDRESS[:-5], STORAGE_PORT), timeout=60)
- node2.watch_log_for("Listening on address: \({}:{}\)".format(NODE2_40_BROADCAST_ADDRESS[:-5], STORAGE_PORT), timeout=60)
+ node2.watch_log_for("Listening on address: \({}:{}\)".format(NODE2_40_LISTEN_FMT_ADDRESS[:-5], STORAGE_PORT), timeout=60)
+ node2.watch_log_for("Listening on address: \({}:{}\)".format(NODE2_40_BROADCAST_FMT_ADDRESS[:-5], STORAGE_PORT), timeout=60)
else:
node2.watch_log_for("Starting Messaging Service on {}:{}".format(NODE2_LISTEN_FMT_ADDRESS, STORAGE_PORT), timeout=60)
node2.watch_log_for("Starting Messaging Service on {}:{}".format(NODE2_BROADCAST_FMT_ADDRESS, STORAGE_PORT), timeout=60)
@@ -106,10 +112,10 @@ class TestGossipingPropertyFileSnitch(Tester):
reconnectFmtString = "Ini?tiated reconnect to an Internal IP {} for the {}"
if node1.get_base_cassandra_version() >= 3.10:
reconnectFmtString = "Initiated reconnect to an Internal IP {} for the {}"
- node1.watch_log_for(reconnectFmtString.format(NODE2_40_LISTEN_ADDRESS if running40 else NODE2_LISTEN_FMT_ADDRESS,
- NODE2_40_BROADCAST_ADDRESS if running40 else NODE2_BROADCAST_FMT_ADDRESS), filename='debug.log', timeout=60)
- node2.watch_log_for(reconnectFmtString.format(NODE1_40_LISTEN_ADDRESS if running40 else NODE1_LISTEN_FMT_ADDRESS,
- NODE1_40_BROADCAST_ADDRESS if running40 else NODE1_BROADCAST_FMT_ADDRESS), filename='debug.log', timeout=60)
+ node1.watch_log_for(reconnectFmtString.format(NODE2_40_LISTEN_FMT_ADDRESS if running40 else NODE2_LISTEN_FMT_ADDRESS,
+ NODE2_40_BROADCAST_FMT_ADDRESS if running40 else NODE2_BROADCAST_FMT_ADDRESS), filename='debug.log', timeout=60)
+ node2.watch_log_for(reconnectFmtString.format(NODE1_40_LISTEN_FMT_ADDRESS if running40 else NODE1_LISTEN_FMT_ADDRESS,
+ NODE1_40_BROADCAST_FMT_ADDRESS if running40 else NODE1_BROADCAST_FMT_ADDRESS), filename='debug.log', timeout=60)
# read data from node2 just to make sure data and connectivity is OK
session = self.patient_exclusive_cql_connection(node2)
@@ -126,7 +132,7 @@ class TestGossipingPropertyFileSnitch(Tester):
assert "INTERNAL_IP:{}:{}".format('9' if running40 else '6', NODE2_LISTEN_ADDRESS) in out
if running40:
assert "INTERNAL_ADDRESS_AND_PORT:7:{}".format(NODE1_40_LISTEN_ADDRESS) in out
- assert "INTERNAL_ADDRESS_AND_PORT:7:{}".format(NODE1_40_LISTEN_ADDRESS) in out
+ assert "INTERNAL_ADDRESS_AND_PORT:7:{}".format(NODE2_40_LISTEN_ADDRESS) in out
class TestDynamicEndpointSnitch(Tester):
@pytest.mark.resource_intensive
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org