Merge "Restrict enabling the manage_snapshot volume feature"
diff --git a/clean.sh b/clean.sh
index e369eda..90b21eb 100755
--- a/clean.sh
+++ b/clean.sh
@@ -149,5 +149,10 @@
# Clean up all *.pyc files
if [[ -n "$DEST" ]] && [[ -d "$DEST" ]]; then
- sudo find $DEST -name "*.pyc" -print0 | xargs -0 rm
+ find_version=`find --version | awk '{ print $NF; exit}'`
+ if vercmp "$find_version" "<" "4.2.3" ; then
+ sudo find $DEST -name "*.pyc" -print0 | xargs -0 rm
+ else
+ sudo find $DEST -name "*.pyc" -delete
+ fi
fi
diff --git a/lib/nova b/lib/nova
index 63c4e37..450242b 100644
--- a/lib/nova
+++ b/lib/nova
@@ -682,10 +682,10 @@
# (Re)create nova databases
recreate_database nova
- recreate_database nova_api_cell0
+ recreate_database nova_cell0
# Migrate nova database. If "nova-manage cell_v2 simple_cell_setup" has
- # been run this migrates the "nova" and "nova_api_cell0" database.
+ # been run this migrates the "nova" and "nova_cell0" database.
# Otherwise it just migrates the "nova" database.
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db sync
@@ -946,10 +946,15 @@
# create_cell(): Group the available hosts into a cell
function create_cell {
+ # NOTE(danms): map_cell0 always returns 1 right now; remove this when that is fixed
+ (nova-manage cell_v2 map_cell0 --database_connection `database_connection_url nova_cell0`|| true)
+
if ! is_service_enabled n-cell; then
nova-manage cell_v2 simple_cell_setup --transport-url $(get_transport_url)
else
- echo 'Skipping cellsv2 setup for this cellsv1 configuration'
+ nova-manage --config-file $NOVA_CELLS_CONF --verbose cell_v2 map_cell_and_hosts \
+ --transport-url $(get_transport_url child_cell) --name 'cell1'
+ nova-manage db sync
fi
}
diff --git a/stackrc b/stackrc
index 19f5b53..d8d0ee4 100644
--- a/stackrc
+++ b/stackrc
@@ -647,14 +647,9 @@
IMAGE_URLS+="http://ca.downloads.xensource.com/OpenStack/cirros-0.3.4-x86_64-disk.vhd.tgz"
IMAGE_URLS+=",http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz";;
ironic)
- # Ironic can do both partition and full disk images, depending on the driver
- if [[ -z "${IRONIC_DEPLOY_DRIVER%%agent*}" ]]; then
- DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-disk}
- else
- DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-uec}
- fi
- IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz"
- IMAGE_URLS+=",http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-disk.img";;
+ # NOTE(lucasagomes): The logic setting the default image
+ # now lives in the Ironic tree
+ ;;
*) # Default to Cirros with kernel, ramdisk and disk image
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec}
IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec.tar.gz";;