You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/10/13 07:25:49 UTC

[GitHub] [cloudstack] Spaceman1984 opened a new pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Spaceman1984 opened a new pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401


   …le in network offering
   
   ## Description
   <!--- Describe your changes in detail -->
   Throwing an error when port 53 is added to a load balancer when DNS is available on the network service offering.
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   Fixes: #4285 
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ## Screenshots (if appropriate):
   
   ## How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   Try to add port 53 as a public port as a load balancer rule, an error will be returned.
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-721583109


   @Spaceman1984 can you rebase on 4.14?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-707944059


   <b>Trillian test result (tid-2928)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 36946 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4401-t2928-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
   Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
   Smoke tests completed. 83 look OK, 2 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 315.19 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 303.30 | test_vpc_redundant.py
   test_hostha_kvm_host_fencing | `Error` | 99.19 | test_hostha_kvm.py
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-722135304


   Closing in favor of #4442


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on a change in pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on a change in pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#discussion_r504513407



##########
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) {

Review comment:
       I tested port 8081 and it threw an error, seems like there is already some code somewhere that checks for certain ports, I'll see if I should move my code there as well.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#discussion_r504497817



##########
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) {

Review comment:
       @Spaceman1984 
   (1) the issue happens only if lb uses source nat IP. so IP needs to be checked
   (2) what about port 8081 which is used for haproxy stats ?
   




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on a change in pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on a change in pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#discussion_r504499505



##########
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) {

Review comment:
       I'll look into it @weizhouapache.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-708347484


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2176


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-707550408


   @blueorangutan package


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-708220800


   @Spaceman1984 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-708369417


   @blueorangutan test


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-708319742


   @blueorangutan package


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-708320325


   @Spaceman1984 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on a change in pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on a change in pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#discussion_r503838412



##########
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:
       Yes @DaanHoogland , mostly reformatting, there was an unnecessary check which I removed:
   ```
    LoadBalancer result = null;
    if (result == null) {
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-707570067


   @blueorangutan test


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-707550657


   @Spaceman1984 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 closed pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 closed pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-708220467


   @blueorangutan test


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-708569492


   <b>Trillian test result (tid-2941)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 35646 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4401-t2941-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
   Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
   Smoke tests completed. 84 look OK, 1 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_hostha_kvm_host_fencing | `Error` | 168.08 | test_hostha_kvm.py
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-708370005


   @Spaceman1984 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-707570671


   @Spaceman1984 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 closed pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 closed pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-707567752


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2165


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on a change in pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on a change in pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#discussion_r504575562



##########
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) {

Review comment:
       I think the code is fine where it is, I've added a check for Source NAT.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack] Spaceman1984 commented on pull request #4401: Preventing port 53 being added as lb rule when dns service is availab…

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on pull request #4401:
URL: https://github.com/apache/cloudstack/pull/4401#issuecomment-721652082


   Sure @DaanHoogland, I'll try to get to it later today. 


----------------------------------------------------------------
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:
users@infra.apache.org