Commit a938c000 authored by Shyam Jeedigunta's avatar Shyam Jeedigunta

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

parent 3655685d
...@@ -449,6 +449,10 @@ func getSchedulingLatency(c clientset.Interface) (*SchedulingLatency, error) { ...@@ -449,6 +449,10 @@ func getSchedulingLatency(c clientset.Interface) (*SchedulingLatency, error) {
data = string(rawData) data = string(rawData)
} else { } else {
// If master is not registered fall back to old method of using SSH. // 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" cmd := "curl http://localhost:10251/metrics"
sshResult, err := SSH(cmd, GetMasterHost()+":22", TestContext.Provider) sshResult, err := SSH(cmd, GetMasterHost()+":22", TestContext.Provider)
if err != nil || sshResult.Code != 0 { if err != nil || sshResult.Code != 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment