Github user alasdairhodge commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/327#discussion_r20369296
--- Diff:
locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
---
@@ -718,7 +718,19 @@ protected JcloudsSshMachineLocation
obtainOnce(ConfigBag setup) throws NoMachine
List<String> iptablesRules =
createIptablesRulesForNetworkInterface((Iterable<Integer>)
setup.get(INBOUND_PORTS));
iptablesRules.add(IptablesCommands.saveIptablesRules());
- sshMachineLocation.execCommands("Inserting iptables
rules", iptablesRules);
+ List<String> batch = Lists.newArrayList();
+ // Some entities, such as Riak (erlang based) have a
huge range of ports, which leads to a script that
+ // is too large to run (fails with a broken pipe).
Batch the rules into batches of 50
+ for (int i = 0; i < iptablesRules.size(); i++) {
--- End diff --
Niggle: now that the end-of-batch check doesn't reference `i`, we could use
the neater `for` syntax.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---