Skip to content

Commit

Permalink
dt/rp: Adds extra CLI args to RedpandaService.start_redpanda
Browse files Browse the repository at this point in the history
and 'restart_nodes'

Signed-off-by: Oren Leiman <[email protected]>
  • Loading branch information
oleiman committed Sep 11, 2024
1 parent 951cc77 commit afe076d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/rptest/services/redpanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down Expand Up @@ -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)

Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit afe076d

Please sign in to comment.