Temporary workaround for bridge naming on CentOS
We cannot use naming with br-xxx because it is translated to br/xxx when passed to glean, causing it to fail. As a temporary workaround until https://review.openstack.org/368692 lands, use br_xxx naming for not debian/ubuntu (to avoid crashing current deploys of infracloud) Change-Id: I6a511bef0b262e40981abfc46bb5c60865fde566
This commit is contained in:
parent
f2c3b8372a
commit
60bff722c8
|
@ -182,7 +182,10 @@ def main():
|
||||||
interface_name = "{0}.{1}".format(
|
interface_name = "{0}.{1}".format(
|
||||||
vlan_raw_device, interface['vlan_id'])
|
vlan_raw_device, interface['vlan_id'])
|
||||||
|
|
||||||
bridge_name = 'br-vlan%s' % interface['vlan_id']
|
if distro in ('debian', 'ubuntu'):
|
||||||
|
bridge_name = 'br-vlan%s' % interface['vlan_id']
|
||||||
|
else:
|
||||||
|
bridge_name = 'br_vlan%s' % interface['vlan_id']
|
||||||
|
|
||||||
# only configure bridge if not exists
|
# only configure bridge if not exists
|
||||||
if not os.path.exists('/sys/class/net/%s' % bridge_name):
|
if not os.path.exists('/sys/class/net/%s' % bridge_name):
|
||||||
|
@ -193,7 +196,11 @@ def main():
|
||||||
configure_bridge_rh(interface, interface_name,
|
configure_bridge_rh(interface, interface_name,
|
||||||
bridge_name, vlan_raw_device)
|
bridge_name, vlan_raw_device)
|
||||||
else:
|
else:
|
||||||
bridge_name = 'br-%s' % interface_name
|
if distro in ('debian', 'ubuntu'):
|
||||||
|
bridge_name = 'br-%s' % interface_name
|
||||||
|
else:
|
||||||
|
bridge_name = 'br_%s' % interface_name
|
||||||
|
|
||||||
if not os.path.exists('/sys/class/net/%s' % bridge_name):
|
if not os.path.exists('/sys/class/net/%s' % bridge_name):
|
||||||
if distro in ('debian', 'ubuntu'):
|
if distro in ('debian', 'ubuntu'):
|
||||||
configure_bridge_debian(interface, interface_name,
|
configure_bridge_debian(interface, interface_name,
|
||||||
|
|
Loading…
Reference in New Issue