Created
May 4, 2020 17:47
-
-
Save rbranson/c75a72d0d9bad1c0a9a536682ba2c210 to your computer and use it in GitHub Desktop.
Bash script to kill FoundationDB FDB master process
This file contains 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 | |
status_json=$(fdbcli --exec 'status json') | |
master_addr=$(echo $status_json | jq -r '.cluster.processes[] | select(.roles[].role == "master") | .address') | |
# extra status json stuff workaround to bug in 6.0 where an immediate exit causes the command to not be sent | |
fdbcli --exec "status json; kill; kill $master_addr; status json" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment