Skip to content

Commit ea55a00

Browse files
authored
network: Fix security groups for CentOS (#2590)
On RHEL/CentOS/Fedora the bridge related sysctl rules are enabled in kernel by default but can only be disabled. Enabling those keys will fail, causing iptables/ebtables tables to not be created and fails SG on CentOS. This also fixes an integration test case, which assumes first few tests complete within 3 minutes. In nested env the value may be large, this increases the value to 20 minutes. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent b5abdd3 commit ea55a00

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

scripts/vm/network/security_group.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,8 +1154,7 @@ def addFWFramework(brname):
11541154
execute("sysctl -w net.bridge.bridge-nf-call-iptables=1")
11551155
execute("sysctl -w net.bridge.bridge-nf-call-ip6tables=1")
11561156
except:
1157-
logging.debug("failed to turn on bridge netfilter")
1158-
return False
1157+
logging.warn("failed to turn on bridge netfilter")
11591158

11601159
brfw = getBrfw(brname)
11611160
try:

test/integration/smoke/test_routers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,9 @@ def test_04_restart_network_wo_cleanup(self):
521521
)
522522
if str(result[3]) == "min,":
523523
self.assertEqual(
524-
(int(result[2]) < 3),
524+
(int(result[2]) < 20),
525525
True,
526-
"Check uptime is less than 3 mins or not"
526+
"Check uptime is less than 20 mins or not"
527527
)
528528
else:
529529
self.assertEqual(

0 commit comments

Comments
 (0)