Revert "Fix working_set calculation in kubelet"

This commit is contained in:
Antoine Pelisse
2016-07-20 17:04:32 -07:00
committed by GitHub
parent b829d4d4ef
commit b681b17bb0
124 changed files with 2354 additions and 6213 deletions

View File

@@ -15,27 +15,15 @@
package cloudinfo
import (
"io/ioutil"
"strings"
info "github.com/google/cadvisor/info/v1"
"github.com/golang/glog"
"google.golang.org/cloud/compute/metadata"
)
const (
gceProductName = "/sys/class/dmi/id/product_name"
google = "Google"
)
func onGCE() bool {
data, err := ioutil.ReadFile(gceProductName)
if err != nil {
glog.V(2).Infof("Error while reading product_name: %v", err)
return false
}
return strings.Contains(string(data), google)
return metadata.OnGCE()
}
func getGceInstanceType() info.InstanceType {