weizhouapache commented on a change in pull request #5328:
URL: https://github.com/apache/cloudstack/pull/5328#discussion_r691018325
##########
File path: scripts/vm/network/security_group.py
##########
@@ -1327,9 +1327,11 @@ def add_fw_framework(brname):
try:
refs = int(execute("""iptables -n -L %s | awk '/%s(.*)references/
{gsub(/\(/, "") ;print $3}'""" % (brfw,brfw)).strip())
+ refs_in = int(execute("""iptables -n -L %s-IN | awk
'/%s-IN(.*)references/ {gsub(/\(/, "") ;print $3}'""" % (brfw,brfw)).strip())
+ refs_out = int(execute("""iptables -n -L %s-OUT | awk
'/%s-OUT(.*)references/ {gsub(/\(/, "") ;print $3}'""" % (brfw,brfw)).strip())
refs6 = int(execute("""ip6tables -n -L %s | awk '/%s(.*)references/
{gsub(/\(/, "") ;print $3}'""" % (brfw,brfw)).strip())
- if refs == 0:
+ if refs == 0 or refs_in == 0 or refs_out == 0:
Review comment:
@rhtyd
which chain do you mean ? FORWARD, brfw, brfwin or brfwout ?
there are some DROP rules in FORWARD chain and vm chains (i-x-x-def and
i-x-x-VM/i-x-x-VM-eg)
there is a component test which verify the iptables/ebtables rules on host
test/integration/component/test_multiple_nic_support.py
we can run the test as well.
--
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]