From fdc50d86d927905ce905503d57ad3ba7a4425d87 Mon Sep 17 00:00:00 2001 From: BruceChiZhang Date: Sat, 29 Sep 2018 15:39:51 +0800 Subject: [PATCH] Pod1 and RegionOne already exits after devstack installation 1. what is the problem? https://bugs.launchpad.net/trio2o/+bug/1795117 Region Pod1 and RegionOne already exists after devstack installation 2. What is the solution to the problem? fix the bug in doc/source file installation guide 3. What the features to be implemented in the Trio2o to realize the solution? none Signed-off-by: zhangchi co-Authored-By: tangzhuo Change-Id: I8e127353e94b275981fbb654259325e8035ee2ea --- doc/source/installation.rst | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/source/installation.rst b/doc/source/installation.rst index de33db5..80a7549 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -66,17 +66,22 @@ installing DevStack in virtual machine. - 8 Get token for the later commands. Run:: - openstack --os-region-name=RegionOne token issue + token=$(openstack --os-region-name=RegionOne token issue | awk 'NR==5 {print $4}') -- 9 Create pod instances for the Trio2o to manage the mapping between +- 9 GET pod instances for the Trio2o to manage the mapping between availability zone and OpenStack instances, the "$token" is obtained in the step 7:: - curl -X POST http://127.0.0.1:19996/v1.0/pods -H "Content-Type: application/json" \ - -H "X-Auth-Token: $token" -d '{"pod": {"pod_name": "RegionOne"}}' + curl -X GET http://127.0.0.1:19996/v1.0/pods -H "Content-Type: application/json" \ + -H "X-Auth-Token: $token" + + if return empty results, use commands following:: curl -X POST http://127.0.0.1:19996/v1.0/pods -H "Content-Type: application/json" \ - -H "X-Auth-Token: $token" -d '{"pod": {"pod_name": "Pod1", "az_name": "az1"}}' + -H "X-Auth-Token: $token" -d '{"pod": {"pod_name": "RegionOne"}}' + + curl -X POST http://127.0.0.1:19996/v1.0/pods -H "Content-Type: application/json" \ + -H "X-Auth-Token: $token" -d '{"pod": {"pod_name": "Pod1", "az_name": "az1"}}' Pay attention to "pod_name" parameter we specify when creating pod. Pod name should exactly match the region name registered in Keystone. In the above @@ -218,14 +223,14 @@ Add another pod to Trio2o with DevStack - 12 Get token for the later commands. Run:: - openstack --os-region-name=RegionOne token issue + token=$(openstack --os-region-name=RegionOne token issue | awk 'NR==5 {print $4}') - 13 Create Pod2 instances for the Trio2o to manage the mapping between availability zone and OpenStack instances, the "$token" is obtained in the step 11:: curl -X POST http://127.0.0.1:19996/v1.0/pods -H "Content-Type: application/json" \ - -H "X-Auth-Token: $token" -d '{"pod": {"pod_name": "Pod2", "az_name": "az2"}}' + -H "X-Auth-Token: $token" -d '{"pod": {"pod_name": "Pod2", "az_name": "az2"}}' Pay attention to "pod_name" parameter we specify when creating pod. Pod name should exactly match the region name registered in Keystone. In the above