mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-25 18:04:58 +01:00
Updated Debugging (markdown)
parent
576cf0c19d
commit
2c14ad8607
30
Debugging.md
30
Debugging.md
@ -9,7 +9,37 @@
|
|||||||
* Reduce network bandwidth between the VMs:
|
* Reduce network bandwidth between the VMs:
|
||||||
* Use https://github.com/thombashi/tcconfig instead of Linux `tc`
|
* Use https://github.com/thombashi/tcconfig instead of Linux `tc`
|
||||||
* `tcset eth0 --rate 100Mbps --direction incoming --src-network 192.168.124.233/32 --overwrite`
|
* `tcset eth0 --rate 100Mbps --direction incoming --src-network 192.168.124.233/32 --overwrite`
|
||||||
|
* Fake zfs errors
|
||||||
|
* Create a wrapper shell script and add its director to the zrepl daemon's `PATH`
|
||||||
|
* Example Script: <details>
|
||||||
|
```
|
||||||
|
root@zrepl-dev-debian-2:[~]: cat mockpath/zfs
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eu
|
||||||
|
args=("$@")
|
||||||
|
|
||||||
|
ZREPL_MOCK_ZFS_PATH=/usr/local/sbin/zfs
|
||||||
|
|
||||||
|
|
||||||
|
#if echo "${args[@]}" | egrep 'list.*snapshot' > /dev/null; then
|
||||||
|
# echo "sleeping ${args[@]}" >> /tmp/mocklog
|
||||||
|
# sleep 700
|
||||||
|
#fi
|
||||||
|
if echo "${args[@]}" | egrep 'recv -s' 2>&1 >/dev/null; then
|
||||||
|
echo foo
|
||||||
|
echo bar 1>&2
|
||||||
|
sleep 10
|
||||||
|
dd bs=1M count=1
|
||||||
|
exit 23
|
||||||
|
#echo "unenced is blocked to be received by this mock" 1>&2
|
||||||
|
#exit 23
|
||||||
|
sleep 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
exec "$ZREPL_MOCK_ZFS_PATH" "${args[@]}"
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
## Memory Leaks & Goroutine Leaks
|
## Memory Leaks & Goroutine Leaks
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user