Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

democratize restart-apiserver method across clouds #4351

Merged
merged 1 commit into from
Feb 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions cluster/azure/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@ function restart-kube-proxy {
ssh-to-node "$1" "sudo /etc/init.d/kube-proxy restart"
}

# Restart the kube-proxy on the master ($1)
function restart-apiserver {
ssh-to-node "$1" "sudo /etc/init.d/kube-apiserver restart"
}

# Setup monitoring using heapster and InfluxDB
function setup-monitoring-firewall {
echo "not implemented" >/dev/null
Expand Down
5 changes: 5 additions & 0 deletions cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,11 @@ function restart-kube-proxy {
ssh-to-node "$1" "sudo /etc/init.d/kube-proxy restart"
}

# Restart the kube-proxy on a node ($1)
function restart-apiserver {
ssh-to-node "$1" "sudo /etc/init.d/kube-apiserver restart"
}

# Setup monitoring firewalls using heapster and InfluxDB
function setup-monitoring-firewall {
if [[ "${ENABLE_CLUSTER_MONITORING}" != "true" ]]; then
Expand Down
6 changes: 6 additions & 0 deletions cluster/gke/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ function restart-kube-proxy() {
ssh-to-node "$1" "sudo /etc/init.d/kube-proxy restart"
}

# Restart the kube-proxy on master ($1)
function restart-apiserver() {
echo "... in restart-kube-apiserver()" >&2
ssh-to-node "$1" "sudo /etc/init.d/kube-apiserver restart"
}

# Execute after running tests to perform any required clean-up. This is called
# from hack/e2e-test.sh. This calls kube-down, so the cluster still exists when
# this is called.
Expand Down
2 changes: 1 addition & 1 deletion cluster/vagrant/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function restart-kube-proxy {

# Restart the apiserver
function restart-apiserver {
ssh-to-node "${master}" "sudo systemctl restart kube-apiserver"
ssh-to-node "$1" "sudo systemctl restart kube-apiserver"
}

function setup-monitoring-firewall {
Expand Down
6 changes: 1 addition & 5 deletions hack/e2e-suite/services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,7 @@ verify_from_container "${svc3_name}" "${svc3_ip}" "${svc3_port}" \
#
echo "Test 6: Restart the master, make sure portals come back."
echo "Restarting the master"
if [[ "$KUBERNETES_PROVIDER" == "vagrant" ]]; then
restart-apiserver "${master}"
else
ssh-to-node "${master}" "sudo /etc/init.d/kube-apiserver restart"
fi
restart-apiserver "${master}"
sleep 5
echo "Verifying the portals from the host"
wait_for_service_up "${svc3_name}" "${svc3_ip}" "${svc3_port}" \
Expand Down