summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sfc/lib/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sfc/lib/utils.py b/sfc/lib/utils.py
index 2f98f6ff..186cbd91 100644
--- a/sfc/lib/utils.py
+++ b/sfc/lib/utils.py
@@ -400,8 +400,9 @@ def setup_compute_node(cidr):
ip_computes = get_openstack_node_ips("compute")
for ip_compute in ip_computes:
run_cmd_on_compute("ifconfig br-int up", ip_compute)
- if not run_cmd_on_compute("ip route|grep -o %s" % cidr, ip_compute):
+ if not run_cmd_on_compute(
+ "ip route|grep -o %s || true" % cidr, ip_compute):
logger.info("adding route %s in %s" % (cidr, ip_compute))
- run_cmd_on_compute("ip route add %s" % cidr, ip_compute)
+ run_cmd_on_compute("ip route add %s dev br-int" % cidr, ip_compute)
else:
logger.info("route %s exists" % cidr)