Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 5 additions & 1 deletion src/expb/payloads/executor/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,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 @@ -648,7 +650,9 @@ def cleanup_scenario(
)
execution_client_container.reload()
execution_client_volumes = execution_client_container.attrs["Mounts"]
execution_client_container.stop()
# Give execution client 60s after SIGTERM to flush data (e.g. PGO
# profiles via WritePGOData) 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 @@ -62,6 +62,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