Browse code

vendor: docker/libnetwork 026aabaa659832804b01754aaadd2c0f420c68b6 (bump_19.03 branch)

full diff: https://github.com/docker/libnetwork/compare/153d0769a1181bf591a9637fd487a541ec7db1e6...026aabaa659832804b01754aaadd2c0f420c68b6

- Fix 'failed to get network during CreateEndpoint'
- log error instead if disabling IPv6 router advertisement failed

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2020/06/17 22:51:11
Showing 5 changed files
... ...
@@ -3,7 +3,7 @@
3 3
 # LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When
4 4
 # updating the binary version, consider updating github.com/docker/libnetwork
5 5
 # in vendor.conf accordingly
6
-: ${LIBNETWORK_COMMIT:=153d0769a1181bf591a9637fd487a541ec7db1e6} # bump_19.03 branch
6
+: ${LIBNETWORK_COMMIT:=026aabaa659832804b01754aaadd2c0f420c68b6} # bump_19.03 branch
7 7
 
8 8
 install_proxy() {
9 9
 	case "$1" in
... ...
@@ -38,7 +38,7 @@ github.com/gofrs/flock                              7f43ea2e6a643ad441fc12d0ecc0
38 38
 # libnetwork
39 39
 
40 40
 # When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly
41
-github.com/docker/libnetwork                        153d0769a1181bf591a9637fd487a541ec7db1e6 # bump_19.03 branch
41
+github.com/docker/libnetwork                        026aabaa659832804b01754aaadd2c0f420c68b6 # bump_19.03 branch
42 42
 github.com/docker/go-events                         e31b211e4f1cd09aa76fe4ac244571fab96ae47f
43 43
 github.com/armon/go-radix                           e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
44 44
 github.com/armon/go-metrics                         eb0af217e5e9747e41dd5303755356b62d28e3ec
... ...
@@ -63,7 +63,7 @@ func setupDefaultSysctl(config *networkConfiguration, i *bridgeInterface) error
63 63
 		return nil
64 64
 	}
65 65
 	if err := ioutil.WriteFile(sysPath, []byte{'0', '\n'}, 0644); err != nil {
66
-		return fmt.Errorf("libnetwork: Unable to disable IPv6 router advertisement: %v", err)
66
+		logrus.WithError(err).Warn("unable to disable IPv6 router advertisement")
67 67
 	}
68 68
 	return nil
69 69
 }
... ...
@@ -1181,7 +1181,8 @@ func (n *network) createEndpoint(name string, options ...EndpointOption) (Endpoi
1181 1181
 	ep.locator = n.getController().clusterHostID()
1182 1182
 	ep.network, err = ep.getNetworkFromStore()
1183 1183
 	if err != nil {
1184
-		return nil, fmt.Errorf("failed to get network during CreateEndpoint: %v", err)
1184
+		logrus.Errorf("failed to get network during CreateEndpoint: %v", err)
1185
+		return nil, err
1185 1186
 	}
1186 1187
 	n = ep.network
1187 1188
 
... ...
@@ -103,8 +103,7 @@ func (c *controller) getNetworkFromStore(nid string) (*network, error) {
103 103
 		}
104 104
 		return n, nil
105 105
 	}
106
-
107
-	return nil, fmt.Errorf("network %s not found", nid)
106
+	return nil, ErrNoSuchNetwork(nid)
108 107
 }
109 108
 
110 109
 func (c *controller) getNetworksForScope(scope string) ([]*network, error) {