mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-1315: Fix NPE when try to upgrade network from VR to SRX-F5
Still return a valid object when reverting non-existed rules.
This commit is contained in:
parent
a818502619
commit
7c7b05f4e0
|
|
@ -819,7 +819,8 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
|
|||
}
|
||||
} else {
|
||||
s_logger.debug("Revoking a rule for an inline load balancer that has not been programmed yet.");
|
||||
return null;
|
||||
nic.setNic(null);
|
||||
return nic;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -877,9 +878,9 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
|
|||
MappingNic nic = getLoadBalancingIpNic(zone, network, rule.getSourceIpAddressId(), revoked, null);
|
||||
mappingStates.add(nic.getState());
|
||||
NicVO loadBalancingIpNic = nic.getNic();
|
||||
if (loadBalancingIpNic == null) {
|
||||
continue;
|
||||
}
|
||||
if (loadBalancingIpNic == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Change the source IP address for the load balancing rule to be the load balancing IP address
|
||||
srcIp = loadBalancingIpNic.getIp4Address();
|
||||
|
|
|
|||
Loading…
Reference in New Issue