Fix origin issue#2834; submit existing subnets as in-use
@@ -90,9 +90,8 @@ func (oc *OvsController) StartMaster(sync bool, containerNetwork string, contain
}
// initialize the subnet key?
- err := oc.subnetRegistry.InitSubnets()
+ oc.subnetRegistry.InitSubnets()
subrange := make([]string, 0)
- if err != nil {
subnets, err := oc.subnetRegistry.GetSubnets()
if err != nil {
log.Errorf("Error in initializing/fetching subnets: %v", err)
@@ -101,7 +100,6 @@ func (oc *OvsController) StartMaster(sync bool, containerNetwork string, contain
for _, sub := range *subnets {
subrange = append(subrange, sub.Sub)
}
- }
err = oc.subnetRegistry.WriteNetworkConfig(containerNetwork, containerSubnetLength)
if err != nil {
