
Naming with dashes is causing issues on CentOS, because glean is called with interface br/xxx instead of br-xxx due some naming translation. Also interface name and vlans can differ on environments, causing all puppet modules to change their naming. Instead of depending on vlan or nic to configure bridge name, add the ability to pass that name as a parameter, and likely set to br_infracloud on our deployments. At the moment, leaving the default naming to do not break existing cloud deployment. Change-Id: I0790bab2fd63f525e8b9c8d47ee79ea63a72750a
35 lines
561 B
Bash
Executable File
35 lines
561 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -u
|
|
|
|
if [ "$DIB_ROLE" == "controller" ] ; then
|
|
ip="192.168.25.4"
|
|
elif [ "$DIB_ROLE" == "compute" ] ; then
|
|
ip="192.168.25.5"
|
|
else
|
|
echo "DIB_ROLE must be either 'controller' or 'compute'."
|
|
exit 1
|
|
fi
|
|
|
|
cat > /etc/network/interfaces <<EOF
|
|
auto lo
|
|
iface lo inet loopback
|
|
|
|
auto eth2
|
|
iface eth2 inet dhcp
|
|
|
|
auto eth2.25
|
|
iface eth2.25 inet manual
|
|
vlan-raw-device eth2
|
|
|
|
auto br_infracloud
|
|
iface br_infracloud inet static
|
|
address $ip
|
|
netmask 255.255.255.0
|
|
gateway 192.168.25.1
|
|
bridge_ports eth2.25
|
|
bridge_hello 2
|
|
bridge_maxage 12
|
|
bridge_stp off
|
|
EOF
|