Preventing port 53 being added as lb rule when dns service is availab…#4401
Preventing port 53 being added as lb rule when dns service is availab…#4401Spaceman1984 wants to merge 2 commits intoapache:masterfrom
Conversation
…le in network offering
|
@blueorangutan package |
|
@Spaceman1984 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2165 |
|
@blueorangutan test |
|
@Spaceman1984 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
server/src/main/java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
Outdated
Show resolved
Hide resolved
|
Trillian test result (tid-2928)
|
|
@blueorangutan test |
|
@Spaceman1984 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
| IpAddress systemIp = null; | ||
| NetworkOffering off = _entityMgr.findById(NetworkOffering.class, network.getNetworkOfferingId()); | ||
|
|
||
| if (srcPortStart == 53) { |
There was a problem hiding this 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 ?
There was a problem hiding this 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.
There was a problem hiding this comment.
I think the code is fine where it is, I've added a check for Source NAT.
|
@blueorangutan package |
|
@Spaceman1984 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2176 |
|
@blueorangutan test |
|
@Spaceman1984 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2941)
|
weizhouapache
left a comment
There was a problem hiding this comment.
lgtm
would it be better to fix it in 4.14 as well ?
|
@Spaceman1984 can you rebase on 4.14? |
|
Sure @DaanHoogland, I'll try to get to it later today. |
|
Closing in favor of #4442 |
…le in network offering
Description
Throwing an error when port 53 is added to a load balancer when DNS is available on the network service offering.
Fixes: #4285
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
Try to add port 53 as a public port as a load balancer rule, an error will be returned.