search for: inject_eth_fault

Displaying 1 result from an estimated 1 matches for "inject_eth_fault".

2013 Dec 04
1
Testing failover and recovery
...also automated in a testscript like: per at hallsmark.se:~/glusterfs-test$ cat scripts/fault-injection.sh #!/bin/sh # fault injection script tailored for two glusterfs nodes named gs1 and gs2 if [ "$HOSTNAME" == "gs1" ]; then peer="gs2" else peer="gs1" fi inject_eth_fault() { echo "network down..." ifconfig eth0 down sleep 10 ifconfig eth0 up echo "... and network up again." } recover() { echo "recovering from fault..." service glusterd restart } while true; do sleep 60 if [ ! -f /tmp/nofault ]; then if ping -c 1 $peer; then inject_et...