Merge pull request #39079 from thaJeztah/bump_swarmkit

bump docker/swarmkit 59163bf75df38489d4a10392265d27156dc473c5
diff --git a/vendor.conf b/vendor.conf
index 55c4e6f..475f640 100644
--- a/vendor.conf
+++ b/vendor.conf
@@ -130,7 +130,7 @@
 github.com/gogo/googleapis                          08a7655d27152912db7aaf4f983275eaf8d128ef
 
 # cluster
-github.com/docker/swarmkit                          18e7e58ea1a5ec016625a636d0d52500eea123bc
+github.com/docker/swarmkit                          59163bf75df38489d4a10392265d27156dc473c5
 github.com/gogo/protobuf                            4cbf7e384e768b4e01799441fdf2a706a5635ae7 # v1.2.0
 github.com/cloudflare/cfssl                         5d63dbd981b5c408effbb58c442d54761ff94fbd # 1.3.2
 github.com/fernet/fernet-go                         1b2437bc582b3cfbb341ee5a29f8ef5b42912ff2
@@ -141,7 +141,7 @@
 github.com/hashicorp/go-immutable-radix             826af9ccf0feeee615d546d69b11f8e98da8c8f1 git://github.com/tonistiigi/go-immutable-radix.git
 github.com/hashicorp/golang-lru                     7087cb70de9f7a8bc0a10c375cb0d2280a8edf9c # v0.5.1
 github.com/coreos/pkg                               3ac0863d7acf3bc44daf49afef8919af12f704ef # v3
-github.com/pivotal-golang/clock                     3fd3c1944c59d9742e1cd333672181cd1a6f9fa0
+code.cloudfoundry.org/clock                         02e53af36e6c978af692887ed449b74026d76fec
 
 # prometheus
 github.com/prometheus/client_golang                 c5b7fccd204277076155f10851dad72b76a49317 # v0.8.0
diff --git a/vendor/github.com/pivotal-golang/clock/LICENSE b/vendor/code.cloudfoundry.org/clock/LICENSE
similarity index 98%
rename from vendor/github.com/pivotal-golang/clock/LICENSE
rename to vendor/code.cloudfoundry.org/clock/LICENSE
index e06d208..f49a4e1 100644
--- a/vendor/github.com/pivotal-golang/clock/LICENSE
+++ b/vendor/code.cloudfoundry.org/clock/LICENSE
@@ -1,4 +1,4 @@
-Apache License
+                                 Apache License
                            Version 2.0, January 2004
                         http://www.apache.org/licenses/
 
@@ -178,7 +178,7 @@
    APPENDIX: How to apply the Apache License to your work.
 
       To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
+      boilerplate notice, with the fields enclosed by brackets "[]"
       replaced with your own identifying information. (Don't include
       the brackets!)  The text should be enclosed in the appropriate
       comment syntax for the file format. We also recommend that a
@@ -186,7 +186,7 @@
       same "printed page" as the copyright notice for easier
       identification within third-party archives.
 
