summaryrefslogtreecommitdiff
path: root/openstack/usr/share
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-02-24 10:18:28 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2015-03-20 14:45:28 +0000
commit01bbda237f8dfe264709e2edc6ab2112695f0a24 (patch)
tree649e7e1ae1c4fda3394e996fb2c26dd51c1d9bb0 /openstack/usr/share
parentd6978c120915f9375e9119962072974f4c90fb96 (diff)
downloaddefinitions-01bbda237f8dfe264709e2edc6ab2112695f0a24.tar.gz
Ensure newly brought up devices are correctly configured
This adds masking config for the virtual devices to prevent them from attempting to DHCP, and stops us from giving the ip of eno1 to the bridge device, since eno1's address was obtained by DHCP, so it's against the rules to statically allocate that address to an interface. Now, we DHCP for a new address for the bridge.
Diffstat (limited to 'openstack/usr/share')
-rw-r--r--openstack/usr/share/openstack/openstack-neutron-network-configuration-for-one-node37
1 files changed, 21 insertions, 16 deletions
diff --git a/openstack/usr/share/openstack/openstack-neutron-network-configuration-for-one-node b/openstack/usr/share/openstack/openstack-neutron-network-configuration-for-one-node
index f40ceff5..68106fac 100644
--- a/openstack/usr/share/openstack/openstack-neutron-network-configuration-for-one-node
+++ b/openstack/usr/share/openstack/openstack-neutron-network-configuration-for-one-node
@@ -33,10 +33,30 @@ fi
# https://fosskb.wordpress.com/2014/10/18/openstack-juno-on-ubuntu-14-10/
# and https://fosskb.wordpress.com/2014/06/10/managing-openstack-internaldataexternal-network-in-one-interface/
+# Disable dhcp on the bound physical interface, and all the internal interfaces
+for devname in $eth_dev br-eth1 br-ex eth1-br-proxy ex-br-proxy \
+ proxy-br-eth1 proxy-br-ex ovs-system; do
+ install -D -m 644 /proc/self/fd/0 <<EOF /etc/systemd/network/00-disable-$devname-config.network
+[Match]
+Name=$devname
+EOF
+done
+
+
+# DHCP on the Open vSwitch device that replaces our external interface
+install -D -m 644 /proc/self/fd/0 <<EOF /etc/systemd/network/10-br-ex-dhcp.network
+[Match]
+Name=br-eth0
+
+[Network]
+DHCP=yes
+EOF
+
+# restart networkd so it understands the new config
+systemctl restart systemd-networkd.service
ovs-vsctl add-br br-eth0
ovs-vsctl add-port br-eth0 $eth_dev
-ifconfig br-eth0 $eth_ip up
ip link set br-eth0 promisc on
# Deallocate ip address for external interface so we don't try to route
# connections out of an interface that no longer works
@@ -52,21 +72,6 @@ ip link set ex-br-proxy up promisc on
ip link set proxy-br-eth1 up promisc on
ip link set proxy-br-ex up promisc on
-# Disable dhcp on the ethernet device we've bound into Open vSwitch
-install -D -m 644 /proc/self/fd/0 <<EOF /etc/systemd/network/00-disable-$eth_dev-config.network
-[Match]
-Name=$eth_dev
-EOF
-
-# DHCP on the Open vSwitch device
-install -D -m 644 /proc/self/fd/0 <<EOF /etc/systemd/network/10-br-ex-dhcp.network
-[Match]
-Name=br-eth0
-
-[Network]
-DHCP=yes
-EOF
-
install -D -m 644 /proc/self/fd/0 <<'EOF' /var/openstack/openvswitch-one-node-setup
Openvswitch one node setup: success
EOF