Merge pull request #169 from thaJeztah/18.09_bump_libnetwork2

[18.09] bump libnetwork 4725f2163fb (bump_18.09 branch)
This commit is contained in:
Andrew Hsu 2019-03-08 14:45:06 -08:00 committed by GitHub
commit d51db2f20b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 19 deletions

View file

@ -3,7 +3,7 @@
# LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When # LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When
# updating the binary version, consider updating github.com/docker/libnetwork # updating the binary version, consider updating github.com/docker/libnetwork
# in vendor.conf accordingly # in vendor.conf accordingly
LIBNETWORK_COMMIT=2cfbf9b1f98162a55829a21cc603c76072a75382 # bump_18.09 branch LIBNETWORK_COMMIT=4725f2163fb214a6312f3beae5991f838ec36326 # bump_18.09 branch
install_proxy() { install_proxy() {
case "$1" in case "$1" in

View file

@ -37,7 +37,7 @@ github.com/mitchellh/hashstructure 2bca23e0e452137f789efbc8610126fd8b94f73b
#get libnetwork packages #get libnetwork packages
# When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy accordingly # When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy accordingly
github.com/docker/libnetwork 2cfbf9b1f98162a55829a21cc603c76072a75382 # bump_18.09 branch github.com/docker/libnetwork 4725f2163fb214a6312f3beae5991f838ec36326 # bump_18.09 branch
github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9 github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80 github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec

View file

@ -181,10 +181,8 @@ func (c *controller) defaultGwNetwork() (Network, error) {
defer func() { <-procGwNetwork }() defer func() { <-procGwNetwork }()
n, err := c.NetworkByName(libnGWNetwork) n, err := c.NetworkByName(libnGWNetwork)
if err != nil { if _, ok := err.(types.NotFoundError); ok {
if _, ok := err.(types.NotFoundError); ok { n, err = c.createGWNetwork()
n, err = c.createGWNetwork()
}
} }
return n, err return n, err
} }

View file

@ -87,16 +87,11 @@ func initFirewalld() {
} }
func detectIptables() { func detectIptables() {
path, err := exec.LookPath("iptables-legacy") // debian has iptables-legacy and iptables-nft now path, err := exec.LookPath("iptables")
if err != nil { if err != nil {
path, err = exec.LookPath("iptables") return
if err != nil {
return
}
} }
iptablesPath = path iptablesPath = path
supportsXlock = exec.Command(iptablesPath, "--wait", "-L", "-n").Run() == nil supportsXlock = exec.Command(iptablesPath, "--wait", "-L", "-n").Run() == nil
mj, mn, mc, err := GetVersion() mj, mn, mc, err := GetVersion()
if err != nil { if err != nil {

View file

@ -396,11 +396,9 @@ func (n *network) validateConfiguration() error {
driverOptions map[string]string driverOptions map[string]string
opts interface{} opts interface{}
) )
switch data.(type) { switch t := data.(type) {
case map[string]interface{}: case map[string]interface{}, map[string]string:
opts = data.(map[string]interface{}) opts = t
case map[string]string:
opts = data.(map[string]string)
} }
ba, err := json.Marshal(opts) ba, err := json.Marshal(opts)
if err != nil { if err != nil {

View file

@ -288,7 +288,12 @@ func (nDB *NetworkDB) rejoinClusterBootStrap() {
return return
} }
myself, _ := nDB.nodes[nDB.config.NodeID] myself, ok := nDB.nodes[nDB.config.NodeID]
if !ok {
nDB.RUnlock()
logrus.Warnf("rejoinClusterBootstrap unable to find local node info using ID:%v", nDB.config.NodeID)
return
}
bootStrapIPs := make([]string, 0, len(nDB.bootStrapIP)) bootStrapIPs := make([]string, 0, len(nDB.bootStrapIP))
for _, bootIP := range nDB.bootStrapIP { for _, bootIP := range nDB.bootStrapIP {
// botostrap IPs are usually IP:port from the Join // botostrap IPs are usually IP:port from the Join