summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-02-19 00:04:36 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-04-08 18:29:25 +0100
commitbfd2ccd2ac03bbe2d0cec345828135a14811f3aa (patch)
tree68a1f3d2a863c46e34559cd108bbb61b47097d04
parent5646d5b27a5c274e63e6b0233e1d693f80a84515 (diff)
downloaddefinitions-bfd2ccd2ac03bbe2d0cec345828135a14811f3aa.tar.gz
After initial switching setup, switch DHCP to external iface
After the external interface has been bound to Open vSwitch, we should not attempt to DHCP on it, as it won't receive the DHCP responses. Attempting to DHCP results in startup stalling on network-online.target, because systemd-networkd-wait-online.service looks at every network interface it should configure based on the [Match] sections, and waits for all of them to be configured by systemd-networkd, which will never finish if DHCP is broken.
-rw-r--r--openstack/usr/share/openstack/openstack-neutron-network-configuration-for-one-node15
1 files changed, 15 insertions, 0 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 c2ccbd81..28a1c452 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
@@ -49,6 +49,21 @@ 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