Browse code

Fix brctl calls

Some distros no longer ship brctl, iproute2 should be used
in its place. The linuxbridge agent plugin script was still
using it, as was worlddump, which generates this warning on
a failure:

Running devstack worlddump.py
/bin/sh: 1: brctl: not found

Conditionalizing worlddump based on whether brctl is installed
to make this go away.

Change-Id: Iafbf4038bab08c261d45d117b12d4629ba32d65e

Brian Haley authored on 2019/11/01 03:49:23
Showing 2 changed files
... ...
@@ -48,7 +48,7 @@ function neutron_plugin_configure_dhcp_agent {
48 48
 
49 49
 function neutron_plugin_configure_l3_agent {
50 50
     local conf_file=$1
51
-    sudo brctl addbr $PUBLIC_BRIDGE
51
+    sudo ip link add $PUBLIC_BRIDGE type bridge
52 52
     set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU
53 53
 }
54 54
 
... ...
@@ -165,7 +165,8 @@ def network_dump():
165 165
     _header("Network Dump")
166 166
 
167 167
     _dump_cmd("bridge link")
168
-    _dump_cmd("brctl show")
168
+    if _find_cmd("brctl"):
169
+        _dump_cmd("brctl show")
169 170
     _dump_cmd("ip link show type bridge")
170 171
     ip_cmds = ["neigh", "addr", "link", "route"]
171 172
     for cmd in ip_cmds + ['netns']: