From 15579e3dd4f68ad01cf6ba0232564b434c151398 Mon Sep 17 00:00:00 2001 From: mck Date: Fri, 13 Sep 2024 22:00:07 +0200 Subject: [PATCH] Add ability to skip cqlsh, and config collection, commands Using noCqlsh and skipConfig environment variables Also fix cassandraNodes variable when using collector.hosts --- ds-collector/ds-collector | 1 + ds-collector/rust-commands/collect-info.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ds-collector/ds-collector b/ds-collector/ds-collector index baf1d35..4741517 100755 --- a/ds-collector/ds-collector +++ b/ds-collector/ds-collector @@ -1013,6 +1013,7 @@ get_infos() { while read -u10 hostName; do if [[ "$hostName" != \#* ]] && [ "$hostName" ]; then get_info + cassandraNodes="${cassandraNodes} ${hostName}" fi done 10< $hostFile elif [[ ${runOnSingleNode} != "true" ]] && [[ "$hostName" != \#* ]] && [ "$hostName" ]; then diff --git a/ds-collector/rust-commands/collect-info.rs b/ds-collector/rust-commands/collect-info.rs index a5384e8..6c99a08 100644 --- a/ds-collector/rust-commands/collect-info.rs +++ b/ds-collector/rust-commands/collect-info.rs @@ -337,7 +337,7 @@ const COMMANDS: &[Cmd<'static>] = &[ args: "{cqlsh_host} {cqlsh_port} {cqlsh_opts} -f {artifact_dir}/execute_schema.cql", file: "schema.cql", optional: false, - skip_flags: "", + skip_flags: "noCqlsh", use_stdout: true, use_sudo: false, use_timeout: false, @@ -348,7 +348,7 @@ const COMMANDS: &[Cmd<'static>] = &[ args: "{cqlsh_host} {cqlsh_port} {cqlsh_opts} -f {artifact_dir}/execute_metadata.cql", file: "driver/metadata.txt", optional: true, - skip_flags: "", + skip_flags: "noCqlsh", use_stdout: true, use_sudo: false, use_timeout: false, @@ -778,7 +778,7 @@ const COMMANDS: &[Cmd<'static>] = &[ args: "{config_home} {artifact_dir}/conf", file: "", optional: false, - skip_flags: "", + skip_flags: "skipConfig", use_stdout: true, use_sudo: false, use_timeout: false,