diff --git a/drivers/ovsd/ovsdbDriver.go b/drivers/ovsd/ovsdbDriver.go index 390e125db..965df4b79 100644 --- a/drivers/ovsd/ovsdbDriver.go +++ b/drivers/ovsd/ovsdbDriver.go @@ -839,12 +839,13 @@ func (d *OvsdbDriver) GetOfpPortNo(intfName string) (uint32, error) { if err == nil && len(row) > 0 && len(row[0].Rows) > 0 { value := row[0].Rows[0]["ofport"] - if value != -1 && reflect.TypeOf(value).Kind() == reflect.Float64 { + if reflect.TypeOf(value).Kind() == reflect.Float64 { //retry few more time. Due to asynchronous call between //port creation and populating ovsdb entry for the interface //may not be populated instantly. - ofpPort := uint32(reflect.ValueOf(value).Float()) - return ofpPort, nil + if ofpPort := reflect.ValueOf(value).Float(); ofpPort != -1 { + return uint32(ofpPort), nil + } } } time.Sleep(300 * time.Millisecond) diff --git a/netmaster/docknet/docknet.go b/netmaster/docknet/docknet.go index 2fc03af01..6116c5362 100644 --- a/netmaster/docknet/docknet.go +++ b/netmaster/docknet/docknet.go @@ -182,6 +182,7 @@ func CreateDockNet(tenantName, networkName, serviceName string, nwCfg *mastercfg IPAM: &ipamCfg, Options: netPluginOptions, Attachable: true, + EnableIPv6: (subnetCIDRv6 != ""), } log.Infof("Creating docker network: %+v", nwCreate)