This is an automated email from the ASF dual-hosted git repository. dahn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push: new 1ccb32f security_group: Use execute() function instead of non-existing bash() (#2732) 1ccb32f is described below commit 1ccb32f8148660a09ea77eb4db70a94b06596a5b Author: Wido den Hollander <w...@widodh.nl> AuthorDate: Fri Jul 20 09:07:29 2018 +0200 security_group: Use execute() function instead of non-existing bash() (#2732) In 6233a77d15adde86302a11b2bcda604313833e91 as a part of PR #2432 the bash() function was replaced by the execute() function. Somehow this last calling of the bash() function was not caught by testing and is still in there. This causes Exceptions to be thrown by the Security Group script. Signed-off-by: Wido den Hollander <w...@widodh.nl> --- scripts/vm/network/security_group.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/vm/network/security_group.py b/scripts/vm/network/security_group.py index 13d31f4..0471dbe 100755 --- a/scripts/vm/network/security_group.py +++ b/scripts/vm/network/security_group.py @@ -61,7 +61,7 @@ def execute(cmd): try: return check_output(cmd, shell=True) except CalledProcessError as e: - logging.exception('Failed to execute: %s', e.cmd) + pass def can_bridge_firewall(privnic): @@ -1151,8 +1151,8 @@ def getvmId(vmName): def getBrfw(brname): cmd = "iptables-save |grep physdev-is-bridged |grep FORWARD |grep BF |grep '\-o' | grep -w " + brname + "|awk '{print $9}' | head -1" - brfwname = bash("-c", cmd).stdout.strip() - if brfwname == "": + brfwname = execute(cmd).strip() + if not brfwname: brfwname = "BF-" + brname return brfwname