Comment 2 for bug 1890503

Revision history for this message
Takamasa Takenaka (ttakenak) wrote :

[Root Cause]
Cloud overview panel does not recognize new introduced deploy state values like "data-migration-failed".
So that when the state is changed, it showed the state in text but icon is not shown.

[Design Overview]
Add deploy state to bind to the proper icons.

[Impact]
This fix will be in one html page which contains the function to select proper icon for deploy states. It will not affect other function or other application.

[Background]
Cloud overview panel shows deploy state in the list. Deploy state is obtained by API and screen is refreshed automatically by interval.
When the deploy state is obtained, panel shows the state text with proper icon (red for DANGER state, for example).
New deploy states are intrduced after, but panel htlm, which contains the code to manage showing proper icon, was not updated.
As a result, when new deploy state comes up, panel does not show the icon.

Currently supported:

[DANGER]
DEPLOY_STATE_PRE_INSTALL_FAILED = 'pre-install-failed'
DEPLOY_STATE_INSTALL_FAILED = 'install-failed'
DEPLOY_STATE_BOOTSTRAP_FAILED = 'bootstrap-failed'
DEPLOY_STATE_DEPLOY_FAILED = 'deploy-failed'

[WARNING]
DEPLOY_STATE_NONE = 'not-deployed'
DEPLOY_STATE_PRE_INSTALL = 'pre-install'
DEPLOY_STATE_INSTALLING = 'installing'
DEPLOY_STATE_BOOTSTRAPPING = 'bootstrapping'
DEPLOY_STATE_DEPLOYING = 'deploying'

[SUCCESS]
DEPLOY_STATE_DONE = 'complete'

Need to support
[DANGER]
DEPLOY_STATE_DEPLOY_PREP_FAILED = 'deploy-prep-failed'
DEPLOY_STATE_DATA_MIGRATION_FAILED = 'data-migration-failed'
DEPLOY_STATE_RESTORE_PREP_FAILED = 'restore-prep-failed'
DEPLOY_STATE_RESTORE_FAILED = 'restore-failed'

[WARNING]
DEPLOY_STATE_PRE_DEPLOY = 'pre-deploy'
DEPLOY_STATE_MIGRATING_DATA = 'migrating-data'
DEPLOY_STATE_PRE_RESTORE = 'pre-restore'
DEPLOY_STATE_RESTORING = 'restoring'

[SUCCESS]
DEPLOY_STATE_INSTALLED = 'installed'
DEPLOY_STATE_MIGRATED = 'migrated'

Possible deploy states are obtained from distributedcloud/dcmanager/common/consts.py