Don't SSH to master for metrics in case of GKE

pull/6/head
Shyam Jeedigunta 2017-08-16 15:24:50 +02:00
parent 3655685d64
commit a938c000e3
1 changed files with 4 additions and 0 deletions

View File

@ -449,6 +449,10 @@ func getSchedulingLatency(c clientset.Interface) (*SchedulingLatency, error) {
data = string(rawData)
} else {
// If master is not registered fall back to old method of using SSH.
if TestContext.Provider == "gke" {
Logf("Not grabbing scheduler metrics through master SSH: unsupported for gke")
return nil, nil
}
cmd := "curl http://localhost:10251/metrics"
sshResult, err := SSH(cmd, GetMasterHost()+":22", TestContext.Provider)
if err != nil || sshResult.Code != 0 {