diff --git a/.gitignore b/.gitignore index d2538cc..221a50b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /kubernetes-a4abafe.tar.gz /kubernetes-5a649f2.tar.gz /kubernetes-3b1ef73.tar.gz +/kubernetes-b695650.tar.gz diff --git a/0001-remove-all-third-party-software.patch b/0001-remove-all-third-party-software.patch index 1d171c3..5adf347 100644 --- a/0001-remove-all-third-party-software.patch +++ b/0001-remove-all-third-party-software.patch @@ -1,4 +1,4 @@ -From ff009f49347fbcc033d2a7a51b62c7992bc893c3 Mon Sep 17 00:00:00 2001 +From b819e8f38fa46829e4aeb8588d2484683e52608b Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Thu, 21 Aug 2014 13:55:27 -0400 Subject: [PATCH] remove all third party software @@ -221,9 +221,9 @@ Subject: [PATCH] remove all third party software .../fsouza/go-dockerclient/testing/writer.go | 43 - .../_workspace/src/github.com/golang/glog/LICENSE | 191 - .../_workspace/src/github.com/golang/glog/README | 44 - - .../_workspace/src/github.com/golang/glog/glog.go | 1034 -- + .../_workspace/src/github.com/golang/glog/glog.go | 1177 -- .../src/github.com/golang/glog/glog_file.go | 124 - - .../src/github.com/golang/glog/glog_test.go | 333 - + .../src/github.com/golang/glog/glog_test.go | 415 - .../github.com/google/cadvisor/client/client.go | 106 - .../google/cadvisor/client/client_test.go | 113 - .../src/github.com/google/cadvisor/info/advice.go | 34 - @@ -446,7 +446,7 @@ Subject: [PATCH] remove all third party software Godeps/_workspace/src/gopkg.in/v1/yaml/yaml.go | 306 - Godeps/_workspace/src/gopkg.in/v1/yaml/yamlh.go | 712 - .../src/gopkg.in/v1/yaml/yamlprivateh.go | 173 - - 442 files changed, 121829 deletions(-) + 442 files changed, 122054 deletions(-) delete mode 100644 Godeps/Godeps.json delete mode 100644 Godeps/Readme delete mode 100644 Godeps/_workspace/.gitignore @@ -892,7 +892,7 @@ Subject: [PATCH] remove all third party software diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json deleted file mode 100644 -index 90f4324..0000000 +index 2be803e..0000000 --- a/Godeps/Godeps.json +++ /dev/null @@ -1,148 +0,0 @@ @@ -963,7 +963,7 @@ index 90f4324..0000000 - }, - { - "ImportPath": "github.com/golang/glog", -- "Rev": "d1c4472bf2efd3826f2b5bdcc02d8416798d678c" +- "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed" - }, - { - "ImportPath": "github.com/google/cadvisor/client", @@ -78528,10 +78528,10 @@ index 5f9c114..0000000 -Send bug reports to golang-nuts@googlegroups.com. diff --git a/Godeps/_workspace/src/github.com/golang/glog/glog.go b/Godeps/_workspace/src/github.com/golang/glog/glog.go deleted file mode 100644 -index d5e1ac2..0000000 +index 3e63fff..0000000 --- a/Godeps/_workspace/src/github.com/golang/glog/glog.go +++ /dev/null -@@ -1,1034 +0,0 @@ +@@ -1,1177 +0,0 @@ -// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ -// -// Copyright 2013 Google Inc. All Rights Reserved. @@ -78611,6 +78611,7 @@ index d5e1ac2..0000000 - "flag" - "fmt" - "io" +- stdLog "log" - "os" - "path/filepath" - "runtime" @@ -78627,6 +78628,9 @@ index d5e1ac2..0000000 -// the corresponding constants in C++. -type severity int32 // sync/atomic int32 - +-// These constants identify the log levels in order of increasing severity. +-// A message written to a high-severity log file is also written to each +-// lower-severity log file. -const ( - infoLog severity = iota - warningLog @@ -78845,7 +78849,7 @@ index d5e1ac2..0000000 -// isLiteral reports whether the pattern is a literal string, that is, has no metacharacters -// that require filepath.Match to be called to match the pattern. -func isLiteral(pattern string) bool { -- return !strings.ContainsAny(pattern, `*?[]\`) +- return !strings.ContainsAny(pattern, `\*?[]`) -} - -// traceLocation represents the setting of the -log_backtrace_at flag. @@ -79000,7 +79004,7 @@ index d5e1ac2..0000000 - // Turn verbosity off so V will not fire while we are in transition. - logging.verbosity.set(0) - // Ditto for filter length. -- logging.filterLength = 0 +- atomic.StoreInt32(&logging.filterLength, 0) - - // Set the new filters and wipe the pc->Level map if the filter has changed. - if setFilter { @@ -79047,7 +79051,8 @@ index d5e1ac2..0000000 - -/* -header formats a log header as defined by the C++ implementation. --It returns a buffer containing the formatted header. +-It returns a buffer containing the formatted header and the user's file and line number. +-The depth specifies how many stack frames above lives the source line to be identified in the log message. - -Log lines have this form: - Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg... @@ -79061,10 +79066,8 @@ index d5e1ac2..0000000 - line The line number - msg The user-supplied message -*/ --func (l *loggingT) header(s severity) *buffer { -- // Lmmdd hh:mm:ss.uuuuuu threadid file:line] -- now := timeNow() -- _, file, line, ok := runtime.Caller(3) // It's always the same number of frames to the user's call. +-func (l *loggingT) header(s severity, depth int) (*buffer, string, int) { +- _, file, line, ok := runtime.Caller(3 + depth) - if !ok { - file = "???" - line = 1 @@ -79074,6 +79077,12 @@ index d5e1ac2..0000000 - file = file[slash+1:] - } - } +- return l.formatHeader(s, file, line), file, line +-} +- +-// formatHeader formats a log header using the provided file name and line number. +-func (l *loggingT) formatHeader(s severity, file string, line int) *buffer { +- now := timeNow() - if line < 0 { - line = 0 // not a real line number, but acceptable to someDigits - } @@ -79086,6 +79095,7 @@ index d5e1ac2..0000000 - // It's worth about 3X. Fprintf is hard. - _, month, day := now.Date() - hour, minute, second := now.Clock() +- // Lmmdd hh:mm:ss.uuuuuu threadid file:line] - buf.tmp[0] = severityChar[s] - buf.twoDigits(1, int(month)) - buf.twoDigits(3, day) @@ -79096,11 +79106,11 @@ index d5e1ac2..0000000 - buf.tmp[11] = ':' - buf.twoDigits(12, second) - buf.tmp[14] = '.' -- buf.nDigits(6, 15, now.Nanosecond()/1000) +- buf.nDigits(6, 15, now.Nanosecond()/1000, '0') - buf.tmp[21] = ' ' -- buf.nDigits(5, 22, pid) // TODO: should be TID -- buf.tmp[27] = ' ' -- buf.Write(buf.tmp[:28]) +- buf.nDigits(7, 22, pid, ' ') // TODO: should be TID +- buf.tmp[29] = ' ' +- buf.Write(buf.tmp[:30]) - buf.WriteString(file) - buf.tmp[0] = ':' - n := buf.someDigits(1, line) @@ -79121,12 +79131,18 @@ index d5e1ac2..0000000 - buf.tmp[i] = digits[d%10] -} - --// nDigits formats a zero-prefixed n-digit integer at buf.tmp[i]. --func (buf *buffer) nDigits(n, i, d int) { -- for j := n - 1; j >= 0; j-- { +-// nDigits formats an n-digit integer at buf.tmp[i], +-// padding with pad on the left. +-// It assumes d >= 0. +-func (buf *buffer) nDigits(n, i, d int, pad byte) { +- j := n - 1 +- for ; j >= 0 && d > 0; j-- { - buf.tmp[i+j] = digits[d%10] - d /= 10 - } +- for ; j >= 0; j-- { +- buf.tmp[i+j] = pad +- } -} - -// someDigits formats a zero-prefixed variable-width integer at buf.tmp[i]. @@ -79146,35 +79162,50 @@ index d5e1ac2..0000000 -} - -func (l *loggingT) println(s severity, args ...interface{}) { -- buf := l.header(s) +- buf, file, line := l.header(s, 0) - fmt.Fprintln(buf, args...) -- l.output(s, buf) +- l.output(s, buf, file, line, false) -} - -func (l *loggingT) print(s severity, args ...interface{}) { -- buf := l.header(s) +- l.printDepth(s, 1, args...) +-} +- +-func (l *loggingT) printDepth(s severity, depth int, args ...interface{}) { +- buf, file, line := l.header(s, depth) - fmt.Fprint(buf, args...) - if buf.Bytes()[buf.Len()-1] != '\n' { - buf.WriteByte('\n') - } -- l.output(s, buf) +- l.output(s, buf, file, line, false) -} - -func (l *loggingT) printf(s severity, format string, args ...interface{}) { -- buf := l.header(s) +- buf, file, line := l.header(s, 0) - fmt.Fprintf(buf, format, args...) - if buf.Bytes()[buf.Len()-1] != '\n' { - buf.WriteByte('\n') - } -- l.output(s, buf) +- l.output(s, buf, file, line, false) +-} +- +-// printWithFileLine behaves like print but uses the provided file and line number. If +-// alsoLogToStderr is true, the log message always appears on standard error; it +-// will also appear in the log file unless --logtostderr is set. +-func (l *loggingT) printWithFileLine(s severity, file string, line int, alsoToStderr bool, args ...interface{}) { +- buf := l.formatHeader(s, file, line) +- fmt.Fprint(buf, args...) +- if buf.Bytes()[buf.Len()-1] != '\n' { +- buf.WriteByte('\n') +- } +- l.output(s, buf, file, line, alsoToStderr) -} - -// output writes the data to the log files and releases the buffer. --func (l *loggingT) output(s severity, buf *buffer) { +-func (l *loggingT) output(s severity, buf *buffer, file string, line int, alsoToStderr bool) { - l.mu.Lock() - if l.traceLocation.isSet() { -- _, file, line, ok := runtime.Caller(3) // It's always the same number of frames to the user's call (same as header). -- if ok && l.traceLocation.match(file, line) { +- if l.traceLocation.match(file, line) { - buf.Write(stacks(false)) - } - } @@ -79182,7 +79213,7 @@ index d5e1ac2..0000000 - if l.toStderr { - os.Stderr.Write(data) - } else { -- if l.alsoToStderr || s >= l.stderrThreshold.get() { +- if alsoToStderr || l.alsoToStderr || s >= l.stderrThreshold.get() { - os.Stderr.Write(data) - } - if l.file[s] == nil { @@ -79206,7 +79237,16 @@ index d5e1ac2..0000000 - } - } - if s == fatalLog { -- // Make sure we see the trace for the current goroutine on standard error. +- // If we got here via Exit rather than Fatal, print no stacks. +- if atomic.LoadUint32(&fatalNoStacks) > 0 { +- l.mu.Unlock() +- timeoutFlush(10 * time.Second) +- os.Exit(1) +- } +- // Dump all goroutine stacks before exiting. +- // First, make sure we see the trace for the current goroutine on standard error. +- // If -logtostderr has been specified, the loop below will do that anyway +- // as the first stack in the full dump. - if !l.toStderr { - os.Stderr.Write(stacks(false)) - } @@ -79395,6 +79435,54 @@ index d5e1ac2..0000000 - } -} - +-// CopyStandardLogTo arranges for messages written to the Go "log" package's +-// default logs to also appear in the Google logs for the named and lower +-// severities. Subsequent changes to the standard log's default output location +-// or format may break this behavior. +-// +-// Valid names are "INFO", "WARNING", "ERROR", and "FATAL". If the name is not +-// recognized, CopyStandardLogTo panics. +-func CopyStandardLogTo(name string) { +- sev, ok := severityByName(name) +- if !ok { +- panic(fmt.Sprintf("log.CopyStandardLogTo(%q): unrecognized severity name", name)) +- } +- // Set a log format that captures the user's file and line: +- // d.go:23: message +- stdLog.SetFlags(stdLog.Lshortfile) +- stdLog.SetOutput(logBridge(sev)) +-} +- +-// logBridge provides the Write method that enables CopyStandardLogTo to connect +-// Go's standard logs to the logs provided by this package. +-type logBridge severity +- +-// Write parses the standard logging line and passes its components to the +-// logger for severity(lb). +-func (lb logBridge) Write(b []byte) (n int, err error) { +- var ( +- file = "???" +- line = 1 +- text string +- ) +- // Split "d.go:23: message" into "d.go", "23", and "message". +- if parts := bytes.SplitN(b, []byte{':'}, 3); len(parts) != 3 || len(parts[0]) < 1 || len(parts[2]) < 1 { +- text = fmt.Sprintf("bad log format: %s", b) +- } else { +- file = string(parts[0]) +- text = string(parts[2][1:]) // skip leading space +- line, err = strconv.Atoi(string(parts[1])) +- if err != nil { +- text = fmt.Sprintf("bad line number: %s", b) +- line = 1 +- } +- } +- // printWithFileLine with alsoToStderr=true, so standard log messages +- // always appear on standard error. +- logging.printWithFileLine(severity(lb), file, line, true, text) +- return len(b), nil +-} +- -// setV computes and remembers the V level for a given PC -// when vmodule is enabled. -// File pattern matching takes the basename of the file, stripped @@ -79498,6 +79586,12 @@ index d5e1ac2..0000000 - logging.print(infoLog, args...) -} - +-// InfoDepth acts as Info but uses depth to determine which call frame to log. +-// InfoDepth(0, "msg") is the same as Info("msg"). +-func InfoDepth(depth int, args ...interface{}) { +- logging.printDepth(infoLog, depth, args...) +-} +- -// Infoln logs to the INFO log. -// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. -func Infoln(args ...interface{}) { @@ -79516,6 +79610,12 @@ index d5e1ac2..0000000 - logging.print(warningLog, args...) -} - +-// WarningDepth acts as Warning but uses depth to determine which call frame to log. +-// WarningDepth(0, "msg") is the same as Warning("msg"). +-func WarningDepth(depth int, args ...interface{}) { +- logging.printDepth(warningLog, depth, args...) +-} +- -// Warningln logs to the WARNING and INFO logs. -// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. -func Warningln(args ...interface{}) { @@ -79534,6 +79634,12 @@ index d5e1ac2..0000000 - logging.print(errorLog, args...) -} - +-// ErrorDepth acts as Error but uses depth to determine which call frame to log. +-// ErrorDepth(0, "msg") is the same as Error("msg"). +-func ErrorDepth(depth int, args ...interface{}) { +- logging.printDepth(errorLog, depth, args...) +-} +- -// Errorln logs to the ERROR, WARNING, and INFO logs. -// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. -func Errorln(args ...interface{}) { @@ -79553,6 +79659,12 @@ index d5e1ac2..0000000 - logging.print(fatalLog, args...) -} - +-// FatalDepth acts as Fatal but uses depth to determine which call frame to log. +-// FatalDepth(0, "msg") is the same as Fatal("msg"). +-func FatalDepth(depth int, args ...interface{}) { +- logging.printDepth(fatalLog, depth, args...) +-} +- -// Fatalln logs to the FATAL, ERROR, WARNING, and INFO logs, -// including a stack trace of all running goroutines, then calls os.Exit(255). -// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. @@ -79566,6 +79678,37 @@ index d5e1ac2..0000000 -func Fatalf(format string, args ...interface{}) { - logging.printf(fatalLog, format, args...) -} +- +-// fatalNoStacks is non-zero if we are to exit without dumping goroutine stacks. +-// It allows Exit and relatives to use the Fatal logs. +-var fatalNoStacks uint32 +- +-// Exit logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +-// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +-func Exit(args ...interface{}) { +- atomic.StoreUint32(&fatalNoStacks, 1) +- logging.print(fatalLog, args...) +-} +- +-// ExitDepth acts as Exit but uses depth to determine which call frame to log. +-// ExitDepth(0, "msg") is the same as Exit("msg"). +-func ExitDepth(depth int, args ...interface{}) { +- atomic.StoreUint32(&fatalNoStacks, 1) +- logging.printDepth(fatalLog, depth, args...) +-} +- +-// Exitln logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +-func Exitln(args ...interface{}) { +- atomic.StoreUint32(&fatalNoStacks, 1) +- logging.println(fatalLog, args...) +-} +- +-// Exitf logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +-// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +-func Exitf(format string, args ...interface{}) { +- atomic.StoreUint32(&fatalNoStacks, 1) +- logging.printf(fatalLog, format, args...) +-} diff --git a/Godeps/_workspace/src/github.com/golang/glog/glog_file.go b/Godeps/_workspace/src/github.com/golang/glog/glog_file.go deleted file mode 100644 index 65075d2..0000000 @@ -79698,10 +79841,10 @@ index 65075d2..0000000 -} diff --git a/Godeps/_workspace/src/github.com/golang/glog/glog_test.go b/Godeps/_workspace/src/github.com/golang/glog/glog_test.go deleted file mode 100644 -index e4cac5a..0000000 +index 0fb376e..0000000 --- a/Godeps/_workspace/src/github.com/golang/glog/glog_test.go +++ /dev/null -@@ -1,333 +0,0 @@ +@@ -1,415 +0,0 @@ -// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ -// -// Copyright 2013 Google Inc. All Rights Reserved. @@ -79723,8 +79866,10 @@ index e4cac5a..0000000 -import ( - "bytes" - "fmt" +- stdLog "log" - "path/filepath" - "runtime" +- "strconv" - "strings" - "testing" - "time" @@ -79800,20 +79945,99 @@ index e4cac5a..0000000 - } -} - +-func TestInfoDepth(t *testing.T) { +- setFlags() +- defer logging.swap(logging.newBuffers()) +- +- f := func() { InfoDepth(1, "depth-test1") } +- +- // The next three lines must stay together +- _, _, wantLine, _ := runtime.Caller(0) +- InfoDepth(0, "depth-test0") +- f() +- +- msgs := strings.Split(strings.TrimSuffix(contents(infoLog), "\n"), "\n") +- if len(msgs) != 2 { +- t.Fatalf("Got %d lines, expected 2", len(msgs)) +- } +- +- for i, m := range msgs { +- if !strings.HasPrefix(m, "I") { +- t.Errorf("InfoDepth[%d] has wrong character: %q", i, m) +- } +- w := fmt.Sprintf("depth-test%d", i) +- if !strings.Contains(m, w) { +- t.Errorf("InfoDepth[%d] missing %q: %q", i, w, m) +- } +- +- // pull out the line number (between : and ]) +- msg := m[strings.LastIndex(m, ":")+1:] +- x := strings.Index(msg, "]") +- if x < 0 { +- t.Errorf("InfoDepth[%d]: missing ']': %q", i, m) +- continue +- } +- line, err := strconv.Atoi(msg[:x]) +- if err != nil { +- t.Errorf("InfoDepth[%d]: bad line number: %q", i, m) +- continue +- } +- wantLine++ +- if wantLine != line { +- t.Errorf("InfoDepth[%d]: got line %d, want %d", i, line, wantLine) +- } +- } +-} +- +-func init() { +- CopyStandardLogTo("INFO") +-} +- +-// Test that CopyStandardLogTo panics on bad input. +-func TestCopyStandardLogToPanic(t *testing.T) { +- defer func() { +- if s, ok := recover().(string); !ok || !strings.Contains(s, "LOG") { +- t.Errorf(`CopyStandardLogTo("LOG") should have panicked: %v`, s) +- } +- }() +- CopyStandardLogTo("LOG") +-} +- +-// Test that using the standard log package logs to INFO. +-func TestStandardLog(t *testing.T) { +- setFlags() +- defer logging.swap(logging.newBuffers()) +- stdLog.Print("test") +- if !contains(infoLog, "I", t) { +- t.Errorf("Info has wrong character: %q", contents(infoLog)) +- } +- if !contains(infoLog, "test", t) { +- t.Error("Info failed") +- } +-} +- -// Test that the header has the correct format. -func TestHeader(t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - defer func(previous func() time.Time) { timeNow = previous }(timeNow) - timeNow = func() time.Time { -- return time.Date(2006, 1, 2, 15, 4, 5, .678901e9, time.Local) +- return time.Date(2006, 1, 2, 15, 4, 5, .067890e9, time.Local) - } +- pid = 1234 - Info("test") -- var line, pid int -- n, err := fmt.Sscanf(contents(infoLog), "I0102 15:04:05.678901 %d glog_test.go:%d] test\n", &pid, &line) -- if n != 2 || err != nil { +- var line int +- format := "I0102 15:04:05.067890 1234 glog_test.go:%d] test\n" +- n, err := fmt.Sscanf(contents(infoLog), format, &line) +- if n != 1 || err != nil { - t.Errorf("log format error: %d elements, error %s:\n%s", n, err, contents(infoLog)) - } +- // Scanf treats multiple spaces as equivalent to a single space, +- // so check for correct space-padding also. +- want := fmt.Sprintf(format, line) +- if contents(infoLog) != want { +- t.Errorf("log format error: got:\n\t%q\nwant:\t%q", contents(infoLog), want) +- } -} - -// Test that an Error log goes to Warning and Info. @@ -80032,7 +80256,8 @@ index e4cac5a..0000000 - -func BenchmarkHeader(b *testing.B) { - for i := 0; i < b.N; i++ { -- logging.putBuffer(logging.header(infoLog)) +- buf, _, _ := logging.header(infoLog, 0) +- logging.putBuffer(buf) - } -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/client/client.go b/Godeps/_workspace/src/github.com/google/cadvisor/client/client.go diff --git a/kubernetes.spec b/kubernetes.spec index df350ae..40997cc 100644 --- a/kubernetes.spec +++ b/kubernetes.spec @@ -1,7 +1,7 @@ #debuginfo not supported with Go %global debug_package %{nil} %global import_path github.com/GoogleCloudPlatform/kubernetes -%global commit 3b1ef739d1fb32a822a22216fb965e22cdd28e7f +%global commit b6956506fa2682afa93770a58ea8c7ba4b4caec1 %global shortcommit %(c=%{commit}; echo ${c:0:7}) #binaries which should be called kube-* @@ -18,7 +18,7 @@ Name: kubernetes Version: 0.4 -Release: 567.0.git%{shortcommit}%{?dist} +Release: 595.0.git%{shortcommit}%{?dist} Summary: Container cluster management License: ASL 2.0 URL: https://github.com/GoogleCloudPlatform/kubernetes @@ -87,7 +87,7 @@ BuildRequires: golang(gopkg.in/v1/yaml) %build export KUBE_GIT_COMMIT=%{commit} -export KUBE_GIT_VERSION=v0.4-567-g3b1ef739d1fb32 +export KUBE_GIT_VERSION=v0.4-595-gb6956506fa2682 %if 0%{?fedora} export KUBE_GIT_TREE_STATE="dirty" @@ -189,6 +189,9 @@ getent passwd kube >/dev/null || useradd -r -g kube -d / -s /sbin/nologin \ %systemd_postun %changelog +* Fri Nov 07 2014 Eric Paris - 0.4-595.0.gitb695650 +- Bump to upstream b6956506fa2682afa93770a58ea8c7ba4b4caec1 + * Thu Nov 06 2014 Eric Paris - 0.4-567.0.git3b1ef73 - Bump to upstream 3b1ef739d1fb32a822a22216fb965e22cdd28e7f diff --git a/sources b/sources index ee4341a..cbf4b8b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7975389fc0d8a09fc90d8a544490ca43 kubernetes-3b1ef73.tar.gz +dca524837b6dd7fef235be3fbabcd737 kubernetes-b695650.tar.gz