forked from adhorn/chaos-ssm-documents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlatency-delta-stress.yml
28 lines (28 loc) · 924 Bytes
/
latency-delta-stress.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
schemaVersion: '2.2'
description: Adding latency with delta +- on the network (default eth0)
parameters:
interface:
type: String
description: Specify the interface to add delay to. (Required)
default: eth0
delay:
type: String
description: The delay to add to the interface in milliseconds.
default: "1000"
delta:
type: String
description: The delta +- to add to the delay in milliseconds.
default: "500"
# Adds 1000ms +- 500ms of latency to each packet
duration:
type: String
description: The duration - in minutes - of the attack. (Required)
default: "1"
mainSteps:
- action: aws:runShellScript
name: ChaosLatencyDeltaAttack
inputs:
runCommand:
- echo "tc qdisc del dev {{ interface }} root netem delay {{ delay }}ms {{ delta }}ms" | at now + {{ duration }} minutes
- tc qdisc add dev {{ interface }} root netem delay {{ delay }}ms {{ delta }}ms