-   Copyright {yyyy} {name of copyright owner}
+   Copyright [yyyy] [name of copyright owner]
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -198,5 +198,4 @@
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
-   limitations under the License.
-
+   limitations under the License.
\ No newline at end of file
diff --git a/vendor/code.cloudfoundry.org/clock/NOTICE b/vendor/code.cloudfoundry.org/clock/NOTICE
new file mode 100644
index 0000000..29c0e5f
--- /dev/null
+++ b/vendor/code.cloudfoundry.org/clock/NOTICE
@@ -0,0 +1,20 @@
+Copyright (c) 2015-Present CloudFoundry.org Foundation, Inc. All Rights Reserved.
+
+This project contains software that is Copyright (c) 2015 Pivotal Software, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+This project may include a number of subcomponents with separate
+copyright notices and license terms. Your use of these subcomponents
+is subject to the terms and conditions of each subcomponent's license,
+as noted in the LICENSE file.
diff --git a/vendor/code.cloudfoundry.org/clock/README.md b/vendor/code.cloudfoundry.org/clock/README.md
new file mode 100644
index 0000000..abaf641
--- /dev/null
+++ b/vendor/code.cloudfoundry.org/clock/README.md
@@ -0,0 +1,5 @@
+# clock
+
+**Note**: This repository should be imported as `code.cloudfoundry.org/clock`.
+
+Provides a `Clock` interface, useful for injecting time dependencies in tests.
diff --git a/vendor/code.cloudfoundry.org/clock/clock.go b/vendor/code.cloudfoundry.org/clock/clock.go
new file mode 100644
index 0000000..6b091d9
--- /dev/null
+++ b/vendor/code.cloudfoundry.org/clock/clock.go
@@ -0,0 +1,53 @@
+package clock
+
+import "time"
+
+type Clock interface {
+	Now() time.Time
+	Sleep(d time.Duration)
+	Since(t time.Time) time.Duration
+	// After waits for the duration to elapse and then sends the current time
+	// on the returned channel.
+	// It is equivalent to clock.NewTimer(d).C.
+	// The underlying Timer is not recovered by the garbage collector
+	// until the timer fires. If efficiency is a concern, use clock.NewTimer
+	// instead and call Timer.Stop if the timer is no longer needed.
+	After(d time.Duration) <-chan time.Time
+
+	NewTimer(d time.Duration) Timer
+	NewTicker(d time.Duration) Ticker
+}
+
+type realClock struct{}
+
+func NewClock() Clock {
+	return &realClock{}
+}
+
+func (clock *realClock) Now() time.Time {
+	return time.Now()
+}
+
+func (clock *realClock) Since(t time.Time) time.Duration {
+	return time.Now().Sub(t)
+}
+
+func (clock *realClock) Sleep(d time.Duration) {
+	<-clock.NewTimer(d).C()
+}
+
+func (clock *realClock) After(d time.Duration) <-chan time.Time {
+	return clock.NewTimer(d).C()
+}
+
+func (clock *realClock) NewTimer(d time.Duration) Timer {
+	return &realTimer{
+		t: time.NewTimer(d),
+	}
+}
+
+func (clock *realClock) NewTicker(d time.Duration) Ticker {
+	return &realTicker{
+		t: time.NewTicker(d),
+	}
+}
diff --git a/vendor/code.cloudfoundry.org/clock/package.go b/vendor/code.cloudfoundry.org/clock/package.go
new file mode 100644
index 0000000..349f67c
--- /dev/null
+++ b/vendor/code.cloudfoundry.org/clock/package.go
@@ -0,0 +1 @@
+package clock // import "code.cloudfoundry.org/clock"
diff --git a/vendor/github.com/pivotal-golang/clock/ticker.go b/vendor/code.cloudfoundry.org/clock/ticker.go
similarity index 100%
rename from vendor/github.com/pivotal-golang/clock/ticker.go
rename to vendor/code.cloudfoundry.org/clock/ticker.go
diff --git a/vendor/github.com/pivotal-golang/clock/timer.go b/vendor/code.cloudfoundry.org/clock/timer.go
similarity index 100%
rename from vendor/github.com/pivotal-golang/clock/timer.go
rename to vendor/code.cloudfoundry.org/clock/timer.go
diff --git a/vendor/github.com/docker/swarmkit/manager/allocator/cnmallocator/networkallocator.go b/vendor/github.com/docker/swarmkit/manager/allocator/cnmallocator/networkallocator.go
index 2f50fd3..4df84d9 100644
--- a/vendor/github.com/docker/swarmkit/manager/allocator/cnmallocator/networkallocator.go
+++ b/vendor/github.com/docker/swarmkit/manager/allocator/cnmallocator/networkallocator.go
@@ -485,7 +485,7 @@
 		return false
 	}
 
