updated cadvisor deps

This commit is contained in:
David Ashpole
2017-03-10 10:09:25 -08:00
parent 1f5708d460
commit c3b24b75a3
5 changed files with 135 additions and 133 deletions

View File

@@ -22,15 +22,11 @@ import (
// ThinLsBinaryPresent returns the location of the thin_ls binary in the mount
// namespace cadvisor is running in or an error. The locations checked are:
//
// - /sbin/
// - /bin/
// - /usr/sbin/
// - /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
// package.
func ThinLsBinaryPresent() (string, error) {
@@ -39,7 +35,7 @@ func ThinLsBinaryPresent() (string, 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
// note: thin_ls is most likely a symlink to pdata_tools
thinLsPath = filepath.Join(path, "thin_ls")
@@ -47,13 +43,6 @@ func ThinLsBinaryPresent() (string, error) {
if err == 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")