Merge pull request #58341 from deads2k/controller-06-lease

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

say which lease is being acquired

Adds which lease is being acquired to the message

Kubernetes-commit: fa7dde385b9af88843117af2060233728db2209d
This commit is contained in:
Kubernetes Publisher 2018-01-16 09:41:21 -08:00
commit d8b352f6b2
2 changed files with 618 additions and 618 deletions

106
Godeps/Godeps.json generated
View File

@ -400,215 +400,215 @@
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/equality", "ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/errors", "ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/meta", "ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/resource", "ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing", "ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip", "ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion", "ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/fields", "ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/labels", "ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime", "ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/selection", "ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/types", "ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/cache", "ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/clock", "ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/diff", "ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/errors", "ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/framer", "ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr", "ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/json", "ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/net", "ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand", "ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime", "ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/sets", "ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation", "ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/wait", "ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml", "ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/version", "ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/watch", "ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "17e8c4ddcf485c837950b38d9509bfcadfd0c8e1" "Rev": "bc918d4f73e11cb3110730ec8e8ee02c58d6267c"
}, },
{ {
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto", "ImportPath": "k8s.io/kube-openapi/pkg/util/proto",

View File

@ -171,11 +171,11 @@ func (le *LeaderElector) IsLeader() bool {
// acquire loops calling tryAcquireOrRenew and returns immediately when tryAcquireOrRenew succeeds. // acquire loops calling tryAcquireOrRenew and returns immediately when tryAcquireOrRenew succeeds.
func (le *LeaderElector) acquire() { func (le *LeaderElector) acquire() {
stop := make(chan struct{}) stop := make(chan struct{})
glog.Infof("attempting to acquire leader lease...") desc := le.config.Lock.Describe()
glog.Infof("attempting to acquire leader lease %v...", desc)
wait.JitterUntil(func() { wait.JitterUntil(func() {
succeeded := le.tryAcquireOrRenew() succeeded := le.tryAcquireOrRenew()
le.maybeReportTransition() le.maybeReportTransition()
desc := le.config.Lock.Describe()
if !succeeded { if !succeeded {
glog.V(4).Infof("failed to acquire lease %v", desc) glog.V(4).Infof("failed to acquire lease %v", desc)
return return