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

@@ -752,7 +752,7 @@ func (m *manager) registerCollectors(collectorConfigs map[string]string, cont *c
glog.V(3).Infof("Got config from %q: %q", v, configFile)
if strings.HasPrefix(k, "prometheus") || strings.HasPrefix(k, "Prometheus") {
newCollector, err := collector.NewPrometheusCollector(k, configFile, *applicationMetricsCountLimit, cont.handler)
newCollector, err := collector.NewPrometheusCollector(k, configFile, *applicationMetricsCountLimit)
if err != nil {
glog.Infof("failed to create collector for container %q, config %q: %v", cont.info.Name, k, err)
return err
@@ -763,7 +763,7 @@ func (m *manager) registerCollectors(collectorConfigs map[string]string, cont *c
return err
}
} else {
newCollector, err := collector.NewCollector(k, configFile, *applicationMetricsCountLimit, cont.handler)
newCollector, err := collector.NewCollector(k, configFile, *applicationMetricsCountLimit)
if err != nil {
glog.Infof("failed to create collector for container %q, config %q: %v", cont.info.Name, k, err)
return err

View File

@@ -19,7 +19,6 @@ package raw
import (
"fmt"
"io/ioutil"
"os"
"path"
"strings"
@@ -134,15 +133,9 @@ func (self *rawContainerWatcher) watchDirectory(dir string, containerName string
}
for _, entry := range entries {
if entry.IsDir() {
entryPath := path.Join(dir, entry.Name())
_, err = self.watchDirectory(entryPath, path.Join(containerName, entry.Name()))
// TODO(vmarmol): We don't have to fail here, maybe we can recover and try to get as many registrations as we can.
_, err = self.watchDirectory(path.Join(dir, entry.Name()), path.Join(containerName, entry.Name()))
if err != nil {
glog.Errorf("Failed to watch directory %q: %v", entryPath, err)
if os.IsNotExist(err) {
// The directory may have been removed before watching. Try to watch the other
// subdirectories. (https://github.com/kubernetes/kubernetes/issues/28997)
continue
}
return alreadyWatching, err
}
}