diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java index 70f0d5a1182..7e971bd0e25 100755 --- a/server/src/com/cloud/network/NetworkServiceImpl.java +++ b/server/src/com/cloud/network/NetworkServiceImpl.java @@ -196,7 +196,9 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { private static final long MIN_GRE_KEY = 0L; private static final long MAX_GRE_KEY = 4294967295L; // 2^32 -1 private static final long MIN_VXLAN_VNI = 0L; - private static final long MAX_VXLAN_VNI = 16777215L; // 2^24 -1 + private static final long MAX_VXLAN_VNI = 16777214L; // 2^24 -2 + // MAX_VXLAN_VNI should be 16777215L (2^24-1), but Linux vxlan interface doesn't accept VNI:2^24-1 now. + // It seems a bug. @Inject DataCenterDao _dcDao = null; @@ -3781,12 +3783,12 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { PhysicalNetworkVO pvo = _physicalNetworkDao.findById(physicalNetworkId); DataCenterVO dvo = _dcDao.findById(pvo.getDataCenterId()); if (dvo.getNetworkType() == NetworkType.Basic) { - - Provider provider = Network.Provider.getProvider("BaremetalDhcpProvider"); - if (provider == null) { + + Provider provider = Network.Provider.getProvider("BaremetalDhcpProvider"); + if (provider == null) { // baremetal is not loaded return null; - } + } addProviderToPhysicalNetwork(physicalNetworkId, "BaremetalDhcpProvider", null, null); addProviderToPhysicalNetwork(physicalNetworkId, "BaremetalPxeProvider", null, null);