Created
May 22, 2014 11:43
-
-
Save adrianlzt/78ab542793d09197bd6a to your computer and use it in GitHub Desktop.
Testing IPaddr2 bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # https://github.com/ClusterLabs/resource-agents/pull/320 | |
| # Script to try to reproduce the bug | |
| while true; do | |
| PRE=$(</proc/net/dev) | |
| STDOUT=$(/bin/bash /usr/lib/ocf/lib/heartbeat/findif.sh 2>&1) | |
| if [[ $? != 0 ]]; then | |
| echo "Before /proc/net/dev" > /tmp/bug-resource-agents | |
| echo "$PRE" >> /tmp/bug-resource-agents | |
| echo -e "\n\nError" >> /tmp/bug-resource-agents | |
| echo "$STDOUT" >> /tmp/bug-resource-agents | |
| echo -e "\n\nAfter /proc/net/dev" >> /tmp/bug-resource-agents | |
| cat /proc/net/dev >> /tmp/bug-resource-agents | |
| echo "Testing findif" | mail -s "Reproduced pacemaker error" -c "xxxx@xxx.com" -a /tmp/bug-resource-agents yyyy@yyyy.com | |
| fi | |
| sleep 1 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment