Skip to content

HCD-267: Fix the node UP/DOWN detection for DSE nodes#3

Open
szymon-miezal wants to merge 11 commits intoconverged-cassandrafrom
HCD-267
Open

HCD-267: Fix the node UP/DOWN detection for DSE nodes#3
szymon-miezal wants to merge 11 commits intoconverged-cassandrafrom
HCD-267

Conversation

@szymon-miezal
Copy link
Copy Markdown

@szymon-miezal szymon-miezal commented Feb 13, 2026

The main motivation for this patch is changing the way logs are parsed for node UP/DOWN status.
DSE does not display nodes' addresses with port, thus the tests were failing to parse the logs correctly.

Opportunistically the patch does two more changes:

  • it adds JDK version detection for DSE source installations
  • allows to set the enable_legacy_ssl_storage_port while enabling the inter-node encryption.

Test results: http://10.169.74.112:8081/job/ds-cassandra-build/2104/testReport/
Baseline test results: http://10.169.74.112:8081/job/ds-cassandra-build/10/

self._update_config()

def enable_internode_ssl(self, node_ssl_path):
def enable_internode_ssl(self, node_ssl_path, enable_legacy_ssl_storage_port=False):
Copy link
Copy Markdown
Author

@szymon-miezal szymon-miezal Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A convenient change needed for testing DSE upgrades


if wait_other_notice:
marks = [(node, node.mark_log()) for node in list(self.cluster.nodes.values()) if node.is_live()]
marks = [(node, node.mark_log()) for node in list(self.cluster.nodes.values()) if node.is_live() and node is not self]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there are reason we should be parsing our own logs?

'truststore': os.path.join(self.get_path(), 'internode-truststore.jks'),
'truststore_password': 'cassandra'
'truststore_password': 'cassandra',
'enable_legacy_ssl_storage_port': enable_legacy_ssl_storage_port
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the addition of this flag should be conditional

…tion

- Add support for enable_legacy_ssl_storage_port in internode SSL setup
- Fix address_for_version() to return address:port format for DSE 4.0+
- Override watch_log_for_alive() for DSE-specific log format
- Add watch_log_for_death() method for DSE nodes
- Fix wait_other_notice to exclude self from notification marks
Add enable_legacy_ssl_storage_port only if the caller explicitly asked for it.

if self.cassandra_version() >= '4.0':
# Guard against incompatible settings for <DSE_6.9
if self.getNodeClass() is DseNode and self.version() >= '6.9':
Copy link
Copy Markdown
Member

@michaelsembwever michaelsembwever Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of putting it here and using conditional logic, why not put it in the overridden method in DseCluster.py like

def enable_internode_ssl(self, node_ssl_path, enable_legacy_ssl_storage_port=False):
    if self.version() >= '6.9' and enable_legacy_ssl_storage_port:
        node_ssl_options['enable_legacy_ssl_storage_port'] = enable_legacy_ssl_storage_port
    super().enable_internode_ssl(node_ssl_path, enable_legacy_ssl_storage_port)

(then remove the DseNode import – best this class knows nothing of specific subclasses)

ccmlib/common.py Outdated
Comment on lines +769 to +780
# if we detect DSE then we try to parse VERSION.txt file
if os.path.exists(os.path.join(install_dir, BIN_DIR, 'dse')):
path_to_version = os.path.join(install_dir, 'VERSION.txt')
if os.path.exists(path_to_version):
with open(path_to_version, 'r') as file:
v = file.readline().strip()
if LooseVersion(v) >= LooseVersion('6.9'):
# DSE 6.9 supports only Java 11
return [11]
else:
# it's DSE 6.8 or earlier, only Java 8 is supported
return [8]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not fond of putting dse specific code into common.py (given all the recent effort to modularise the codebase).

my suggested approach to this has been added as a SQUASH commit 4c43a80 . @szymon-miezal , you're feel to accept it or not, but i do think it's the cleaner (more modular) approach. it needs testing, i moved the VERSION.txt parsing to the existing method higher up and earlier in the call chain where i believe it should be done…

@michaelsembwever
Copy link
Copy Markdown
Member

with the changes i've suggested (in the comment and in the added squash commit), to keep dse code out of the base package, i'd would be happy to merge this upstream. if we agree then i'll be happy to create the jira ticket and do the rebase so it's made available immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants