StarlingX Distributed Cloud
Go to file
Yuxing Jiang c659a7f684 Create an API to reinstall a subcloud
This commit creates a REST API to reinstall a subcloud.

In SubcloudController, the tasks includes:
1. Read the subcloud info from dcmanager db, subclouds table.
2. JSONify the data_install from db, generate the new install values.

In SubcloudManager:
1. Check the subcloud availability, software version before reinstall
2. Check the image value, if image doesn't exists, update the image with
iso in dc-vault
3. Run the install command and apply command

API format: PATCH /v1.0/subclouds/<subcloud>/reinstall
-----
Tests:
-----
Happy path:
1. dcmanager subcloud add: a new subcloud with bootstrap values,
deploy config and install values.
2. dcmanager subcloud delete: an existing subcloud.
3. dcmanager subcloud reconfig: an existing subcloud with deploy
config.
4. dcmanager subcloud reinstall: an existing offline subcloud, this
subcloud has image path in data_install in db dcmanager. After the
tasks of reinstall and bootstrap succeed, reconfig this subcloud with
proper deploy config, this subcloud will be online.
5. upload an image to dc-vault using: system --os-region-name
SystemController load-import -a <bootimage.iso> <bootimage.sig>. Then
using dcmanager subcloud reinstall to an existing offline subcloud,
this subcloud has no image path in data_install in db dcmanager. After
the tasks of reinstall and bootstrap succeed, reconfig this subcloud
with proper deploy config, this subcloud will be online.

Unhappy path:
1. dcmanager subcloud reinstall: an existing online subcloud,
reinstall fails.
2. dcmanager subcloud reinstall: an existing subcloud without
data_install value in db, reinstall fails.
3. dcmanager subcloud reinstall: an existing subcloud with
data_install in db, but missing mandatory install value, reinstall
fails.
4. dcmanager subcloud reinstall: an existing subcloud, but its sw
version in db doesn't meet the sw version with system controllers',
reinstall fails.
5. dcmanager subcloud reinstall: an existing subcloud with
data_install in db, but has no image path in data_install, and also
has no right versioned image in dc-vault in system controller,
reinstall fails.

Story: 2007267
Task: 40732
Change-Id: I8be6d8d11e6b4ee02bbcca499ba8869ba76bffaa
Signed-off-by: Yuxing Jiang <yuxing.jiang@windriver.com>
2020-10-09 10:11:35 -04:00
api-ref/source Create an API to reinstall a subcloud 2020-10-09 10:11:35 -04:00
distributedcloud Create an API to reinstall a subcloud 2020-10-09 10:11:35 -04:00
doc Switch to newer openstackdocstheme and reno versions 2020-06-04 14:18:06 +02:00
releasenotes Switch to newer openstackdocstheme and reno versions 2020-06-04 14:18:06 +02:00
.gitignore [Doc] OpenStack API Reference Guide 2018-09-25 08:18:08 -07:00
.gitreview OpenDev Migration Patch 2019-04-19 19:52:44 +00:00
.mailmap StarlingX open source release updates 2018-08-07 11:51:21 -04:00
.zuul.yaml Tox and Zuul job for the bandit code scan in stx/distributedcloud 2020-06-16 04:02:59 +00:00
CONTRIBUTING.rst StarlingX open source release updates 2018-08-07 11:51:21 -04:00
CONTRIBUTORS.wrs StarlingX open source release updates 2018-08-07 11:51:21 -04:00
HACKING.rst Update setup.cfg to align with StarlingX project 2019-01-07 16:34:24 +00:00
README_DC Update location of openrc in readme 2019-03-15 10:56:03 -05:00
centos_build_layer.cfg Build layering, add layer build config file 2019-11-08 08:40:22 +08:00
centos_dev_docker_images.inc OpenStack-Keystone Proxy Containerization 2019-11-04 14:36:50 -05:00
centos_dev_wheels.inc OpenStack-Keystone Proxy Containerization 2019-11-04 14:36:50 -05:00
centos_iso_image.inc Keystone token and resource caching 2020-03-23 21:31:04 -04:00
centos_pkg_dirs Update files for relocated repo 2019-11-04 14:36:51 -05:00
centos_stable_docker_images.inc OpenStack-Keystone Proxy Containerization 2019-11-04 14:36:50 -05:00
centos_stable_wheels.inc Update files for relocated repo 2019-11-04 14:36:51 -05:00
requirements.txt Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
test-requirements.txt Tox and Zuul job for the bandit code scan in stx/distributedcloud 2020-06-16 04:02:59 +00:00
tox.ini Tox and Zuul job for the bandit code scan in stx/distributedcloud 2020-06-16 04:02:59 +00:00