You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2025/09/18 09:08:00 UTC

(cassandra-ccm) 01/01: When creating a cluster and validating the jdk, check the cassandra version

This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch mck/fix-install-dir-non-c-java-check
in repository https://gitbox.apache.org/repos/asf/cassandra-ccm.git

commit eaafc4511fe16735ffe380ef70f4d5c3e5ac5006
Author: mck <mc...@apache.org>
AuthorDate: Thu Sep 18 11:05:09 2025 +0200

    When creating a cluster and validating the jdk, check the cassandra version
    
    common.assert_jdk_valid_for_cassandra_version performs the jdk version check based on only cassandra versions
    
     patch by Mick Semb Wever; reviewed by Berenguer Blasi, Szymon Miężał for CASSANDRA-xxx
---
 ccmlib/cmds/cluster_cmds.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ccmlib/cmds/cluster_cmds.py b/ccmlib/cmds/cluster_cmds.py
index 5a240d9..cb774ad 100644
--- a/ccmlib/cmds/cluster_cmds.py
+++ b/ccmlib/cmds/cluster_cmds.py
@@ -128,9 +128,10 @@ class ClusterCreateCmd(Cmd):
                 common.validate_install_dir(options.install_dir)
             except ArgumentError:
                 parser.print_help()
-                parser.error("%s is not a valid cassandra directory. You must define a cassandra dir or version." % options.install_dir)
+                parser.error("%s is not a valid cassandra directory. You must define install-dir or version." % options.install_dir)
 
-            common.assert_jdk_valid_for_cassandra_version(extension.get_cluster_class(options.install_dir).getNodeClass().get_version_from_build(options.install_dir))
+            node_class = extension.get_cluster_class(options.install_dir).getNodeClass()
+            common.assert_jdk_valid_for_cassandra_version(node_class.get_version_from_build(options.install_dir, cassandra=True))
 
         if common.is_win() and os.path.exists('c:\windows\system32\java.exe'):
             print_("""WARN: c:\windows\system32\java.exe exists.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org