[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16262072#comment-16262072
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10138:
---------------------------------------------

rhtyd commented on a change in pull request #2319: CLOUDSTACK-10138: Load 
br_netfilter in security_group management script
URL: https://github.com/apache/cloudstack/pull/2319#discussion_r152483063
 
 

 ##########
 File path: scripts/vm/network/security_group.py
 ##########
 @@ -61,6 +64,15 @@ def execute(cmd):
     logging.debug(cmd)
     return bash("-c", cmd).stdout
 
+def load_kernel_module(module_name):
+    module_proc_file = "/proc/modules"
+    idx = execute("grep -E '^%s' %s | cut -f1 -d' '" % (module_name, 
module_proc_file)).find(module_name)
+    if idx == -1:
+        logging.debug("Module %s is absent. Load it." % (module_name))
+        execute("modprobe %s" % (module_name))
 
 Review comment:
   Can this throw an error, should we try-catch it?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Load br_netfilter in security_group management script
> -----------------------------------------------------
>
>                 Key: CLOUDSTACK-10138
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10138
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: cloudstack-agent
>    Affects Versions: 4.10.0.0
>         Environment: Ubuntu 14.04
>            Reporter: Ivan Kudryavtsev
>
> When setting 
> sysctl -w net.bridge.bridge-nf-call-arptables=1
> sysctl -w net.bridge.bridge-nf-call-iptables=1
> sysctl -w net.bridge.bridge-nf-call-ip6tables=1
> /usr/share/cloudstack-common/scripts/vm/network/security_group.py
> doesn't check that br_netfilter is load.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to