diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py index a731cb842d..6e1b541c6d 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/host.py @@ -6196,13 +6196,16 @@ class HostController(rest.RestController): if isinstance(upgrade, usm_service.UsmUpgrade): 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 pass else: 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 \ - to_host_deploy['host_state'] == constants.DEPLOY_HOST_PENDING: + if from_host_deploy['host_state'] in [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 pass else: diff --git a/sysinv/sysinv/sysinv/sysinv/common/constants.py b/sysinv/sysinv/sysinv/sysinv/common/constants.py index 1458029fa6..1dc9fd2c93 100644 --- a/sysinv/sysinv/sysinv/sysinv/common/constants.py +++ b/sysinv/sysinv/sysinv/sysinv/common/constants.py @@ -2590,9 +2590,12 @@ ISSUER = "Issuer" # USM deploy state DEPLOY_STATE_HOST = 'host' # host is being deploy DEPLOY_STATE_HOST_FAILED = 'host-failed' # host deployment failed + # USM deploy host state DEPLOY_HOST_PENDING = 'pending' # host is pending for new deployment 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_POST = 'post'