Merge pull request #61475 from anjensan/e2e-hamaster

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix e2e test lifecycle/ha_master.go

Minor fixes for gce-ha-master e2e test
https://k8s-testgrid.appspot.com/google-gce#gce-ha-master

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-03-25 08:54:33 -07:00 committed by GitHub
commit 620f9a3a5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -68,6 +68,7 @@ function replicate-master-instance() {
get-metadata "${existing_master_zone}" "${existing_master_name}" gci-ensure-gke-docker > "${KUBE_TEMP}/gci-ensure-gke-docker.txt"
get-metadata "${existing_master_zone}" "${existing_master_name}" gci-docker-version > "${KUBE_TEMP}/gci-docker-version.txt"
get-metadata "${existing_master_zone}" "${existing_master_name}" kube-master-certs > "${KUBE_TEMP}/kube-master-certs.yaml"
get-metadata "${existing_master_zone}" "${existing_master_name}" cluster-location > "${KUBE_TEMP}/cluster-location.txt"
create-master-instance-internal "${REPLICA_NAME}"
}
@ -114,6 +115,7 @@ function create-master-instance-internal() {
metadata="${metadata},gci-ensure-gke-docker=${KUBE_TEMP}/gci-ensure-gke-docker.txt"
metadata="${metadata},gci-docker-version=${KUBE_TEMP}/gci-docker-version.txt"
metadata="${metadata},kube-master-certs=${KUBE_TEMP}/kube-master-certs.yaml"
metadata="${metadata},cluster-location=${KUBE_TEMP}/cluster-location.txt"
metadata="${metadata},${MASTER_EXTRA_METADATA}"
local disk="name=${master_name}-pd"

View File

@ -78,7 +78,7 @@ func createNewRC(c clientset.Interface, ns string, name string) {
}
func findRegionForZone(zone string) string {
region, err := exec.Command("gcloud", "compute", "zones", "list", zone, "--quiet", "--format=csv[no-heading](region)").CombinedOutput()
region, err := exec.Command("gcloud", "compute", "zones", "list", zone, "--quiet", "--format=csv[no-heading](region)").Output()
framework.ExpectNoError(err)
if string(region) == "" {
framework.Failf("Region not found; zone: %s", zone)
@ -88,7 +88,7 @@ func findRegionForZone(zone string) string {
func findZonesForRegion(region string) []string {
output, err := exec.Command("gcloud", "compute", "zones", "list", "--filter=region="+region,
"--quiet", "--format=csv[no-heading](name)").CombinedOutput()
"--quiet", "--format=csv[no-heading](name)").Output()
framework.ExpectNoError(err)
zones := strings.Split(string(output), "\n")
return zones