scylladb / scylla-ccm

Cassandra Cluster Manager, modified for Scylla
Apache License 2.0
22 stars 65 forks source link

CCM support for native nodetool #547

Closed mykaul closed 8 months ago

mykaul commented 8 months ago

Native (C++) implementation of nodetool is coming (in 6.0). There's a script that redirects to the old Java based nodetool if the command is not available yet in the native tool. I'm unsure - does CCM need to be adjusted for this (see https://github.com/scylladb/scylla-ccm/blob/72f960fecc420227849cbc21db8813f61cd1e9e3/ccmlib/node.py#L830 and on) ?

CC @denesb , @fruch

fruch commented 8 months ago

first path it's looking in is the correct directory where the redirect script exists

    def get_tool(self, toolname):
        candidate_dirs = [
            os.path.join(self.node_install_dir, 'share', 'cassandra', BIN_DIR),
            os.path.join(self.get_tools_java_dir(), BIN_DIR),
            os.path.join(self.get_cqlsh_dir(), BIN_DIR),
        ]
        for candidate_dir in candidate_dirs:
            candidate = shutil.which(toolname, path=candidate_dir)
            if candidate:
                return candidate
        raise ValueError(f"tool {toolname} wasn't found in any path: {candidate_dirs}")

while looking at https://github.com/scylladb/scylladb/issues/16669, I've tried out local and confirmed it's working via the redirect script

mykaul commented 8 months ago

Thanks @fruch - see https://github.com/scylladb/scylladb/issues/16679 - can't explain why the legacy was launched (nor why it crashed of course)

denesb commented 8 months ago

Thanks @fruch - see scylladb/scylladb#16679 - can't explain why the legacy was launched (nor why it crashed of course)

See https://github.com/scylladb/scylladb/issues/16679#issuecomment-1882627708 for why the legacy was launched.

I think we can close this issue, like @fruch explained, CCM should transparently using the nodetool-wrapper script now.

mykaul commented 8 months ago

Thanks @fruch - see scylladb/scylladb#16679 - can't explain why the legacy was launched (nor why it crashed of course)

See scylladb/scylladb#16679 (comment) for why the legacy was launched.

I think we can close this issue, like @fruch explained, CCM should transparently using the nodetool-wrapper script now.

OK, though I feel https://github.com/scylladb/scylladb/issues/16679#issuecomment-1882736963 is still relevant. We hack around what need to be done properly (and users may suffer due to it)