Merge "Don't uninstall packages when on xenserver"
diff --git a/README.md b/README.md
index 46d3f96..8ae4231 100644
--- a/README.md
+++ b/README.md
@@ -186,7 +186,7 @@
 If tempest has been successfully configured, a basic set of smoke tests can be run as follows:
 
     $ cd /opt/stack/tempest
-    $ nosetests tempest/tests/network/test_network_basic_ops.py
+    $ nosetests tempest/scenario/test_network_basic_ops.py
 
 # Multi-Node Setup
 
diff --git a/functions b/functions
index dbca670..fe37e4c 100644
--- a/functions
+++ b/functions
@@ -930,7 +930,7 @@
         CMD_PIP=$(get_pip_command)
     fi
 
-    if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then
+    if is_fedora && [[ $DISTRO =~ (rhel6) ]]; then
         # RHEL6 pip by default doesn't have this (was introduced
         # around 0.8.1 or so)
         PIP_USE_MIRRORS=${PIP_USE_MIRRORS:-False}
@@ -1116,7 +1116,7 @@
 
     for service in $failures; do
         service=`basename $service`
-        service=${service::-8}
+        service=${service%.failure}
         echo "Error: Service $service is not running"
     done
 
diff --git a/lib/neutron b/lib/neutron
index 835f900..c546f37 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -367,7 +367,9 @@
 
 # init_neutron() - Initialize databases, etc.
 function init_neutron() {
-    :
+    recreate_database $Q_DB_NAME utf8
+    # Run Neutron db migrations
+    $NEUTRON_BIN_DIR/neutron-db-manage --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE upgrade head
 }
 
 # install_neutron() - Collect source and prepare
@@ -614,12 +616,6 @@
     cp $NEUTRON_DIR/etc/api-paste.ini $Q_API_PASTE_FILE
     cp $NEUTRON_DIR/etc/policy.json $Q_POLICY_FILE
 
-    if is_service_enabled $DATABASE_BACKENDS; then
-        recreate_database $Q_DB_NAME utf8
-    else
-        die $LINENO "A database must be enabled in order to use the $Q_PLUGIN Neutron plugin."
-    fi
-
     # Update either configuration file with plugin
     iniset $NEUTRON_CONF DEFAULT core_plugin $Q_PLUGIN_CLASS
 
diff --git a/lib/swift b/lib/swift
index c93b8b3..8e64152 100644
--- a/lib/swift
+++ b/lib/swift
@@ -58,8 +58,8 @@
 SWIFT_LOOPBACK_DISK_SIZE=${SWIFT_LOOPBACK_DISK_SIZE:-1000000}
 
 # Set ``SWIFT_EXTRAS_MIDDLEWARE`` to extras middlewares.
-# Default is ``staticweb, tempurl, bulk, formpost``
-SWIFT_EXTRAS_MIDDLEWARE=${SWIFT_EXTRAS_MIDDLEWARE:-tempurl formpost staticweb bulk}
+# Default is ``staticweb, tempurl, formpost``
+SWIFT_EXTRAS_MIDDLEWARE=${SWIFT_EXTRAS_MIDDLEWARE:-tempurl formpost staticweb}
 
 # The ring uses a configurable number of bits from a path’s MD5 hash as
 # a partition index that designates a device. The number of bits kept
diff --git a/stack.sh b/stack.sh
index 95172c3..880529d 100755
--- a/stack.sh
+++ b/stack.sh
@@ -945,7 +945,10 @@
     echo_summary "Configuring Neutron"
 
     configure_neutron
-    init_neutron
+    # Run init_neutron only on the node hosting the neutron API server
+    if is_service_enabled $DATABASE_BACKENDS && is_service_enabled q-svc; then
+        init_neutron
+    fi
 fi
 
 # Some Neutron plugins require network controllers which are not