From 537e32bdcd6777f1cfecb526b1ffaaf2604eefba Mon Sep 17 00:00:00 2001 From: Francisco Redondo Marchena Date: Fri, 16 Jan 2015 13:40:07 +0000 Subject: FIXUPME: Add workaround to avoid failure on reboot of some setup services --- .../openstack-neutron-network-configuration-for-one-node | 9 +++++++++ openstack/usr/share/openstack/openvswitch-setup | 10 +++++++++- openstack/usr/share/openstack/postgres-setup | 9 ++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) (limited to 'openstack') 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 765e4d3f..9108669a 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,6 +17,10 @@ set -xe +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/ @@ -38,3 +42,8 @@ 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 +install -D -m 644 /proc/self/fd/0 <<'EOF' /var/openstack/openvswitch-one-node-setup +Openvswitch one node setup: success +EOF + +exit 0 diff --git a/openstack/usr/share/openstack/openvswitch-setup b/openstack/usr/share/openstack/openvswitch-setup index a34c1a82..a5db7d21 100644 --- a/openstack/usr/share/openstack/openvswitch-setup +++ b/openstack/usr/share/openstack/openvswitch-setup @@ -15,7 +15,11 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -set -xe +set -e + +if [ -f /var/openstack/openvswitch-setup ]; then + exit 0 +fi # Create the openvswitch required folders mkdir -p /usr/local/etc/openvswitch @@ -33,4 +37,8 @@ openvswitch_logfile=/usr/local/var/run/openvswitch/ovsdb-server.log # Create openvswitch database ovsdb-tool create $openvswitch_database /usr/share/openvswitch/vswitch.ovsschema +install -D -m 644 /proc/self/fd/0 <<'EOF' /var/openstack/openvswitch-setup +Openvswitch setup: success +EOF + exit 0 diff --git a/openstack/usr/share/openstack/postgres-setup b/openstack/usr/share/openstack/postgres-setup index 36d89d97..69ee2391 100644 --- a/openstack/usr/share/openstack/postgres-setup +++ b/openstack/usr/share/openstack/postgres-setup @@ -15,7 +15,11 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -set -xe +set -e + +if [ -f /var/openstack/postgres-setup ]; then + exit 0 +fi # Create postgres directories install -dm700 /var/lib/pgsql/data @@ -31,5 +35,8 @@ chown -R postgres:postgres /var/lib/pgsql /var/run/postgresql test -d /var/lib/pgsql/data/base || sudo -u postgres pg_ctl -D /var/lib/pgsql/data initdb +install -D -m 644 /proc/self/fd/0 <<'EOF' /var/openstack/postgres-setup +Postgres setup: success +EOF exit 0 -- cgit v1.2.1