diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2015-03-20 09:47:40 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2015-04-08 18:29:26 +0100 |
commit | 47d0da473aa5a17c7d8506caf7dd2cf0f1a015ce (patch) | |
tree | 1a56d1082592c114941e4e35cf7439ff49e99a71 /openstack/usr/share/openstack | |
parent | cf1a60e9f4026a7c7dafb5721749da136169dcc2 (diff) | |
download | definitions-47d0da473aa5a17c7d8506caf7dd2cf0f1a015ce.tar.gz |
openstack-net-config: Check whether we need to run before gethering network config
Diffstat (limited to 'openstack/usr/share/openstack')
-rw-r--r-- | openstack/usr/share/openstack/openstack-neutron-network-configuration-for-one-node | 8 |
1 files changed, 4 insertions, 4 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 f5f5444a..abf1113e 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 @@ -17,15 +17,15 @@ set -xe +if [ -f /var/openstack/openvswitch-one-node-setup ]; then + exit 0 +fi + # Get the first ethernet driver and its ip eth_dev="$(ip addr | perl -pe 'if (/^\d+: ([^:]+)/) { $iface=$1; } if (m@^\s*inet ([^/]+)/@) { print "$iface $1\n"; } $_=undef;' | grep "^e" | head -1 | awk '{ print $1 } ')" eth_ip="$(ip addr | perl -pe 'if (/^\d+: ([^:]+)/) { $iface=$1; } if (m@^\s*inet ([^/]+)/@) { print "$iface $1\n"; } $_=undef;' | grep "^e" | head -1 | awk '{ print $2 } ')" eth_mac="$(ip link show $eth_dev | tr -s '[:space:]' '\n' | sed -n '/link\/ether/{n;p}')" -if [ -f /var/openstack/openvswitch-one-node-setup ]; then - exit 0 -fi - # Create the bridges to use the External network mapped # This configuration is for 1 node and it was taken from: # https://fosskb.wordpress.com/2014/10/18/openstack-juno-on-ubuntu-14-10/ |