Browse code

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

Jesse Andrews authored on 2011/09/13 11:37:57
Showing 2 changed files
... ...
@@ -1,6 +1,8 @@
1 1
 dnsmasq-base
2 2
 kpartx
3 3
 mysql-server
4
+mysql-common # install mysql-common/client explicitly since mysql-server isn't bootstrapped
5
+mysql-client-5.1
4 6
 python-mysqldb
5 7
 kvm
6 8
 gawk
... ...
@@ -102,8 +102,9 @@ mkdir -p $NOVA_DIR/instances
102 102
 
103 103
 # if there is a partition labeled nova-instances use it (ext filesystems
104 104
 # can be labeled via e2label)
105
+# FIXME: if already mounted this blows up...
105 106
 if [ -L /dev/disk/by-label/nova-instances ]; then
106
-    mount -L nova-instances /$NOVA_DIR/instances
107
+    mount -L nova-instances $NOVA_DIR/instances
107 108
 fi
108 109
 
109 110
 # *Dashboard*: setup django application to serve via apache/wsgi
... ...
@@ -111,7 +112,7 @@ fi
111 111
 # Dash currently imports quantum even if you aren't using it.  Instead 
112 112
 # of installing quantum we can create a simple module that will pass the 
113 113
 # initial imports
114
-mkdir $DASH_DIR/openstack-dashboard/quantum
114
+mkdir $DASH_DIR/openstack-dashboard/quantum || true
115 115
 touch $DASH_DIR/openstack-dashboard/quantum/__init__.py
116 116
 touch $DASH_DIR/openstack-dashboard/quantum/client.py
117 117
 
... ...
@@ -174,7 +175,7 @@ rm -rf $NOVA_DIR/networks
174 174
 mkdir -p $NOVA_DIR/networks
175 175
 
176 176
 # (re)create nova database
177
-mysql -p$MYSQL_PASS -e 'DROP DATABASE nova;'
177
+mysql -p$MYSQL_PASS -e 'DROP DATABASE nova;' || true
178 178
 mysql -p$MYSQL_PASS -e 'CREATE DATABASE nova;'
179 179
 $NOVA_DIR/bin/nova-manage db sync
180 180