From fc622a4b569fce72ae4884179df44f532f867999 Mon Sep 17 00:00:00 2001 From: Victor Marmol Date: Thu, 20 Nov 2014 06:32:54 +0800 Subject: [PATCH] Fix raw driver's setting of CPU mask. We used to include it with the trailing "\n" which gave us parsing errors in the UI (and the reason why they didn't show up in any of those containers). --- container/raw/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container/raw/handler.go b/container/raw/handler.go index a06f1470..79c5837f 100644 --- a/container/raw/handler.go +++ b/container/raw/handler.go @@ -103,7 +103,7 @@ func readString(dirpath string, file string) string { glog.Errorf("raw driver: Failed to read %q: %s", cgroupFile, err) return "" } - return string(out) + return strings.TrimSpace(string(out)) } func readInt64(dirpath string, file string) uint64 { @@ -112,7 +112,7 @@ func readInt64(dirpath string, file string) uint64 { return 0 } - val, err := strconv.ParseUint(strings.TrimSpace(out), 10, 64) + val, err := strconv.ParseUint(out, 10, 64) if err != nil { glog.Errorf("raw driver: Failed to parse int %q from file %q: %s", out, path.Join(dirpath, file), err) return 0