From d394e59b5c43d6dc7107c3ee31cbb0bb07300d13 Mon Sep 17 00:00:00 2001 From: melanie witt Date: Wed, 8 Apr 2015 23:02:59 +0000 Subject: [PATCH] Specify network UUID for network create with cells When the n-cell service is enabled, we create networks in both the API cell and the child cell. Recent changes to tempest have tests querying networks from the API and passing them for a server create. In order for this to work in cells, the UUIDs for the network in the API cell and the child cell must match, else the network won't be found in the child. This change adds the --uuid option to the nova-manage network create command for cells only. Related-Bug: #1441931 Depends-On: Ib29e632b09905f557a7a6910d58207ed91cdc047 Change-Id: Ib5933b1405c0761ff727e04cda0c502a826c8eaf --- stack.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stack.sh b/stack.sh index 69b76a9e19..c795dfcf90 100755 --- a/stack.sh +++ b/stack.sh @@ -1214,6 +1214,10 @@ if is_service_enabled q-svc; then elif is_service_enabled $DATABASE_BACKENDS && is_service_enabled n-net; then NM_CONF=${NOVA_CONF} if is_service_enabled n-cell; then + # Both cells should have the same network uuid for server create + if [[ ! "$NETWORK_CREATE_ARGS" =~ "--uuid" ]]; then + NETWORK_CREATE_ARGS="$NETWORK_CREATE_ARGS --uuid $(uuidgen)" + fi # Create a small network in the API cell $NOVA_BIN_DIR/nova-manage --config-file $NM_CONF network create "$PRIVATE_NETWORK_NAME" $FIXED_RANGE 1 $FIXED_NETWORK_SIZE $NETWORK_CREATE_ARGS # Everything else should go in the child cell