e422731760
If Site1 (the local site) is down while setting up the protection group, the subcloud peer group sync state is unable to determine. This commit will automatically create the non-primary association on Site2 (the peer site) when creating a primary association, and update the sync state to the non-primary association. Then the operator can check the sync state on Site2 if Site1 is down. Test Plan: - PASS: Create a primary association and check the non-primary association on peer site. It was created, and sync_status will follow the primary association's sync_status. - PASS: Delete the primary association and check the non-primary association on peer site. It was deleted. - PASS: If you restart the "dcmanager-manager service" in the local site while the association sync_status is in "syncing", the sync_status will transition to "failed". - PASS: Create a primary association and wait for the sync_status change to "in-sync". Delete the subcloud peer group on peer site, the deletion will fail because it is associating to the non-primary association. Closes-Bug: 2046809 Change-Id: Ia917d0dc7c65fbea1e222fb52dbec79fdbe65b65 Signed-off-by: Zhang Rong(Jon) <rong.zhang@windriver.com> |
||
---|---|---|
.. | ||
controllers | ||
policies | ||
README.rst | ||
__init__.py | ||
api_config.py | ||
app.py | ||
policy.py |
README.rst
api
DC Manager API is Web Server Gateway Interface (WSGI) application to receive and process API calls, including keystonemiddleware to do the authentication, parameter check and validation, convert API calls to job rpc message, and then send the job to DC Manager Manager through the queue. If the job will be processed by DC Manager Manager in synchronous way, the DC Manager API will wait for the response from the DC Manager Manager. Otherwise, the DC Manager API will send response to the API caller first, and then send the job to DC Manager Manager in asynchronous way.
Multiple DC Manager API could run in parallel, and also can work in multi-worker mode.
Multiple DC Manager API will be designed and run in stateless mode, persistent data will be accessed (read and write) from the DC Manager Database through the DAL module.
Setup and encapsulate the API WSGI app
- app.py:
-
Setup and encapsulate the API WSGI app, including integrate the keystonemiddleware app
- api_config.py:
-
API configuration loading and init
- enforcer.py
-
Enforces policies on the version2 APIs