weizhouapache opened a new pull request #3847: VR: Fix Redundant VRouter guest 
network on wrong interface
URL: https://github.com/apache/cloudstack/pull/3847
 
 
   ## Description
   <!--- Describe your changes in detail -->
   
   This PR aims to fix the issues on KVM environments with linux bridge and OVS 
if there are multiple public IPs associated to a network or vpc.
   
   fixes: #3179 
   
   <!-- 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: # -->
   
   ## 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. -->
   
   - [X] Tested the following network on KVM with linux bridge and KVM with OVS.
   
   - networks with single VR
   - networks with redundant VRs
   
   Actions
     1. Create network offering with single VR, and enable it
     2. create isolated network with the network offering
     3. create a vm in the network.
       verify the available nics in VR should be "eth0,eth1,eth2"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP
     4. get a free public ip, assign to network, and create port forwarding 
rules (ssh) to the vm
       verify the available nics in VR should be "eth0,eth1,eth2"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP and new ip
     5. remove the port forwarding rule, and release the new ip
       verify the available nics in VR should be "eth0,eth1,eth2"
       verify the IPs in VR. eth0 -> guest nic IP, eth2 -> source nat IP
    
     6. create new public ip range 1
     7. get a free ip in new ip range, assign to network, and create port 
forwarding rules (ssh) to the vm
       verify the available nics in VR should be "eth0,eth1,eth2,eth3"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 1
     8. get a free ip in new ip range, assign to network, and create port 
forwarding rules (ssh) to the vm
       verify the available nics in VR should be "eth0,eth1,eth2,eth3"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 1, new ip 2,
     9. get a free ip in new ip range, assign to network, and create port 
forwarding rules (ssh) to the vm
       verify the available nics in VR should be "eth0,eth1,eth2,eth3"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 1, new ip 2, new ip 3
     10. release new ip 2
       verify the available nics in VR should be "eth0,eth1,eth2,eth3"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 1, new ip 3
     11. release new ip 1
       verify the available nics in VR should be "eth0,eth1,eth2,eth3"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 3
     12. create new public ip range 2
     13. get a free ip 4 in new ip range 2, assign to network, and create port 
forwarding rules (ssh) to the vm
       verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 3, eth4 -> new ip 4
     14. get a free ip 5 in new ip range 2, assign to network, and create port 
forwarding rules (ssh) to the vm
       verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 3, eth4 -> new ip 4/5
     15. get a free ip 6 in new ip range 2, assign to network, and create port 
forwarding rules (ssh) to the vm
       verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 3, eth4 -> new ip 4/5/6
     16. release new ip 5
       verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 3, eth4 -> new ip 4/6
     17. release new ip 4
       verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 3, eth4 -> new ip 6
     18. release new ip 3
       verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> 
new ip 6
     19. restart network
       verify the available nics in VR should be "eth0,eth1,eth2,eth4,"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth4 -> 
new ip 6
     20. restart network with cleanup
       verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 6
     21. restart network with cleanup, makeredundant=true
       verify the available nics in VR should be "eth0,eth1,eth2,eth3,"
       verify the IPs in VR. eth0 -> guest nic, eth2 -> source nat IP, eth3 -> 
new ip 6
   
   - [X] Tested the following vpcs on KVM with linux bridge and KVM with OVS.
   
   
   - vpc with single VR
   - vpc with redundant VRs
   
   Actions
    1. get vpc offering with single VR
    2. create a vpc with the vpc offering
      verify the available nics in VR should be "eth0,eth1"
      verify the IPs in VR. eth0 -> control nic, eth1 -> source nat IP
    3. create a tier in the vpc, and create a vm in the tier.
      verify the available nics in VR should be "eth0,eth1,eth2"
      verify the IPs in VR. eth0 -> control nic, eth1 -> source nat IP, eth2 -> 
tier 1
    4. get a free public ip, assign to network, and create port forwarding 
rules (ssh) to the vm
      verify the available nics in VR should be "eth0,eth1,eth2"
      verify the IPs in VR. eth0 -> control nic, eth1 -> source nat IP, eth2 -> 
tier 1
    5. remove the port forwarding rule, and release the new ip
      verify the available nics in VR should be "eth0,eth1,eth2"
      verify the IPs in VR. eth0 -> control nic, eth1 -> source nat IP, eth2 -> 
tier 1
   
    6. create new public ip range 1
    7. get a free ip in new ip range, assign to network, and create port 
forwarding rules (ssh) to the vm
      verify the available nics in VR should be "eth0,eth1,eth2,eth3"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new 
ip 1
    8. get a free ip in new ip range, assign to network, and create port 
forwarding rules (ssh) to the vm
      verify the available nics in VR should be "eth0,eth1,eth2,eth3"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new 
ip 1/2
    9. get a free ip in new ip range, assign to network, and create port 
forwarding rules (ssh) to the vm
      verify the available nics in VR should be "eth0,eth1,eth2,eth3"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new 
ip 1/2/3
    10. release new ip 2
      verify the available nics in VR should be "eth0,eth1,eth2,eth3"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new 
ip 1/3
    11. release new ip 1
      verify the available nics in VR should be "eth0,eth1,eth2,eth3"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new 
ip 3
    12. create a tier 2 in the vpc, and create a vm 2 in the tier2.
      verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new 
ip 3, eth4 -> tier 2
   
    13. create new public ip range 2
    14. get a free ip 4 in new ip range 2, assign to network, and create port 
forwarding rules (ssh) to the vm
      verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new 
ip 3, eth4 -> tier 2, eth5 -> new ip 4
    15. get a free ip 5 in new ip range 2, assign to network, and create port 
forwarding rules (ssh) to the vm
      verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new 
ip 3, eth4 -> tier 2, eth5 -> new ip 4/5
    16. get a free ip 6 in new ip range 2, assign to network, and create port 
forwarding rules (ssh) to the vm
      verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new 
ip 3, eth4 -> tier 2, eth5 -> new ip 4/5/6
    17. release new ip 5
      verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new 
ip 3, eth4 -> tier 2, eth5 -> new ip 4/6
    18. release new ip 4
      verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,eth5,"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth3 -> new 
ip 3, eth4 -> tier 2, eth5 -> new ip 6
    19. release new ip 3
      verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 
2, eth5 -> new ip 6
    20. restart tier1
      verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 
2, eth5 -> new ip 6
    20. restart tier2
      verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 
2, eth5 -> new ip 6
    22. restart VPC
      verify the available nics in VR should be "eth0,eth1,eth2,eth4,eth5,"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> tier 1, eth4 -> tier 
2, eth5 -> new ip 6
    23. restart VPC with cleanup
      verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> 
tier 1, eth4 -> tier 2
    24. restart VPC with cleanup, makeredundant=true
      verify the available nics in VR should be "eth0,eth1,eth2,eth3,eth4,"
      verify the IPs in VR. eth1 -> source nat IP, eth2 -> new ip 6, eth3 -> 
tier 1, eth4 -> tier 2
   
   
   <!-- 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:
[email protected]


With regards,
Apache Git Services

Reply via email to