Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/62#discussion_r14807785
--- Diff:
utils/common/src/main/java/brooklyn/util/ssh/IptablesCommands.java ---
@@ -93,7 +93,7 @@ public static String iptablesServiceStatus() {
*/
public static String saveIptablesRules() {
return BashCommands.alternatives(
- BashCommands.ifExecutableElse1("iptables-save",
sudo("iptables-save")),
+ BashCommands.ifExecutableElse1("apt-get",
BashCommands.installPackage("iptables-persistent")),
--- End diff --
does `apt-get`ting this package really cause the rules to be saved
immediately? i think you want to second command to be run irrespective of the
result of the former. perhaps also try running `iptables-save` as presumably
that worked somewhere, and it might work somewhere that `service iptables save`
and `/sbin/service iptables save` doesn't work ... if i've understood
correctly? /cc @grkvlt
i'd suggest (with `import static BashCommands.*` here, for brevity):
chain(
ok(install("iptables-persistent")),
alternatives(
iptablesService("save"),
"iptables-save"
))
---
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.
---