Merge pull request #42681 from yujuhong/fix_restart

Automatic merge from submit-queue (batch tested with PRs 42652, 42681, 42708, 42730)

e2e: fix restarting the apiserver

The string used to match the image name of the apiserver (e.g., `gcr.io/google_containers/kube-apiserver:3be...`),
but this no longer works. Change the test to locate the kube-apiserver container by name.
pull/6/head
Kubernetes Submit Queue 2017-03-08 11:38:07 -08:00 committed by GitHub
commit 1402cc588f
1 changed files with 3 additions and 1 deletions

View File

@ -4343,7 +4343,9 @@ func sshRestartMaster() error {
}
var command string
if ProviderIs("gce") {
command = "sudo docker ps | grep /kube-apiserver | cut -d ' ' -f 1 | xargs sudo docker kill"
// `kube-apiserver_kube-apiserver` matches the name of the apiserver
// container.
command = "sudo docker ps | grep kube-apiserver_kube-apiserver | cut -d ' ' -f 1 | xargs sudo docker kill"
} else {
command = "sudo /etc/init.d/kube-apiserver restart"
}