bwsw 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_r152493705
 
 

 ##########
 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:
   @rhtyd  Hi, please, take a look at #2321, I think the solution when module 
is installed during dpkg install is better than this one and this PR should be 
declined.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to