From 1deaa07313f028c8837c428b536918c9d18d22be Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Tue, 11 Aug 2020 19:16:19 -0400 Subject: [PATCH] Add in-progress to pending status change handling to VIM fwupdate orch A host level device_image_update status, during fwupdate, can change from 'in-progress' to 'pending' as a result of an update failure. This update adds this failure handling state transition case to the VIM's fwupdate orchestration service. Change-Id: If7492bb11a0452330652b833e952754399a47d8f Closes-Bug: 1890915 Signed-off-by: Eric MacDonald --- nfv/nfv-vim/nfv_vim/strategy/_strategy_steps.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nfv/nfv-vim/nfv_vim/strategy/_strategy_steps.py b/nfv/nfv-vim/nfv_vim/strategy/_strategy_steps.py index 5aa9c03f..09c463d6 100755 --- a/nfv/nfv-vim/nfv_vim/strategy/_strategy_steps.py +++ b/nfv/nfv-vim/nfv_vim/strategy/_strategy_steps.py @@ -1879,7 +1879,11 @@ class FwUpdateHostsStep(strategy.StrategyStep): if device_image_update is None: DLOG.verbose("%s no firmware update required" % hostname) elif device_image_update == FW_UPDATE_LABEL.DEVICE_IMAGE_UPDATE_PENDING: - DLOG.warn("%s is still in pending state" % hostname) + if self._host_completed[hostname][0] is False: + DLOG.warn("%s firmware update status went pending during update" % hostname) + failed_msg = hostname + ' firmware update failed ; needs retry' + self._host_completed[hostname] = (True, False, failed_msg) + DLOG.error(failed_msg) elif device_image_update == FW_UPDATE_LABEL.DEVICE_IMAGE_UPDATE_IN_PROGRESS: DLOG.info("%s firmware update in-progress" % hostname) elif device_image_update == FW_UPDATE_LABEL.DEVICE_IMAGE_UPDATE_IN_PROGRESS_ABORTED: