summaryrefslogtreecommitdiff
path: root/chaos-at-home
diff options
context:
space:
mode:
Diffstat (limited to 'chaos-at-home')
-rw-r--r--chaos-at-home/ch-epimetheus.yml5
-rw-r--r--chaos-at-home/ch-prometheus.yml11
2 files changed, 14 insertions, 2 deletions
diff --git a/chaos-at-home/ch-epimetheus.yml b/chaos-at-home/ch-epimetheus.yml
index 98eab3e2..148cda82 100644
--- a/chaos-at-home/ch-epimetheus.yml
+++ b/chaos-at-home/ch-epimetheus.yml
@@ -58,8 +58,11 @@
mode: 0755
content: |
#!/bin/bash
+ {% set disk_variables = [] %}
disk_primary=$(basename $(realpath '{{ install.disks.primary }}'))
+ {{ disk_variables.append('$disk_primary') -}}
{% for name,volume in luks_volumes.items() %}
disk_{{ name | replace('-', '_') }}=$(basename $(realpath '{{ volume.device }}'))
+ {{ disk_variables.append('$disk_'+(name | replace('-', '_'))) -}}
{% endfor %}
- exec dstat -cnd -N {{ network.primary.name }} -D "$disk_primary,$disk_{{ luks_volumes | map('replace', '-', '_') | join(',$disk_') }}" --disk-util --top-io --top-bio
+ exec dstat -cnd -N {{ network.primary.name }} -D "{{ disk_variables | join(',') }}" --disk-util --top-io --top-bio
diff --git a/chaos-at-home/ch-prometheus.yml b/chaos-at-home/ch-prometheus.yml
index 62550788..f0545d26 100644
--- a/chaos-at-home/ch-prometheus.yml
+++ b/chaos-at-home/ch-prometheus.yml
@@ -49,4 +49,13 @@
mode: 0755
content: |
#!/bin/bash
- exec dstat -cnd -N enp47s0,bond0 -D nvme0n1,nvme1n1,sda,sdb,sdc --disk-util --top-io --top-bio
+ {% set disk_variables = [] %}
+ {% for disk in install.disks.raid.members %}
+ disk_primary{{ loop.index0 }}=$(basename $(realpath '{{ install.disks.primary }}'))
+ {{ disk_variables.append('$disk_primary'+(loop.index0| string)) -}}
+ {% endfor %}
+ {% for name,volume in luks_volumes.items() %}
+ disk_{{ name | replace('-', '_') }}=$(basename $(realpath '{{ volume.device }}'))
+ {{ disk_variables.append('$disk_'+(name | replace('-', '_'))) -}}
+ {% endfor %}
+ exec dstat -cnd -N {{ network.primary.name }} -D "{{ disk_variables | join(',') }}" --disk-util --top-io --top-bio