-	if networkAttachment == nil {
+	if networkAttachment == nil || networkAttachment.Network == nil {
 		return false
 	}
 
diff --git a/vendor/github.com/docker/swarmkit/manager/role_manager.go b/vendor/github.com/docker/swarmkit/manager/role_manager.go
index a68bc3f..e590152 100644
--- a/vendor/github.com/docker/swarmkit/manager/role_manager.go
+++ b/vendor/github.com/docker/swarmkit/manager/role_manager.go
@@ -4,12 +4,12 @@
 	"context"
 	"time"
 
+	"code.cloudfoundry.org/clock"
 	"github.com/docker/swarmkit/api"
 	"github.com/docker/swarmkit/log"
 	"github.com/docker/swarmkit/manager/state/raft"
 	"github.com/docker/swarmkit/manager/state/raft/membership"
 	"github.com/docker/swarmkit/manager/state/store"
-	"github.com/pivotal-golang/clock"
 )
 
 const (
diff --git a/vendor/github.com/docker/swarmkit/manager/state/raft/raft.go b/vendor/github.com/docker/swarmkit/manager/state/raft/raft.go
index a1193b7..ec1d7f0 100644
--- a/vendor/github.com/docker/swarmkit/manager/state/raft/raft.go
+++ b/vendor/github.com/docker/swarmkit/manager/state/raft/raft.go
@@ -11,6 +11,7 @@
 	"sync/atomic"
 	"time"
 
+	"code.cloudfoundry.org/clock"
 	"github.com/coreos/etcd/pkg/idutil"
 	"github.com/coreos/etcd/raft"
 	"github.com/coreos/etcd/raft/raftpb"
@@ -28,7 +29,6 @@
 	"github.com/docker/swarmkit/manager/state/store"
 	"github.com/docker/swarmkit/watch"
 	"github.com/gogo/protobuf/proto"
-	"github.com/pivotal-golang/clock"
 	"github.com/pkg/errors"
 	"github.com/sirupsen/logrus"
 	"golang.org/x/time/rate"
diff --git a/vendor/github.com/docker/swarmkit/node/node.go b/vendor/github.com/docker/swarmkit/node/node.go
index 70179fd..f82fc13 100644
--- a/vendor/github.com/docker/swarmkit/node/node.go
+++ b/vendor/github.com/docker/swarmkit/node/node.go
@@ -274,9 +274,10 @@
 // configVXLANUDPPort sets vxlan port in libnetwork
 func configVXLANUDPPort(ctx context.Context, vxlanUDPPort uint32) {
 	if err := overlayutils.ConfigVXLANUDPPort(vxlanUDPPort); err != nil {
-		log.G(ctx).WithError(err).Error("Configuring VXLAN port failed")
+		log.G(ctx).WithError(err).Error("failed to configure VXLAN UDP port")
+		return
 	}
-	logrus.Infof(" Swarm successfully initialized VXLAN UDP Port to %d ", vxlanUDPPort)
+	logrus.Infof("initialized VXLAN UDP port to %d ", vxlanUDPPort)
 }
 
 func (n *Node) run(ctx context.Context) (err error) {
diff --git a/vendor/github.com/docker/swarmkit/vendor.conf b/vendor/github.com/docker/swarmkit/vendor.conf
index 3a2c8f7..c55f29c 100644
--- a/vendor/github.com/docker/swarmkit/vendor.conf
+++ b/vendor/github.com/docker/swarmkit/vendor.conf
@@ -8,7 +8,7 @@
 # In >=1.11, those errors were brought back but the string had changed again.
 # After updating GRPC, if integration test failures occur, verify that the
 # string matching there is correct.
-google.golang.org/grpc v1.12.0
+google.golang.org/grpc 7a6a684ca69eb4cae85ad0a484f2e531598c047b # v1.12.2
 github.com/gogo/protobuf v1.0.0
 github.com/golang/protobuf v1.1.0
 github.com/matttproud/golang_protobuf_extensions v1.0.0
@@ -39,7 +39,7 @@
 github.com/opencontainers/image-spec v1.0.1
 github.com/ishidawataru/sctp 07191f837fedd2f13d1ec7b5f885f0f3ec54b1cb
 
-github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76 # v1.1.0
+github.com/davecgh/go-spew  8991bc29aa16c548c550c7ff78260e27b9ab7c73 # v1.1.1
 github.com/Microsoft/go-winio v0.4.11
 github.com/sirupsen/logrus v1.0.6
 github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceaf
@@ -52,15 +52,15 @@
 github.com/hashicorp/golang-lru 0fb14efe8c47ae851c0034ed7a448854d3d34cf3
 github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
 github.com/phayes/permbits f7e3ac5e859d0b919c5068d581cc4c5d4f4f9bc5
-github.com/pivotal-golang/clock 3fd3c1944c59d9742e1cd333672181cd1a6f9fa0
+code.cloudfoundry.org/clock 02e53af36e6c978af692887ed449b74026d76fec
 github.com/pkg/errors 645ef00459ed84a119197bfb8d8205042c6df63d
-github.com/pmezard/go-difflib 792786c7400a136282c1664665ae0a8db921c6c2
+github.com/pmezard/go-difflib 792786c7400a136282c1664665ae0a8db921c6c2 # v1.0.0
 github.com/rcrowley/go-metrics 51425a2415d21afadfd55cd93432c0bc69e9598d
 github.com/spf13/cobra 8e91712f174ced10270cf66615e0a9127e7c4de5
 github.com/spf13/pflag 7f60f83a2c81bc3c3c0d5297f61ddfa68da9d3b7
-github.com/stretchr/testify v1.1.4
+github.com/stretchr/testify ffdc059bfe9ce6a4e144ba849dbedead332c6053 # v1.3.0
 go.etcd.io/bbolt v1.3.1-etcd.8
-golang.org/x/crypto 0709b304e793a5edb4a2c0145f281ecdc20838a4
+golang.org/x/crypto b7391e95e576cacdcdd422573063bc057239113d
 golang.org/x/net a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1
 golang.org/x/sys 90868a75fefd03942536221d7c0e2f84ec62a668
 golang.org/x/text f21a4dfb5e38f5895301dc265a8def02365cc3d0 # v0.3.0
diff --git a/vendor/github.com/pivotal-golang/clock/README.md b/vendor/github.com/pivotal-golang/clock/README.md
deleted file mode 100644
index 9741b8b..0000000
--- a/vendor/github.com/pivotal-golang/clock/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Provides a `Clock` interface, useful for injecting time dependencies in tests.
diff --git a/vendor/github.com/pivotal-golang/clock/clock.go b/vendor/github.com/pivotal-golang/clock/clock.go
deleted file mode 100644
index 9c7322c..0000000
--- a/vendor/github.com/pivotal-golang/clock/clock.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package clock
-
-import "time"
-
-type Clock interface {
-	Now() time.Time
-	Sleep(d time.Duration)
-	Since(t time.Time) time.Duration
-
-	NewTimer(d time.Duration) Timer
-	NewTicker(d time.Duration) Ticker
-}
-
-type realClock struct{}
-
-func NewClock() Clock {
-	return &realClock{}
-}
-
-func (clock *realClock) Now() time.Time {
-	return time.Now()
-}
-
-func (clock *realClock) Since(t time.Time) time.Duration {
-	return time.Now().Sub(t)
-}
-
-func (clock *realClock) Sleep(d time.Duration) {
-	<-clock.NewTimer(d).C()
-}
-
-func (clock *realClock) NewTimer(d time.Duration) Timer {
-	return &realTimer{
-		t: time.NewTimer(d),
-	}
-}
-
-func (clock *realClock) NewTicker(d time.Duration) Ticker {
-	return &realTicker{
-		t: time.NewTicker(d),
-	}
-}