don't explode if nova db doesn't exist and install a few more libraries during bootstrap

This commit is contained in:
Jesse Andrews 2011-09-12 19:37:57 -07:00
parent 1c1d1505c7
commit 834531c5bf
2 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,8 @@
dnsmasq-base dnsmasq-base
kpartx kpartx
mysql-server mysql-server
mysql-common # install mysql-common/client explicitly since mysql-server isn't bootstrapped
mysql-client-5.1
python-mysqldb python-mysqldb
kvm kvm
gawk gawk

View file

@ -102,8 +102,9 @@ mkdir -p $NOVA_DIR/instances
# if there is a partition labeled nova-instances use it (ext filesystems # if there is a partition labeled nova-instances use it (ext filesystems
# can be labeled via e2label) # can be labeled via e2label)
# FIXME: if already mounted this blows up...
if [ -L /dev/disk/by-label/nova-instances ]; then if [ -L /dev/disk/by-label/nova-instances ]; then
mount -L nova-instances /$NOVA_DIR/instances mount -L nova-instances $NOVA_DIR/instances
fi fi
# *Dashboard*: setup django application to serve via apache/wsgi # *Dashboard*: setup django application to serve via apache/wsgi
@ -111,7 +112,7 @@ fi
# Dash currently imports quantum even if you aren't using it. Instead # Dash currently imports quantum even if you aren't using it. Instead
# of installing quantum we can create a simple module that will pass the # of installing quantum we can create a simple module that will pass the
# initial imports # initial imports
mkdir $DASH_DIR/openstack-dashboard/quantum mkdir $DASH_DIR/openstack-dashboard/quantum || true
touch $DASH_DIR/openstack-dashboard/quantum/__init__.py touch $DASH_DIR/openstack-dashboard/quantum/__init__.py
touch $DASH_DIR/openstack-dashboard/quantum/client.py touch $DASH_DIR/openstack-dashboard/quantum/client.py
@ -174,7 +175,7 @@ rm -rf $NOVA_DIR/networks
mkdir -p $NOVA_DIR/networks mkdir -p $NOVA_DIR/networks
# (re)create nova database # (re)create nova database
mysql -p$MYSQL_PASS -e 'DROP DATABASE nova;' mysql -p$MYSQL_PASS -e 'DROP DATABASE nova;' || true
mysql -p$MYSQL_PASS -e 'CREATE DATABASE nova;' mysql -p$MYSQL_PASS -e 'CREATE DATABASE nova;'
$NOVA_DIR/bin/nova-manage db sync $NOVA_DIR/bin/nova-manage db sync