pre bootstrap deploy patch
Patch deployment for pre bootstrap case was running into issues due to sysinv calls made and controller-0 checks, they are now called only when its not a pre bootstrap case. Test Plan PASS: Run patch deployment lifecycle for pre bootstrap case PASS: Run patch deployment lifecycle for bootstrap case PASS: Run major release deployment lifecycle for bootstrap case Story: 2010676 Task: 51149 Change-Id: Ia575c512026b0b2cf1fefaef867b5efbabc7af90 Signed-off-by: sshathee <shunmugam.shatheesh@windriver.com>
This commit is contained in:
parent
5d18eba713
commit
d00ee68433
@ -3281,8 +3281,9 @@ class PatchController(PatchService):
|
||||
:return: dict of info, warning and error messages
|
||||
"""
|
||||
|
||||
if self.hostname != constants.CONTROLLER_0_HOSTNAME:
|
||||
raise SoftwareServiceError("Deployment deletion can only be performed on controller-0.")
|
||||
if not self.pre_bootstrap:
|
||||
if self.hostname != constants.CONTROLLER_0_HOSTNAME:
|
||||
raise SoftwareServiceError("Deployment deletion can only be performed on controller-0.")
|
||||
|
||||
msg_info = ""
|
||||
msg_warning = ""
|
||||
@ -3298,11 +3299,12 @@ class PatchController(PatchService):
|
||||
# hosts must be unlocked and online since during delete deployment
|
||||
# a request is sent to all hosts to clear flags and temporary data
|
||||
# created during the deployment procedure
|
||||
if (deploy_state_instance.get_deploy_state() not in [DEPLOY_STATES.START_DONE,
|
||||
DEPLOY_STATES.START_FAILED] and
|
||||
not are_all_hosts_unlocked_and_online()):
|
||||
msg = f"Hosts must be {constants.ADMIN_UNLOCKED} and {constants.AVAILABILITY_ONLINE}."
|
||||
raise SoftwareServiceError(error=msg)
|
||||
if not self.pre_bootstrap:
|
||||
if (deploy_state_instance.get_deploy_state() not in [DEPLOY_STATES.START_DONE,
|
||||
DEPLOY_STATES.START_FAILED] and
|
||||
not are_all_hosts_unlocked_and_online()):
|
||||
msg = f"Hosts must be {constants.ADMIN_UNLOCKED} and {constants.AVAILABILITY_ONLINE}."
|
||||
raise SoftwareServiceError(error=msg)
|
||||
|
||||
is_major_release = False
|
||||
|
||||
@ -3477,9 +3479,10 @@ class PatchController(PatchService):
|
||||
return True
|
||||
|
||||
def _check_pre_activate(self):
|
||||
if not are_all_hosts_unlocked_and_online():
|
||||
msg = f"Hosts must be {constants.ADMIN_UNLOCKED} and {constants.AVAILABILITY_ONLINE}."
|
||||
raise SoftwareServiceError(error=msg)
|
||||
if not self.pre_bootstrap:
|
||||
if not are_all_hosts_unlocked_and_online():
|
||||
msg = f"Hosts must be {constants.ADMIN_UNLOCKED} and {constants.AVAILABILITY_ONLINE}."
|
||||
raise SoftwareServiceError(error=msg)
|
||||
# check current deployment, deploy to all hosts have completed,
|
||||
# the deploy state is host-done, or
|
||||
# activate-failed' as reattempt from a previous failed activate
|
||||
|
Loading…
Reference in New Issue
Block a user