DaanHoogland commented on a change in pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#discussion_r503819956
##########
File path:
server/src/main/java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
##########
@@ -1598,65 +1602,73 @@ public LoadBalancer createPublicLoadBalancerRule(String
xId, String name, String
// LoadBalancer result = _elbMgr.handleCreateLoadBalancerRule(lb,
// lbOwner, lb.getNetworkId());
LoadBalancer result = null;
- if (result == null) {
- IpAddress systemIp = null;
- NetworkOffering off = _entityMgr.findById(NetworkOffering.class,
network.getNetworkOfferingId());
- if (off.isElasticLb() && ipVO == null && network.getVpcId() ==
null) {
- systemIp = _ipAddrMgr.assignSystemIp(networkId, lbOwner, true,
false);
- if (systemIp != null) {
- ipVO = _ipAddressDao.findById(systemIp.getId());
+ IpAddress systemIp = null;
+ NetworkOffering off = _entityMgr.findById(NetworkOffering.class,
network.getNetworkOfferingId());
+
+ if (srcPortStart == 53) {
+ List<NetworkOfferingServiceMapVO> offerinServices =
_networkOfferingServiceDao.listByNetworkOfferingId(network.getNetworkOfferingId());
+ for (NetworkOfferingServiceMapVO serviceMapVo: offerinServices){
+ if (serviceMapVo.getService() == Service.Dns.getName()) {
+ throw new InvalidParameterValueException("Error adding
load balancer rule, cannot add port 53 with network service offering having DNS
service.");
Review comment:
Loads of false positives on the diff. This is actually the only change
@Spaceman1984 , or am I missing something else?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]