DaanHoogland commented on code in PR #14300:
URL: https://github.com/apache/cloudstack/pull/14300#discussion_r4181835915
##########
server/src/main/java/com/cloud/server/ConfigurationServerImpl.java:
##########
@@ -1067,6 +1067,12 @@ public void
doInTransactionWithoutResult(TransactionStatus status) {
Network.GuestType.Isolated, true, false,
false, false, true, false);
defaultIsolatedSourceNatEnabledNetworkOffering.setState(NetworkOffering.State.Enabled);
+ // Default egress policy is Allow on fresh installations,
consistent with the
+ // createNetworkOffering API default (egressdefaultpolicy=true
when not specified).
+ // Existing installations are not affected: this method only
runs on first boot
+ // (guarded by the "init" configuration flag) and
persistDefaultNetworkOffering()
+ // never updates an already existing offering.
Review Comment:
```suggestion
```
I don't think we need this comment in the code here. Maybe move it to docs
or to a top of method comment? I think it would actually make sense to have a
method per default offering create.
##########
server/src/main/java/com/cloud/server/ConfigurationServerImpl.java:
##########
@@ -1084,6 +1090,9 @@ public void
doInTransactionWithoutResult(TransactionStatus status) {
false, true, null, null, true,
Availability.Optional, null, Network.GuestType.Isolated, true, true, false,
false, false, false);
defaultIsolatedEnabledNetworkOffering.setState(NetworkOffering.State.Enabled);
+ // This offering carries no Firewall service, so the flag is
not enforced anywhere;
+ // it is set for consistency so API responses do not advertise
a misleading Deny policy.
+
defaultIsolatedEnabledNetworkOffering.setEgressDefaultPolicy(true);
Review Comment:
```suggestion
defaultIsolatedEnabledNetworkOffering.setEgressDefaultPolicy(true);
```
no comment needed
--
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]