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 | |
| set -euo pipefail | |
| HOST_FILE="" | |
| HOSTS=() | |
| usage() { | |
| echo "Usage: $0 [--file <hosts-file>] [hostname ...]" | |
| echo "" | |
| echo "Verifies that hosts are fully removed: no daemons, not in host list, not in crush map." |
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 | |
| set -euo pipefail | |
| POLL_INTERVAL=10 | |
| TIMEOUT=1800 # 30 minutes | |
| HOST_FILE="" | |
| HOSTS=() | |
| MODE="drain" # drain or check | |
| usage() { |
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 | |
| set -euo pipefail | |
| POLL_INTERVAL=10 | |
| TIMEOUT=1800 # 30 minutes | |
| HOST_FILE="" | |
| HOSTS=() | |
| MODE="drain" # drain or check | |
| usage() { |
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 | |
| set -euo pipefail | |
| POLL_INTERVAL=10 | |
| TIMEOUT=1800 # 30 minutes | |
| HOST_FILE="" | |
| HOSTS=() | |
| MODE="drain" # drain or check | |
| usage() { |
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 | |
| set -euo pipefail | |
| HOST_FILE="" | |
| HOSTS=() | |
| usage() { | |
| echo "Usage: $0 [--file <hosts-file>] [hostname ...]" | |
| echo "" | |
| echo "Checks if CRUSH weight is zero for each specified host." |
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 | |
| set -euo pipefail | |
| HOST_FILE="" | |
| HOSTS=() | |
| usage() { | |
| echo "Usage: $0 [--file <hosts-file>] [hostname ...]" | |
| echo "" | |
| echo "Checks if CRUSH weight is zero for each specified host." |
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 | |
| set -e | |
| MASTER=false | |
| for arg in "$@"; do | |
| if [[ "$arg" == "--master" ]]; then | |
| MASTER=true | |
| break | |
| fi | |
| done |
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 | |
| set -e | |
| echo "[1/6] Resetting kubeadm" | |
| kubeadm reset -f || true | |
| echo "[2/6] Stopping services" | |
| systemctl stop kubelet || true | |
| systemctl disable kubelet || true | |
| systemctl stop containerd || true |