From c5ca042ede886ba4075ecbbc9cac9a55a3c255af Mon Sep 17 00:00:00 2001 From: Robert Bailey Date: Fri, 18 Mar 2016 01:49:01 -0700 Subject: [PATCH] Remove the restart-kube-proxy and restart-apiserver functions since neither are used any longer. --- cluster/aws/util.sh | 10 ---------- cluster/gce/util.sh | 14 -------------- cluster/gke/util.sh | 14 +------------- cluster/libvirt-coreos/util.sh | 10 ---------- cluster/mesos/docker/util.sh | 10 ---------- cluster/vagrant/util.sh | 10 ---------- 6 files changed, 1 insertion(+), 67 deletions(-) diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index adb7d7d04a..0ec86ddb3d 100755 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -1601,16 +1601,6 @@ function ssh-to-node { ssh -oLogLevel=quiet -oConnectTimeout=30 -oStrictHostKeyChecking=no -i "${AWS_SSH_KEY}" ${SSH_USER}@${ip} "${cmd}" } -# Restart the kube-proxy on a node ($1) -function restart-kube-proxy { - ssh-to-node "$1" "sudo /etc/init.d/kube-proxy restart" -} - -# Restart the kube-apiserver on a node ($1) -function restart-apiserver { - ssh-to-node "$1" "sudo /etc/init.d/kube-apiserver restart" -} - # Perform preparations required to run e2e tests function prepare-e2e() { # (AWS runs detect-project, I don't think we need to anything) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index ae9add4302..5080d9d6b1 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -1342,20 +1342,6 @@ function ssh-to-node { gcloud compute ssh --ssh-flag="-o LogLevel=quiet" --ssh-flag="-o ConnectTimeout=30" --project "${PROJECT}" --zone="${ZONE}" "${node}" --command "${cmd}" } -# Restart the kube-proxy on a node ($1) -function restart-kube-proxy { - if [[ "${OS_DISTRIBUTION}" == "trusty" ]]; then - ssh-to-node "$1" "sudo initctl restart kube-proxy" - else - ssh-to-node "$1" "sudo /etc/init.d/kube-proxy restart" - fi -} - -# Restart the kube-apiserver on a node ($1) -function restart-apiserver { - ssh-to-node "$1" "sudo docker ps | grep /kube-apiserver | cut -d ' ' -f 1 | xargs sudo docker kill" -} - # Perform preparations required to run e2e tests function prepare-e2e() { detect-project diff --git a/cluster/gke/util.sh b/cluster/gke/util.sh index e2a6e11296..e4a0ebe51f 100755 --- a/cluster/gke/util.sh +++ b/cluster/gke/util.sh @@ -171,7 +171,7 @@ function test-setup() { "${KUBE_ROOT}/cluster/kube-up.sh" detect-nodes >&2 - + # At this point, CLUSTER_NAME should have been used, so its value is final. NODE_TAG=$($GCLOUD compute instances describe ${NODE_NAMES[0]} --project="${PROJECT}" --zone="${ZONE}" | grep -o "gke-${CLUSTER_NAME}-.\{8\}-node" | head -1) OLD_NODE_TAG="k8s-${CLUSTER_NAME}-node" @@ -272,18 +272,6 @@ function ssh-to-node() { gcloud compute ssh --ssh-flag="-o LogLevel=quiet" --ssh-flag="-o ConnectTimeout=30" --project "${PROJECT}" --zone="${ZONE}" "${node}" --command "${cmd}" } -# Restart the kube-proxy on a node ($1) -function restart-kube-proxy() { - echo "... in gke:restart-kube-proxy()" >&2 - ssh-to-node "$1" "sudo /etc/init.d/kube-proxy restart" -} - -# Restart the kube-proxy on master ($1) -function restart-apiserver() { - echo "... in gke:restart-apiserver()" >&2 - ssh-to-node "$1" "sudo docker ps | grep /kube-apiserver | cut -d ' ' -f 1 | xargs sudo docker kill" -} - # Execute after running tests to perform any required clean-up. This is called # from hack/e2e.go. This calls kube-down, so the cluster still exists when this # is called. diff --git a/cluster/libvirt-coreos/util.sh b/cluster/libvirt-coreos/util.sh index f33170c8f0..35ac900c66 100644 --- a/cluster/libvirt-coreos/util.sh +++ b/cluster/libvirt-coreos/util.sh @@ -371,16 +371,6 @@ function ssh-to-node { ssh -o ConnectTimeout=30 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ControlMaster=no "core@$machine" "$cmd" } -# Restart the kube-proxy on a node ($1) -function restart-kube-proxy { - ssh-to-node "$1" "sudo systemctl restart kube-proxy" -} - -# Restart the apiserver -function restart-apiserver { - ssh-to-node "$1" "sudo systemctl restart kube-apiserver" -} - # Perform preparations required to run e2e tests function prepare-e2e() { echo "libvirt-coreos doesn't need special preparations for e2e tests" 1>&2 diff --git a/cluster/mesos/docker/util.sh b/cluster/mesos/docker/util.sh index 9feb80d078..27b9a53ea0 100644 --- a/cluster/mesos/docker/util.sh +++ b/cluster/mesos/docker/util.sh @@ -334,16 +334,6 @@ function ssh-to-node { echo "TODO: ssh-to-node" 1>&2 } -# Restart the kube-proxy on a node ($1) -function restart-kube-proxy { - echo "TODO: restart-kube-proxy" 1>&2 -} - -# Restart the apiserver -function restart-apiserver { - echo "TODO: restart-apiserver" 1>&2 -} - # Waits for a kube-system pod (of the provided name) to have the phase/status "Running". function cluster::mesos::docker::await_ready { local pod_name="$1" diff --git a/cluster/vagrant/util.sh b/cluster/vagrant/util.sh index 6304e0ebcf..125d5580b2 100755 --- a/cluster/vagrant/util.sh +++ b/cluster/vagrant/util.sh @@ -377,16 +377,6 @@ function ssh-to-node { vagrant ssh "${machine}" -c "${cmd}" } -# Restart the kube-proxy on a node ($1) -function restart-kube-proxy { - ssh-to-node "$1" "sudo systemctl restart kube-proxy" -} - -# Restart the apiserver -function restart-apiserver { - ssh-to-node "$1" "sudo systemctl restart kube-apiserver" -} - # Perform preparations required to run e2e tests function prepare-e2e() { echo "Vagrant doesn't need special preparations for e2e tests" 1>&2