From f1f1d77286b6e261dd82bd74e5aca2adc9b1f244 Mon Sep 17 00:00:00 2001 From: baigk Date: Mon, 26 Oct 2015 23:00:47 +0800 Subject: delete default route via compass ip JIRA: COMPASS-114 Signed-off-by: baigk --- .../ansible/roles/setup-network/files/setup_networks/setup_networks.py | 1 + 1 file changed, 1 insertion(+) (limited to 'deploy/adapters/ansible/roles') diff --git a/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py b/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py index 5e6520af..bf784bb3 100644 --- a/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py +++ b/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py @@ -56,6 +56,7 @@ def setup_ips(ip_settings, sys_intf_mappings): cmd = "ip addr add %s/%s brd %s dev %s;" \ % (intf_info["ip"], intf_info["netmask"], str(network.broadcast),intf_name) if "gw" in intf_info: + cmd += "route del default;" cmd += "ip route add default via %s dev %s" % (intf_info["gw"], intf_name) LOG.info("setup_ips: cmd=%s" % cmd) os.system(cmd) -- cgit 1.2.3-korg