cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] bwsw commented on a change in pull request #2319: CLOUDSTACK-10138: Load br_netfilter in security_group management script
Date Thu, 01 Jan 1970 00:00:00 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message