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

   
   ### Description
   
   This PR fixes #5678 
   
   Normally SSVMs in multiple zones communicate via the public IPs.
   In some cases, the public IPs are in the internal allowed sites. There are 
some routes in SSVMs which causes the communication to use the private IPs. We 
need to add the private IP of other SSVM to /var/www/html/copy/.htaccess if the 
public IP is in secstorage.allowed.internal.sites
   
   
   <!--- 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: AUTOMATATION 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)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   Without this PR, SSVM contains only public IP of another SSVM
   ```
   root@s-8-VM:~# cat /var/www/html/copy/.htaccess
   Options -Indexes
   order deny,allow
   deny from all
   allow from 10.0.17.55
   ```
   With this PR, it has both private and public IP of another SSVM
   ```
   root@s-8-VM:~# cat /var/www/html/copy/.htaccess
   Options -Indexes
   order deny,allow
   deny from all
   allow from 10.0.17.55
   allow from 10.0.40.129
   ```
   
   The SSVM has route to all internal allowed sites via private nic, for 
example (secstorage.allowed.internal.sites=10.0.0.0/16)
   ```
   root@s-8-VM:~# ip route
   default via 10.0.96.1 dev eth2 
   8.8.4.4 via 10.0.32.1 dev eth1 
   10.0.0.0/16 via 10.0.32.1 dev eth1 
   10.0.32.0/20 dev eth1 proto kernel scope link src 10.0.36.127 
   10.0.96.0/20 dev eth2 proto kernel scope link src 10.0.99.22 
   169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.148.119 
   ```
   
   ### 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. -->
   
   
   <!-- 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to