fix e2e services for vagrant

This commit is contained in:
Rajat Chopra
2015-02-06 18:34:27 -08:00
parent b61ea1bbf1
commit a9d8713db4
2 changed files with 16 additions and 3 deletions

View File

@@ -268,6 +268,10 @@ function find-vagrant-name-by-ip {
# Find the vagrant machien name based on the host name of the minion
function find-vagrant-name-by-minion-name {
local ip="$1"
if [[ "$ip" == "${INSTANCE_PREFIX}-master" ]]; then
echo "master"
return $?
fi
local ip_pattern="${INSTANCE_PREFIX}-minion-(.*)"
[[ $ip =~ $ip_pattern ]] || {
@@ -291,7 +295,7 @@ function ssh-to-node {
return 1
}
vagrant ssh "${machine}" -c "${cmd}" | grep -v "Connection to.*closed"
vagrant ssh "${machine}" -c "${cmd}"
}
# Restart the kube-proxy on a node ($1)
@@ -299,6 +303,11 @@ function restart-kube-proxy {
ssh-to-node "$1" "sudo systemctl restart kube-proxy"
}
# Restart the apiserver
function restart-apiserver {
ssh-to-node "${master}" "sudo systemctl restart kube-apiserver"
}
function setup-monitoring-firewall {
echo "TODO" 1>&2
}