From 80a6e2101ed5293e3c44137e1deeb042bc5d199c Mon Sep 17 00:00:00 2001 From: chenyaguang Date: Mon, 10 Sep 2018 20:26:19 +0800 Subject: [PATCH] Improvement the Tricircle work with nova cell2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. What is the problem Create instance can't find image and the document need to update 2. What is the solution to the problem Change the plugin.sh to fix the error of image not found update the document for work with nova cell v2 3. What the features need to be implemented to the Tricircle None Signed-off-by: chenyaguang Co-Authored-By:tangzhuo Change-Id: I3deec4a2d8315d92d383157f20f101dfef11ddcd --- devstack/plugin.sh | 8 ++++++-- doc/source/install/installation-cell.rst | 13 ++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 7345142d..5dbe3b17 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -244,8 +244,12 @@ function start_central_nova_server { nova_legacy_url=$(openstack endpoint list --service compute_legacy --interface public --region $local_region -c URL -f value) get_or_create_endpoint "compute_legacy" "$central_region" "$nova_legacy_url" - image_endpoint_id=$(openstack endpoint list --service image --interface public --region $local_region -c ID -f value) - openstack endpoint set --region $central_region $image_endpoint_id + central_image_endpoint_id=$(openstack endpoint list --service image --interface public --region $central_region -c ID -f value) + if [[ -z "$central_image_endpoint_id" ]]; then + glance_url=$(openstack endpoint list --service image --interface public --region $local_region -c URL -f value) + get_or_create_endpoint "image" "$central_region" "$glance_url" + fi + place_endpoint_id=$(openstack endpoint list --service placement --interface public --region $local_region -c ID -f value) openstack endpoint set --region $central_region $place_endpoint_id diff --git a/doc/source/install/installation-cell.rst b/doc/source/install/installation-cell.rst index c2a54cde..83d662b4 100644 --- a/doc/source/install/installation-cell.rst +++ b/doc/source/install/installation-cell.rst @@ -28,6 +28,9 @@ Setup systemctl stop devstack@n-sch.service systemctl stop devstack@n-super-cond.service systemctl stop devstack@n-api.service + + if the service of devstack@n-api-meta.service exists, stop it:: + systemctl stop devstack@n-api-meta.service .. note:: Actually for cell v2, only one Nova API is required. We enable n-api @@ -65,7 +68,7 @@ Setup then you can see the new cell and host are added in the database:: - mysql -u$user -p$password -Dnova -e 'select cell_id, host from host_mappings' + mysql -u$user -p$password -Dnova_api -e 'select cell_id, host from host_mappings' +---------+-----------+ | cell_id | host | @@ -74,7 +77,7 @@ Setup | 3 | zhiyuan-2 | +---------+-----------+ - mysql -u$user -p$password -Dnova -e 'select id, name from cell_mappings' + mysql -u$user -p$password -Dnova_api -e 'select id, name from cell_mappings' +----+-------+ | id | name | @@ -84,13 +87,9 @@ Setup | 3 | cell2 | +----+-------+ -- 5 In node1, run the following commands to use nova_cell1 database in nova configure files:: - - sed -i "s/nova_cell0/nova_cell1/g" `grep nova_cell0 -rl /etc/nova` +- 5 In node1, run the following commands:: systemctl restart devstack@n-sch.service - systemctl restart devstack@n-super-cond.service - systemctl restart devstack@n-cpu.service - 6 In node1, check if compute services in both hosts are registered::