DaanHoogland commented on code in PR #8599:
URL: https://github.com/apache/cloudstack/pull/8599#discussion_r1477017142
##########
server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java:
##########
@@ -2146,6 +2147,12 @@ public boolean finalizeVirtualMachineProfile(final
VirtualMachineProfile profile
" on the virtual router.", RouterLogrotateFrequency.key(),
routerLogrotateFrequency, dc.getUuid()));
buf.append(String.format(" logrotatefrequency=%s",
routerLogrotateFrequency));
+ if (router.getVpcId() != null) {
+ List<IPAddressVO> vpcIps =
_ipAddressDao.listByAssociatedVpc(router.getVpcId(), true);
+ if (CollectionUtils.isNotEmpty(vpcIps)) {
+ buf.append(String.format(" source_nat_ip=%s",
vpcIps.get(0).getAddress().toString()));
+ }
+ }
Review Comment:
this bit should be in the method
`VpcVirtualNetworkApplianceManagerImpl.finalizeVirtualMachineProfile(..)`.
best in a call to this.appendSourceNats()
##########
systemvm/debian/opt/cloud/bin/cs/CsAddress.py:
##########
@@ -453,8 +453,8 @@ def fw_router(self):
["", "", "-A NETWORK_STATS_%s -o %s ! -i eth0 -p tcp" %
(self.dev, self.dev)])
self.fw.append(
["", "", "-A NETWORK_STATS_%s -i %s ! -o eth0 -p tcp" %
(self.dev, self.dev)])
- self.fw.append(["nat", "",
- "-A POSTROUTING -o %s -j SNAT --to-source %s" %
(self.dev, self.cl.get_eth2_ip())])
+ self.fw.append(
+ ["nat", "", "-A POSTROUTING -o %s -j SNAT --to-source %s" %
(self.dev, self.cl.get_eth2_ip())])
Review Comment:
is this an intended change?
--
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]