mirror of https://github.com/apache/cloudstack.git
Changed findOrCreateDhcpServers() to check if start IP is null before retrieving an IP address object
This commit is contained in:
parent
49709d716a
commit
b8c9205000
|
|
@ -1074,7 +1074,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
String defaultNetworkStartIp = null;
|
||||
if (guestNetwork.getCidr() != null) {
|
||||
String startIp = _networkMgr.getStartIpAddress(guestNetwork.getId());
|
||||
if (_ipAddressDao.findByIpAndSourceNetworkId(guestNetwork.getId(), startIp).getAllocatedTime() == null) {
|
||||
if (startIp != null && _ipAddressDao.findByIpAndSourceNetworkId(guestNetwork.getId(), startIp).getAllocatedTime() == null) {
|
||||
defaultNetworkStartIp = startIp;
|
||||
} else if (s_logger.isDebugEnabled()){
|
||||
s_logger.debug("First ip " + startIp + " in network id=" + guestNetwork.getId() + " is already allocated, can't use it for domain router; will get random ip address from the range");
|
||||
|
|
|
|||
Loading…
Reference in New Issue