Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/chaos-mesh/chaos-mesh/llms.txt

Use this file to discover all available pages before exploring further.

ChaosDaemon Service

The ChaosDaemon gRPC service provides the low-level interface for executing chaos experiments on target nodes. It runs as a privileged DaemonSet and handles the actual injection of faults into containers.

Service Definition

The ChaosDaemon service is defined in pkg/chaosdaemon/pb/chaosdaemon.proto and provides the following RPC methods:

Network Chaos Methods

SetTcs

Configures traffic control (tc) rules for network chaos.
request
TcsRequest
Request containing tc configurations and target container.
response
google.protobuf.Empty
Empty response on success.

FlushIPSets

Flushes and configures IPSet rules for network filtering.
request
IPSetsRequest
Request containing IPSet configurations.
response
google.protobuf.Empty
Empty response on success.

SetIptablesChains

Configures iptables chains for network filtering and manipulation.
request
IptablesChainsRequest
Request containing iptables chain configurations.
response
google.protobuf.Empty
Empty response on success.

Time Chaos Methods

SetTimeOffset

Applies time offset to target containers.
request
TimeRequest
Request specifying time offset and target container.
response
google.protobuf.Empty
Empty response on success.

RecoverTimeOffset

Recoves time offset from target containers.
request
TimeRequest
Request specifying target container to recover.
response
google.protobuf.Empty
Empty response on success.

Container Methods

ContainerKill

Kills a target container.
request
ContainerRequest
Request specifying container to kill.
response
google.protobuf.Empty
Empty response on success.

ContainerGetPid

Retrieves the PID of a target container’s main process.
request
ContainerRequest
Request specifying target container.
response
ContainerResponse
Response containing the container’s PID.

Stress Chaos Methods

ExecStressors

Executes stress-ng stressors in target container or pod.
request
ExecStressRequest
Request containing stress configuration (CPU/memory stressors).
response
ExecStressResponse
Response containing instance IDs and start times for tracking.

CancelStressors

Cancels running stress-ng instances.
request
CancelStressRequest
Request specifying stress instances to cancel.
response
google.protobuf.Empty
Empty response on success.

I/O Chaos Methods

ApplyIOChaos

Applies I/O chaos to target container’s volume.
request
ApplyIOChaosRequest
Request containing I/O chaos actions and target volume.
response
ApplyIOChaosResponse
Response containing instance ID and start time for tracking.

HTTP Chaos Methods

ApplyHttpChaos

Applies HTTP chaos rules to target container.
request
ApplyHttpChaosRequest
Request containing HTTP chaos rules and proxy configuration.
response
ApplyHttpChaosResponse
Response containing instance ID, status code, and any errors.

Block Chaos Methods

ApplyBlockChaos

Applies block device chaos (delay) to target volume.
request
ApplyBlockChaosRequest
Request containing block chaos configuration.
response
ApplyBlockChaosResponse
Response containing injection ID for recovery.

RecoverBlockChaos

Recovers from block device chaos.
request
RecoverBlockChaosRequest
Request specifying injection ID to recover.
response
google.protobuf.Empty
Empty response on success.

DNS Chaos Methods

SetDNSServer

Configures custom DNS server for target container.
request
SetDNSServerRequest
Request specifying DNS server and target container.
response
google.protobuf.Empty
Empty response on success.

JVM Chaos Methods

InstallJVMRules

Installs Byteman rules for JVM chaos.
request
InstallJVMRulesRequest
Request containing Byteman rules and target JVM.
response
google.protobuf.Empty
Empty response on success.

UninstallJVMRules

Uninstalls Byteman rules from JVM.
request
UninstallJVMRulesRequest
Request specifying rules to uninstall.
response
google.protobuf.Empty
Empty response on success.

Common Message Types

TimeRequest

container_id
string
Target container ID.
sec
int64
Seconds component of time offset.
nsec
int64
Nanoseconds component of time offset.
clk_ids_mask
uint64
Bitmask of clock IDs to affect.
uid
string
Unique identifier for this injection.
pod_container_name
string
Pod container name for reference.

ExecStressRequest

scope
Scope
Execution scope: CONTAINER or POD.
target
string
Target container or pod identifier.
cpuStressors
string
stress-ng CPU stressor arguments.
memoryStressors
string
stress-ng memory stressor arguments.
oomScoreAdj
int32
OOM score adjustment for stress process.
enterNS
bool
Whether to enter target namespace.

ExecStressResponse

cpuInstance
string
CPU stress instance identifier.
cpuStartTime
int64
CPU stress start timestamp.
memoryInstance
string
Memory stress instance identifier.
memoryStartTime
int64
Memory stress start timestamp.
cpuInstanceUid
string
CPU stress unique identifier.
memoryInstanceUid
string
Memory stress unique identifier.

ApplyIOChaosRequest

actions
string
Serialized JSON of I/O chaos actions.
volume
string
Target volume mount path.
container_id
string
Target container ID.
instance
int64
Instance ID for tracking.
startTime
int64
Start timestamp.
enterNS
bool
Whether to enter target namespace.
instance_uid
string
Unique identifier for this injection.

ApplyIOChaosResponse

instance
int64
Instance ID for recovery.
startTime
int64
Start timestamp.
instance_uid
string
Unique identifier.