-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scylla_node: ignore scylla-tools config files if scylla-tools is missing #618
Conversation
before this change, in `ScyllaNode.copy_config_files()`we always try to copy the jvm settings packaged by scylla-tools-java package, but we plan to drop this package. but if that package is installed, `get_tools_java_dir()` would return `None`. this breaks `copy_config_files()`, like: ``` 21:44:43 Traceback (most recent call last): 21:44:43 File "/jenkins/workspace/scylla-master/gating-dtest-release/scylla/.local/bin/ccm", line 74, in <module> 21:44:43 cmd.run() 21:44:43 File "/jenkins/workspace/scylla-master/gating-dtest-release/scylla/.local/lib/python3.12/site-packages/ccmlib/cmds/cluster_cmds.py", line 269, in run 21:44:43 cluster.populate(self.nodes, self.options.debug, use_vnodes=self.options.vnodes, ipprefix=self.options.ipprefix, ipformat=self.options.ipformat) 21:44:43 File "/jenkins/workspace/scylla-master/gating-dtest-release/scylla/.local/lib/python3.12/site-packages/ccmlib/cluster.py", line 327, in populate 21:44:43 self.new_node(i, debug=debug, initial_token=tk, data_center=dc, rack=rack) 21:44:43 File "/jenkins/workspace/scylla-master/gating-dtest-release/scylla/.local/lib/python3.12/site-packages/ccmlib/cluster.py", line 334, in new_node 21:44:43 node = self.create_node(name=f'node{i}', 21:44:43 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 21:44:43 File "/jenkins/workspace/scylla-master/gating-dtest-release/scylla/.local/lib/python3.12/site-packages/ccmlib/scylla_cluster.py", line 93, in create_node 21:44:43 return ScyllaNode(name, self, auto_bootstrap, None, 21:44:43 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 21:44:43 File "/jenkins/workspace/scylla-master/gating-dtest-release/scylla/.local/lib/python3.12/site-packages/ccmlib/scylla_node.py", line 51, in __init__ 21:44:43 super().__init__(name, cluster, auto_bootstrap, 21:44:43 File "/jenkins/workspace/scylla-master/gating-dtest-release/scylla/.local/lib/python3.12/site-packages/ccmlib/node.py", line 126, in __init__ 21:44:43 self.import_config_files() 21:44:43 File "/jenkins/workspace/scylla-master/gating-dtest-release/scylla/.local/lib/python3.12/site-packages/ccmlib/scylla_node.py", line 975, in import_config_files 21:44:43 self.copy_config_files() 21:44:43 File "/jenkins/workspace/scylla-master/gating-dtest-release/scylla/.local/lib/python3.12/site-packages/ccmlib/scylla_node.py", line 981, in copy_config_files 21:44:43 conf_pattern = os.path.join(self.get_tools_java_dir(), 'conf', "jvm*.options") 21:44:43 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 21:44:43 File "<frozen posixpath>", line 76, in join 21:44:43 TypeError: expected str, bytes or os.PathLike object, not NoneType ``` in this change, we enumerate the directory only if it exists. Fixes scylladb#617 Signed-off-by: Kefu Chai <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Would want to see on gating run with this change (with and without the change of removing java tools) |
Run a staging/BYO dtest job with gating tests Next isn't a place to experiment with |
I am running https://jenkins.scylladb.com/job/scylla-master/job/releng-testing/job/next/1568/ with a custom configuration. |
Or even better https://jenkins.scylladb.com/job/scylla-master/job/releng-testing/job/gating-dtest-release-with-consistent-topology-changes/144/ |
And https://jenkins.scylladb.com/job/scylla-master/job/byo/job/byo_build_tests_dtest/2501/ (which is @syuu1228 branch with @tchaikov branch for ccm) |
@yaronkaikov thank you for verifying the change. |
this BYO job seem to failed cause of spot termination |
Already running again https://jenkins.scylladb.com/job/scylla-master/job/byo/job/byo_build_tests_dtest/2502/ |
I guess it can be merged now |
@fruch ping ? |
before this change, in
ScyllaNode.copy_config_files()
we always try to copy the jvm settings packaged by scylla-tools-java package, but we plan to drop this package. but if that package is installed,get_tools_java_dir()
would returnNone
. this breakscopy_config_files()
, like:in this change, we enumerate the directory only if it exists.
Fixes #617
Signed-off-by: Kefu Chai [email protected]