From d347a5d068f29de50c6f5d72ba7d350d782919b5 Mon Sep 17 00:00:00 2001 From: S Shatheesh Date: Mon, 23 Sep 2024 10:08:37 +0000 Subject: [PATCH] Revert "major release state change exception handling" This reverts commit 795d909b4d6bca1b2cdfabd95242cd40aac66b00. Reason for revert: This commit is reverted because the exception could accidentally introduce new state machine transitions, which might be undefined. An error log will be added instead to https://review.opendev.org/c/starlingx/update/+/926468 Story: 2010676 Task: 50799 Change-Id: Ie7be94833b26695400fd38792be5fb8448603405 Signed-off-by: sshathee --- software/software/software_controller.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/software/software/software_controller.py b/software/software/software_controller.py index 8a3413d9..d3ee8c7f 100644 --- a/software/software/software_controller.py +++ b/software/software/software_controller.py @@ -840,24 +840,11 @@ class SWMessageDeployStateChanged(messages.PatchMessage): if self.deploy_state: LOG.info("Received deploy state changed to %s, agent %s" % - (self.deploy_state, self.agent)) - try: - sc.deploy_state_changed(self.deploy_state) - except Exception as e: - LOG.exception("Deploy state change failed: %s" % str(e)) - - # Error occurred while transitioning state to start-done - # so change it to start-failed - if self.deploy_state == DEPLOY_STATES.START_DONE: - sc.deploy_state_changed(DEPLOY_STATES.START_FAILED) - - # Error occurred while transitioning state to activate-done - # so change it to activate-failed - if self.deploy_state == DEPLOY_STATES.ACTIVATE_DONE: - sc.deploy_state_changed(DEPLOY_STATES.ACTIVATE_FAILED) + (self.deploy_state, self.agent)) + sc.deploy_state_changed(self.deploy_state) else: LOG.info("Received %s deploy host state changed to %s, agent %s" % - (self.hostname, self.host_state, self.agent)) + (self.hostname, self.host_state, self.agent)) sc.host_deploy_state_changed(self.hostname, self.host_state) sock.sendto(str.encode("OK"), addr)