Commit c3b24b75 authored by David Ashpole's avatar David Ashpole

updated cadvisor deps

parent 1f5708d4
...@@ -1108,6 +1108,35 @@ go_library( ...@@ -1108,6 +1108,35 @@ go_library(
) )
go_library( go_library(
name = "github.com/codedellemc/goscaleio",
srcs = [
"github.com/codedellemc/goscaleio/api.go",
"github.com/codedellemc/goscaleio/certs.go",
"github.com/codedellemc/goscaleio/device.go",
"github.com/codedellemc/goscaleio/instance.go",
"github.com/codedellemc/goscaleio/protectiondomain.go",
"github.com/codedellemc/goscaleio/scsiinitiator.go",
"github.com/codedellemc/goscaleio/sdc.go",
"github.com/codedellemc/goscaleio/sds.go",
"github.com/codedellemc/goscaleio/storagepool.go",
"github.com/codedellemc/goscaleio/system.go",
"github.com/codedellemc/goscaleio/user.go",
"github.com/codedellemc/goscaleio/volume.go",
],
tags = ["automanaged"],
deps = [
"//vendor:github.com/Sirupsen/logrus",
"//vendor:github.com/codedellemc/goscaleio/types/v1",
],
)
go_library(
name = "github.com/codedellemc/goscaleio/types/v1",
srcs = ["github.com/codedellemc/goscaleio/types/v1/types.go"],
tags = ["automanaged"],
)
go_library(
name = "github.com/codegangsta/negroni", name = "github.com/codegangsta/negroni",
srcs = [ srcs = [
"github.com/codegangsta/negroni/doc.go", "github.com/codegangsta/negroni/doc.go",
...@@ -10107,6 +10136,13 @@ go_library( ...@@ -10107,6 +10136,13 @@ go_library(
], ],
) )
go_test(
name = "k8s.io/apiserver/pkg/endpoints/metrics_test",
srcs = ["k8s.io/apiserver/pkg/endpoints/metrics/metrics_test.go"],
library = ":k8s.io/apiserver/pkg/endpoints/metrics",
tags = ["automanaged"],
)
go_library( go_library(
name = "k8s.io/apiserver/pkg/endpoints/metrics", name = "k8s.io/apiserver/pkg/endpoints/metrics",
srcs = ["k8s.io/apiserver/pkg/endpoints/metrics/metrics.go"], srcs = ["k8s.io/apiserver/pkg/endpoints/metrics/metrics.go"],
...@@ -16251,13 +16287,6 @@ go_library( ...@@ -16251,13 +16287,6 @@ go_library(
tags = ["automanaged"], tags = ["automanaged"],
) )
go_test(
name = "k8s.io/apiserver/pkg/endpoints/metrics_test",
srcs = ["k8s.io/apiserver/pkg/endpoints/metrics/metrics_test.go"],
library = ":k8s.io/apiserver/pkg/endpoints/metrics",
tags = ["automanaged"],
)
filegroup( filegroup(
name = "package-srcs", name = "package-srcs",
srcs = glob(["**"]), srcs = glob(["**"]),
...@@ -16270,32 +16299,3 @@ filegroup( ...@@ -16270,32 +16299,3 @@ filegroup(
srcs = [":package-srcs"], srcs = [":package-srcs"],
tags = ["automanaged"], tags = ["automanaged"],
) )
go_library(
name = "github.com/codedellemc/goscaleio",
srcs = [
"github.com/codedellemc/goscaleio/api.go",
"github.com/codedellemc/goscaleio/certs.go",
"github.com/codedellemc/goscaleio/device.go",
"github.com/codedellemc/goscaleio/instance.go",
"github.com/codedellemc/goscaleio/protectiondomain.go",
"github.com/codedellemc/goscaleio/scsiinitiator.go",
"github.com/codedellemc/goscaleio/sdc.go",
"github.com/codedellemc/goscaleio/sds.go",
"github.com/codedellemc/goscaleio/storagepool.go",
"github.com/codedellemc/goscaleio/system.go",
"github.com/codedellemc/goscaleio/user.go",
"github.com/codedellemc/goscaleio/volume.go",
],
tags = ["automanaged"],
deps = [
"//vendor:github.com/Sirupsen/logrus",
"//vendor:github.com/codedellemc/goscaleio/types/v1",
],
)
go_library(
name = "github.com/codedellemc/goscaleio/types/v1",
srcs = ["github.com/codedellemc/goscaleio/types/v1/types.go"],
tags = ["automanaged"],
)
...@@ -57,6 +57,12 @@ var ( ...@@ -57,6 +57,12 @@ var (
dockerRootDirFlag = flag.String("docker_root", "/var/lib/docker", "DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)") dockerRootDirFlag = flag.String("docker_root", "/var/lib/docker", "DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)")
dockerRootDirOnce sync.Once dockerRootDirOnce sync.Once
// flag that controls globally disabling thin_ls pending future enhancements.
// in production, it has been found that thin_ls makes excessive use of iops.
// in an iops restricted environment, usage of thin_ls must be controlled via blkio.
// pending that enhancement, disable its usage.
disableThinLs = true
) )
func RootDir() string { func RootDir() string {
...@@ -189,6 +195,10 @@ func startThinPoolWatcher(dockerInfo *dockertypes.Info) (*devicemapper.ThinPoolW ...@@ -189,6 +195,10 @@ func startThinPoolWatcher(dockerInfo *dockertypes.Info) (*devicemapper.ThinPoolW
return nil, err return nil, err
} }
if disableThinLs {
return nil, fmt.Errorf("usage of thin_ls is disabled to preserve iops")
}
dockerThinPoolName, err := dockerutil.DockerThinPoolName(*dockerInfo) dockerThinPoolName, err := dockerutil.DockerThinPoolName(*dockerInfo)
if err != nil { if err != nil {
return nil, err return nil, err
......
...@@ -252,9 +252,11 @@ func newDockerContainerHandler( ...@@ -252,9 +252,11 @@ func newDockerContainerHandler(
// split env vars to get metadata map. // split env vars to get metadata map.
for _, exposedEnv := range metadataEnvs { for _, exposedEnv := range metadataEnvs {
for _, envVar := range ctnr.Config.Env { for _, envVar := range ctnr.Config.Env {
splits := strings.SplitN(envVar, "=", 2) if envVar != "" {
if splits[0] == exposedEnv { splits := strings.SplitN(envVar, "=", 2)
handler.envs[strings.ToLower(exposedEnv)] = splits[1] if len(splits) == 2 && splits[0] == exposedEnv {
handler.envs[strings.ToLower(exposedEnv)] = splits[1]
}
} }
} }
} }
......
...@@ -22,15 +22,11 @@ import ( ...@@ -22,15 +22,11 @@ import (
// ThinLsBinaryPresent returns the location of the thin_ls binary in the mount // ThinLsBinaryPresent returns the location of the thin_ls binary in the mount
// namespace cadvisor is running in or an error. The locations checked are: // namespace cadvisor is running in or an error. The locations checked are:
// //
// - /sbin/
// - /bin/ // - /bin/
// - /usr/sbin/ // - /usr/sbin/
// - /usr/bin/ // - /usr/bin/
// //
// ThinLsBinaryPresent checks these paths relative to:
//
// 1. For non-containerized operation - `/`
// 2. For containerized operation - `/rootfs`
//
// The thin_ls binary is provided by the device-mapper-persistent-data // The thin_ls binary is provided by the device-mapper-persistent-data
// package. // package.
func ThinLsBinaryPresent() (string, error) { func ThinLsBinaryPresent() (string, error) {
...@@ -39,7 +35,7 @@ func ThinLsBinaryPresent() (string, error) { ...@@ -39,7 +35,7 @@ func ThinLsBinaryPresent() (string, error) {
err error err error
) )
for _, path := range []string{"/bin", "/usr/sbin/", "/usr/bin"} { for _, path := range []string{"/sbin", "/bin", "/usr/sbin/", "/usr/bin"} {
// try paths for non-containerized operation // try paths for non-containerized operation
// note: thin_ls is most likely a symlink to pdata_tools // note: thin_ls is most likely a symlink to pdata_tools
thinLsPath = filepath.Join(path, "thin_ls") thinLsPath = filepath.Join(path, "thin_ls")
...@@ -47,13 +43,6 @@ func ThinLsBinaryPresent() (string, error) { ...@@ -47,13 +43,6 @@ func ThinLsBinaryPresent() (string, error) {
if err == nil { if err == nil {
return thinLsPath, nil return thinLsPath, nil
} }
// try paths for containerized operation
thinLsPath = filepath.Join("/rootfs", thinLsPath)
_, err = os.Stat(thinLsPath)
if err == nil {
return thinLsPath, nil
}
} }
return "", fmt.Errorf("unable to find thin_ls binary") return "", fmt.Errorf("unable to find thin_ls binary")
......
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