Skip to content
4 changes: 4 additions & 0 deletions src/expb/configs/scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ class Scenario(BaseModel):
description="Extra commands to run in the execution client docker container during the test execution.",
default=[],
)
security_opt: list[str] = Field(
description="Docker security options for the execution client container (e.g., seccomp=unconfined).",
default=[],
)

@field_validator("client", mode="before")
@classmethod
Expand Down
9 changes: 6 additions & 3 deletions src/expb/payloads/executor/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ def start_execution_client(
run_kwargs["cpuset_cpus"] = self.config.resources.cpuset
if self.config.resources and self.config.resources.mem_swappiness is not None:
run_kwargs["mem_swappiness"] = self.config.resources.mem_swappiness
if self.config.execution_client_security_opt:
run_kwargs["security_opt"] = self.config.execution_client_security_opt
container = self.config.docker_client.containers.run(**run_kwargs)
return container

Expand Down Expand Up @@ -1029,9 +1031,10 @@ def cleanup_scenario(
)
execution_client_container.reload()
execution_client_volumes = execution_client_container.attrs["Mounts"]
execution_client_container.stop(
timeout=60 if self._dottrace_active else 5
)
# Give execution client 120s after SIGTERM to flush data (e.g. PGO
# profiles via WritePGOData, RocksDB flush, and dotTrace snapshot
# writes) before Docker sends SIGKILL (default 10s)
execution_client_container.stop(timeout=120)
logs_file = (
self.config.outputs_dir
/ f"{self.config.get_execution_client_name()}.log"
Expand Down
1 change: 1 addition & 0 deletions src/expb/payloads/executor/executor_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def __init__(
scenario.extra_volumes
)
self.execution_client_extra_commands = scenario.extra_commands
self.execution_client_security_opt = scenario.security_opt

# Executor Additional Tooling config
## Docker client
Expand Down
Loading