Merge "Enable swact in USM deploy abort/rollback scenario"
This commit is contained in:
commit
5ec2d6822a
sysinv/sysinv/sysinv/sysinv
@ -6196,13 +6196,16 @@ class HostController(rest.RestController):
|
|||||||
|
|
||||||
if isinstance(upgrade, usm_service.UsmUpgrade):
|
if isinstance(upgrade, usm_service.UsmUpgrade):
|
||||||
to_host_deploy = usm_service.get_host_deploy(pecan.request.dbapi, to_host['hostname'])
|
to_host_deploy = usm_service.get_host_deploy(pecan.request.dbapi, to_host['hostname'])
|
||||||
if to_host_deploy['host_state'] == constants.DEPLOY_HOST_DEPLOYED:
|
if to_host_deploy['host_state'] in [constants.DEPLOY_HOST_DEPLOYED,
|
||||||
|
constants.DEPLOY_HOST_ROLLBACK_DEPLOYED]:
|
||||||
# to host has deployed
|
# to host has deployed
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
from_host_deploy = usm_service.get_host_deploy(pecan.request.dbapi, from_host['hostname'])
|
from_host_deploy = usm_service.get_host_deploy(pecan.request.dbapi, from_host['hostname'])
|
||||||
if from_host_deploy['host_state'] == constants.DEPLOY_HOST_PENDING and \
|
if from_host_deploy['host_state'] in [constants.DEPLOY_HOST_PENDING,
|
||||||
to_host_deploy['host_state'] == constants.DEPLOY_HOST_PENDING:
|
constants.DEPLOY_HOST_ROLLBACK_PENDING] and \
|
||||||
|
to_host_deploy['host_state'] in [constants.DEPLOY_HOST_PENDING,
|
||||||
|
constants.DEPLOY_HOST_ROLLBACK_PENDING]:
|
||||||
# no host has started deploy yet
|
# no host has started deploy yet
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
@ -2590,9 +2590,12 @@ ISSUER = "Issuer"
|
|||||||
# USM deploy state
|
# USM deploy state
|
||||||
DEPLOY_STATE_HOST = 'host' # host is being deploy
|
DEPLOY_STATE_HOST = 'host' # host is being deploy
|
||||||
DEPLOY_STATE_HOST_FAILED = 'host-failed' # host deployment failed
|
DEPLOY_STATE_HOST_FAILED = 'host-failed' # host deployment failed
|
||||||
|
|
||||||
# USM deploy host state
|
# USM deploy host state
|
||||||
DEPLOY_HOST_PENDING = 'pending' # host is pending for new deployment
|
DEPLOY_HOST_PENDING = 'pending' # host is pending for new deployment
|
||||||
DEPLOY_HOST_DEPLOYED = 'deployed' # new software is deployed to the host
|
DEPLOY_HOST_DEPLOYED = 'deployed' # new software is deployed to the host
|
||||||
|
DEPLOY_HOST_ROLLBACK_PENDING = 'rollback-pending' # host is pending for rollback
|
||||||
|
DEPLOY_HOST_ROLLBACK_DEPLOYED = 'rollback-deployed' # rollback release is deployed to the host
|
||||||
|
|
||||||
# API operations
|
# API operations
|
||||||
API_POST = 'post'
|
API_POST = 'post'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user