diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 545c51e526a..948e889dca2 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -578,93 +578,93 @@ }, { "ImportPath": "github.com/google/cadvisor/api", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/cache/memory", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/collector", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/container", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/events", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/fs", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/healthz", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/http", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/info/v1", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/info/v2", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/manager", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/metrics", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/pages", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/storage", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/summary", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/utils", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/validate", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/cadvisor/version", - "Comment": "v0.22.0", - "Rev": "e39fb02c89f2b39808bc1723108cde5bb510e102" + "Comment": "v0.22.1", + "Rev": "b344feb952c13e0730fa52eb5e5cf1cf7130ee9c" }, { "ImportPath": "github.com/google/gofuzz", diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/info/v1/machine.go b/Godeps/_workspace/src/github.com/google/cadvisor/info/v1/machine.go index 89be47e4c1c..74a5df49c3d 100644 --- a/Godeps/_workspace/src/github.com/google/cadvisor/info/v1/machine.go +++ b/Godeps/_workspace/src/github.com/google/cadvisor/info/v1/machine.go @@ -121,11 +121,11 @@ type NetInfo struct { type CloudProvider string const ( - GCE CloudProvider = "GCE" - AWS = "AWS" - Azure = "Azure" - Baremetal = "Baremetal" - UnkownProvider = "Unknown" + GCE CloudProvider = "GCE" + AWS = "AWS" + Azure = "Azure" + Baremetal = "Baremetal" + UnknownProvider = "Unknown" ) type InstanceType string diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/aws.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/aws.go index c51e446ce02..9190ec0859e 100644 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/aws.go +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/aws.go @@ -15,6 +15,8 @@ package cloudinfo import ( + "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/session" @@ -23,7 +25,13 @@ import ( ) func onAWS() bool { - client := ec2metadata.New(session.New(&aws.Config{})) + // the default client behavior retried the operation multiple times with a 5s timeout per attempt. + // if you were not on aws, you would block for 20s when invoking this operation. + // we reduce retries to 0 and set the timeout to 2s to reduce the time this blocks when not on aws. + client := ec2metadata.New(session.New(&aws.Config{MaxRetries: aws.Int(0)})) + if client.Config.HTTPClient != nil { + client.Config.HTTPClient.Timeout = time.Duration(2 * time.Second) + } return client.Available() } diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go index 78c5fc3eab7..ad4ce5abe45 100644 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go @@ -66,7 +66,7 @@ func detectCloudProvider() info.CloudProvider { case onBaremetal(): return info.Baremetal } - return info.UnkownProvider + return info.UnknownProvider } func detectInstanceType(cloudProvider info.CloudProvider) info.InstanceType {