mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixed the conditon which checks for the provider's capabilty and reapply ipaliases on virtual router restart.
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
This commit is contained in:
parent
d06a5bc5f0
commit
a8387568f3
@ -2013,7 +2013,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
|
||||
DhcpServiceProvider sp = (DhcpServiceProvider) element;
|
||||
Map <Capability, String> dhcpCapabilities = element.getCapabilities().get(Service.Dhcp);
|
||||
String supportsMultipleSubnets = dhcpCapabilities.get(Capability.DhcpAccrossMultipleSubnets);
|
||||
if ((supportsMultipleSubnets != null || Boolean.valueOf(supportsMultipleSubnets)) && profile.getIp6Address() == null) {
|
||||
if ((supportsMultipleSubnets != null && Boolean.valueOf(supportsMultipleSubnets)) && profile.getIp6Address() == null) {
|
||||
if (!sp.configDhcpSupportForSubnet(network, profile, vmProfile, dest, context)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2483,7 +2483,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
|
||||
if (_networkModel.isProviderSupportServiceInNetwork(guestNetworkId, Service.Dhcp, provider)) {
|
||||
Map<Network.Capability, String> dhcpCapabilities = _networkSvc.getNetworkOfferingServiceCapabilities(_networkOfferingDao.findById(_networkDao.findById(guestNetworkId).getNetworkOfferingId()), Service.Dhcp);
|
||||
String supportsMultipleSubnets = dhcpCapabilities.get(Network.Capability.DhcpAccrossMultipleSubnets);
|
||||
if (supportsMultipleSubnets == null || !Boolean.valueOf(supportsMultipleSubnets)) {
|
||||
if (supportsMultipleSubnets != null && Boolean.valueOf(supportsMultipleSubnets)) {
|
||||
List<NicIpAliasVO> revokedIpAliasVOs = _nicIpAliasDao.listByNetworkIdAndState(guestNetworkId, NicIpAlias.state.revoked);
|
||||
s_logger.debug("Found" + revokedIpAliasVOs.size() + "ip Aliases to revoke on the router as a part of dhcp configuration");
|
||||
removeRevokedIpAliasFromDb(revokedIpAliasVOs);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user