From afe076ddbdfe0e25665956e25ab9634120310b66 Mon Sep 17 00:00:00 2001 From: Oren Leiman Date: Tue, 20 Aug 2024 16:34:15 -0700 Subject: [PATCH] dt/rp: Adds extra CLI args to `RedpandaService.start_redpanda` and 'restart_nodes' Signed-off-by: Oren Leiman --- tests/rptest/services/redpanda.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/rptest/services/redpanda.py b/tests/rptest/services/redpanda.py index ab43ce2155b6c..c2ce672591ed3 100644 --- a/tests/rptest/services/redpanda.py +++ b/tests/rptest/services/redpanda.py @@ -1395,7 +1395,8 @@ def restart_nodes(self, start_timeout=None, stop_timeout=None, auto_assign_node_id=False, - omit_seeds_on_idx_one=True): + omit_seeds_on_idx_one=True, + extra_cli: list[str] = []): nodes = [nodes] if isinstance(nodes, ClusterNode) else nodes with concurrent.futures.ThreadPoolExecutor( @@ -1412,7 +1413,8 @@ def restart_nodes(self, override_cfg_params=override_cfg_params, timeout=start_timeout, auto_assign_node_id=auto_assign_node_id, - omit_seeds_on_idx_one=omit_seeds_on_idx_one), nodes)) + omit_seeds_on_idx_one=omit_seeds_on_idx_one, + extra_cli=extra_cli), nodes)) def set_extra_rp_conf(self, conf): self._extra_rp_conf = conf @@ -2905,7 +2907,7 @@ def write_tls_certs(self): self._audit_log_config.truststore_file = RedpandaService.TLS_CA_CRT_FILE self._audit_log_config.crl_file = RedpandaService.TLS_CA_CRL_FILE - def start_redpanda(self, node): + def start_redpanda(self, node, extra_cli: list[str] = []): preamble, res_args = self._resource_settings.to_cli( dedicated_node=self._dedicated_nodes) @@ -2927,6 +2929,7 @@ def start_redpanda(self, node): " --abort-on-seastar-bad-alloc " " --dump-memory-diagnostics-on-alloc-failure-kind=all " f" {res_args} " + f" {' '.join(extra_cli)}" f" >> {RedpandaService.STDOUT_STDERR_CAPTURE} 2>&1 &") node.account.ssh(cmd) @@ -3063,7 +3066,8 @@ def start_node(self, auto_assign_node_id: bool = False, omit_seeds_on_idx_one: bool = True, skip_readiness_check: bool = False, - node_id_override: int | None = None): + node_id_override: int | None = None, + extra_cli: list[str] = []): """ Start a single instance of redpanda. This function will not return until redpanda appears to have started successfully. If redpanda does not @@ -3099,7 +3103,7 @@ def start_node(self, ) def start_rp(): - self.start_redpanda(node) + self.start_redpanda(node, extra_cli=extra_cli) if expect_fail: wait_until(