You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "weizhouapache (via GitHub)" <gi...@apache.org> on 2024/04/04 10:30:00 UTC

[PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

weizhouapache opened a new pull request, #8881:
URL: https://github.com/apache/cloudstack/pull/8881

   ### Description
   
   This PR fixes #8765 
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- 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: # -->
   
   <!--- ******************************************************************************* -->
   <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ******************************************************************************* -->
   
   ### Types of changes
   
   - [ ] 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)
   - [ ] build/CI
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### 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 -->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2037308495

   <b>[SF] Trillian Build Failed (tid-9704)<b/>


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2040625162

   <b>[SF] Trillian test result (tid-9724)</b>
   Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9
   Total time taken: 47144 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8881-t9724-kvm-alma9.zip
   Smoke tests completed. 109 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 632.13 | test_vpc_redundant.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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2036977228

   @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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2039083232

   <b>[SF] Trillian test result (tid-9714)</b>
   Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 43042 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8881-t9714-kvm-rocky8.zip
   Smoke tests completed. 109 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_migrate_VM_and_root_volume | `Error` | 82.26 | test_vm_life_cycle.py
   test_02_migrate_VM_with_two_data_disks | `Error` | 53.83 | test_vm_life_cycle.py
   test_08_migrate_vm | `Error` | 0.07 | test_vm_life_cycle.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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2036950860

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8881?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `0%` with `35 lines` in your changes are missing coverage. Please review.
   > Project coverage is 13.17%. Comparing base [(`7a9985b`)](https://app.codecov.io/gh/apache/cloudstack/commit/7a9985b42bfdf43efb1a47f02ab58466936472ac?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`e63cf69`)](https://app.codecov.io/gh/apache/cloudstack/pull/8881?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   | [Files](https://app.codecov.io/gh/apache/cloudstack/pull/8881?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...ork/router/VirtualNetworkApplianceManagerImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/8881?src=pr&el=tree&filepath=server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcloud%2Fnetwork%2Frouter%2FVirtualNetworkApplianceManagerImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL25ldHdvcmsvcm91dGVyL1ZpcnR1YWxOZXR3b3JrQXBwbGlhbmNlTWFuYWdlckltcGwuamF2YQ==) | 0.00% | [21 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8881?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../router/VpcVirtualNetworkApplianceManagerImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/8881?src=pr&el=tree&filepath=server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcloud%2Fnetwork%2Frouter%2FVpcVirtualNetworkApplianceManagerImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL25ldHdvcmsvcm91dGVyL1ZwY1ZpcnR1YWxOZXR3b3JrQXBwbGlhbmNlTWFuYWdlckltcGwuamF2YQ==) | 0.00% | [14 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8881?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               4.18    #8881      +/-   ##
   ============================================
   - Coverage     13.17%   13.17%   -0.01%     
   + Complexity     9215     9214       -1     
   ============================================
     Files          2725     2725              
     Lines        258215   258235      +20     
     Branches      40247    40249       +2     
   ============================================
   - Hits          34017    34013       -4     
   - Misses       219885   219911      +26     
   + Partials       4313     4311       -2     
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8881?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2036827733

   Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 9156


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2037658588

   <b>[SF] Trillian Build Failed (tid-9713)<b/>


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2037537257

   <b>[SF] Trillian Build Failed (tid-9707)<b/>


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2040351276

   Merging based on approvals and manual testing.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2036972725

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9157


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2036982903

   @weizhouapache a [SL] 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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2037444328

   
   @blueorangutan test rocky8 kvm-rocky8


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2039134997

   @DaanHoogland a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma9) 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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2039131843

   @blueorangutan test alma9 kvm-alma9


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "JoaoJandre (via GitHub)" <gi...@apache.org>.
JoaoJandre merged PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#discussion_r1553605762


##########
server/src/main/java/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java:
##########
@@ -522,12 +528,32 @@ public boolean finalizeCommandsOnStart(final Commands cmds, final VirtualMachine
                 cmds.addCommand(finishCmd);
             }
 
+            createApplyLoadBalancingRulesCommandsForVpc(cmds, domainRouterVO, provider, guestNics);
+
             // Add network usage commands
             cmds.addCommands(usageCmds);
         }
         return true;
     }
 
+    private void createApplyLoadBalancingRulesCommandsForVpc(final Commands cmds, DomainRouterVO domainRouterVO, Provider provider,
+                                                             List<Pair<Nic, Network>> guestNics) {
+        final List<LoadBalancerVO> lbs = loadBalancerDao.listByVpcIdAndScheme(domainRouterVO.getVpcId(), Scheme.Public);
+        final List<LoadBalancingRule> lbRules = new ArrayList<>();
+        createLoadBalancingRulesList(lbRules, lbs);
+        s_logger.debug("Found " + lbRules.size() + " load balancing rule(s) to apply as a part of VPC VR " + domainRouterVO + " start.");
+        if (!lbRules.isEmpty()) {

Review Comment:
   ```suggestion
           if (lbRules.isEmpty()) {
                  return;
           }
   ```



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "SadiJr (via GitHub)" <gi...@apache.org>.
SadiJr commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2037260716

   Hey @weizhouapache, this PR is already done to be reviewed?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2037454611

   @weizhouapache a [SL] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) 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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2037334559

   > Hey @weizhouapache, is this PR already done to be reviewed?
   
   @SadiJr 
   yes, it is ready for review and testing


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2036800711

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. 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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2036796658

   @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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2036852513

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. 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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#issuecomment-2036849461

   
   @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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] server: fix haproxy misconfiguration after VPC VR start [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8881:
URL: https://github.com/apache/cloudstack/pull/8881#discussion_r1553624243


##########
server/src/main/java/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java:
##########
@@ -522,12 +528,32 @@ public boolean finalizeCommandsOnStart(final Commands cmds, final VirtualMachine
                 cmds.addCommand(finishCmd);
             }
 
+            createApplyLoadBalancingRulesCommandsForVpc(cmds, domainRouterVO, provider, guestNics);
+
             // Add network usage commands
             cmds.addCommands(usageCmds);
         }
         return true;
     }
 
+    private void createApplyLoadBalancingRulesCommandsForVpc(final Commands cmds, DomainRouterVO domainRouterVO, Provider provider,
+                                                             List<Pair<Nic, Network>> guestNics) {
+        final List<LoadBalancerVO> lbs = loadBalancerDao.listByVpcIdAndScheme(domainRouterVO.getVpcId(), Scheme.Public);
+        final List<LoadBalancingRule> lbRules = new ArrayList<>();
+        createLoadBalancingRulesList(lbRules, lbs);
+        s_logger.debug("Found " + lbRules.size() + " load balancing rule(s) to apply as a part of VPC VR " + domainRouterVO + " start.");
+        if (!lbRules.isEmpty()) {

Review Comment:
   @sureshanaparti I don't think this return mid-method makes for better readable code.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org