Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ccmlib/scylla_node.py: use native scylla nodetool when it's available
in b18f85d, we use the native nodetool if JMX is not available, but when running dtest from the local build, the jmx repo is still around, so the java-based nodetool is picked. but the java-based nodetool does not support tablets, and it would be great to always test the native implementation built locally when testing using dtest without building a relocatable package. so, in this change, we go a step further by checking if the command line of `scylla nodetool help` works, if it succeeds, we go ahead and use `scylla nodetool`, otherwise, we fall back to the java-based nodetool. we could instead use `scylla nodetool --help` instead of calling a certain command of nodetool, but seastar returns 1 if `--help` is used. a pull request was created to address it . see scylladb/seastar#2213. also, the native nodetool expect `-h` and `--port` as parameters of the subcommand, not the parameters of `scylla nodetool`, it complains like: ``` E ccmlib.node.ToolError: Subprocess /jenkins/workspace/scylla-master/gating-dtest-release/scylla/.dtest/dtest-7r2n368l/test/node1/bin/scylla nodetool -h 127.0.17.1 -p 10000 snapshot exited with non-zero status; exit status: 100; E stderr: error: unrecognized operation argument: expected one of ({cleanup, compact, disablebackup, disablebinary, disablegossip, enablebackup, enablebinary, enablegossip, flush, gettraceprobability, help, settraceprobability, statusbackup, statusbinary, statusgossip, version}), got --host ``` but the java-based tool looks for these options before the subcommand, so put them conditionally. Signed-off-by: Kefu Chai <[email protected]>
- Loading branch information