Merge "Rework task state machine for storage backend provision replication"

This commit is contained in:
Zuul 2019-06-13 14:54:03 +00:00 committed by Gerrit Code Review
commit bd522db935
5 changed files with 4 additions and 6 deletions

View File

@ -43,7 +43,6 @@ SB_STATE_CONFIGURING = 'configuring'
# Storage backend tasks
SB_TASK_NONE = None
SB_TASK_RECONFIG_CONTROLLER = 'reconfig-controller'
SB_TASK_PROVISION_STORAGE = 'provision-storage'
SB_TASK_RECONFIG_WORKER = 'reconfig-worker'
SB_TASK_RESIZE_CEPH_MON_LV = 'resize-ceph-mon-lv'

View File

@ -4032,7 +4032,7 @@ class HostController(rest.RestController):
if bk['state'] != constants.SB_STATE_CONFIGURED:
# TODO(oponcea): Remove once sm supports in-service configuration
if (bk['backend'] != constants.SB_TYPE_CEPH or
bk['task'] != constants.SB_TASK_RECONFIG_CONTROLLER or
bk['task'] != constants.SB_TASK_PROVISION_STORAGE or
ihost['personality'] != constants.CONTROLLER):
msg = _("%(backend)s is %(notok)s. All storage backends must "
"be %(ok)s before operation "
@ -4558,7 +4558,7 @@ class HostController(rest.RestController):
return
# check if customer needs to install storage nodes
if backend.task == constants.SB_TASK_RECONFIG_CONTROLLER:
if backend.task == constants.SB_TASK_PROVISION_STORAGE:
stor_model = ceph.get_ceph_storage_model()
if (HostController._check_provisioned_storage_hosts() or
stor_model == constants.CEPH_CONTROLLER_MODEL):

View File

@ -791,7 +791,7 @@ def _set_defaults(storage_ceph):
if utils.is_aio_simplex_system(pecan.request.dbapi):
sc['task'] = None
else:
sc['task'] = constants.SB_TASK_RECONFIG_CONTROLLER
sc['task'] = constants.SB_TASK_PROVISION_STORAGE
return sc

View File

@ -456,7 +456,6 @@ SB_STATE_CONFIGURING_ON_UNLOCK = 'configuring-on-unlock'
SB_TASK_NONE = None
SB_TASK_APPLY_MANIFESTS = 'applying-manifests'
SB_TASK_APPLY_CONFIG_FILE = 'applying-config-file'
SB_TASK_RECONFIG_CONTROLLER = 'reconfig-controller'
SB_TASK_PROVISION_STORAGE = 'provision-storage'
SB_TASK_PROVISION_SERVICES = 'provision-services'
SB_TASK_RECONFIG_WORKER = 'reconfig-worker'

View File

@ -6696,7 +6696,7 @@ class ConductorManager(service.PeriodicService):
if ceph_conf.state != constants.SB_STATE_CONFIG_ERR:
if config_success:
values = {'task': constants.SB_TASK_RECONFIG_CONTROLLER}
values = {'task': constants.SB_TASK_PROVISION_STORAGE}
else:
values = {'task': str(tasks)}
self.dbapi.storage_backend_update(ceph_conf.uuid, values)