Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/952#discussion_r42173489
--- Diff:
software/base/src/main/java/org/apache/brooklyn/entity/machine/MachineInitTasks.java
---
@@ -105,19 +108,24 @@ protected void openIptablesImpl(Iterable<Integer>
inboundPorts, SshMachineLocati
iptablesRules.add(IptablesCommands.saveIptablesRules());
}
List<String> batch = Lists.newArrayList();
+
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
--- End diff --
Thanks @iyovcheva - this certainly fixes it.
My concern is though that it only fixes it for this one command. If someone
calls another command (e.g. uses `STOP_IPTABLES`) then that command's
stdout/stderr won't get logged. I don't want us to have to include this in
every method that wants to execute an ssh command.
It therefore feels like a more holistic approach would be good.
However, I'm fine with us merging this part for now and us thinking more
about it.
---
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.
---