Merge pull request 'fix: force bash for remote kubeadm commands' (#57) from stage into master
Some checks failed
Terraform Apply / Terraform Apply (push) Failing after 10m49s
Some checks failed
Terraform Apply / Terraform Apply (push) Failing after 10m49s
Reviewed-on: #57
This commit was merged in pull request #57.
This commit is contained in:
@@ -79,7 +79,9 @@ populate_nodes() {
|
||||
remote() {
|
||||
local host_ip="$1"
|
||||
local cmd="$2"
|
||||
ssh $SSH_OPTS "$ACTIVE_SSH_USER@$host_ip" "$cmd"
|
||||
local quoted_cmd
|
||||
quoted_cmd="$(printf '%q' "$cmd")"
|
||||
ssh $SSH_OPTS "$ACTIVE_SSH_USER@$host_ip" "bash -lc $quoted_cmd"
|
||||
}
|
||||
|
||||
detect_ssh_user() {
|
||||
|
||||
@@ -89,7 +89,10 @@ reset_node() {
|
||||
local node_name="$1"
|
||||
local node_ip="$2"
|
||||
echo "==> Resetting $node_name ($node_ip)"
|
||||
ssh $SSH_OPTS "$ACTIVE_SSH_USER@$node_ip" "sudo kubeadm reset -f && sudo systemctl stop kubelet && sudo rm -rf /etc/kubernetes /var/lib/etcd /var/lib/cni /etc/cni/net.d"
|
||||
local cmd="sudo kubeadm reset -f && sudo systemctl stop kubelet && sudo rm -rf /etc/kubernetes /var/lib/etcd /var/lib/cni /etc/cni/net.d"
|
||||
local quoted_cmd
|
||||
quoted_cmd="$(printf '%q' "$cmd")"
|
||||
ssh $SSH_OPTS "$ACTIVE_SSH_USER@$node_ip" "bash -lc $quoted_cmd"
|
||||
}
|
||||
|
||||
FIRST_NODE_IP="${NODE_IPS[$(printf '%s\n' "${!NODE_IPS[@]}" | sort -V | head -n1)]}"
|
||||
|
||||
Reference in New Issue
Block a user