diff --git a/bin/mentat-controller.py b/bin/mentat-controller.py index 6648c5ff55574552349d4e72c78d7a16189442be..e27ae18f6d5813b32a0d28befa080306d103c385 100755 --- a/bin/mentat-controller.py +++ b/bin/mentat-controller.py @@ -511,6 +511,15 @@ class MentatControllerScript(pyzenkit.zenscript.ZenScript): else: self.logger.info("Module '{}': Module is in weird state, unable to perform automatic shutdown".format(cname)) + self.logger.info("Waiting for modules to fully shut down") + time.sleep(1) + status = self._modules_status() + if status['result'][0] == STATUS_NOT_RUNNING: + self.logger.info("System shutdown seems successfull") + else: + self.logger.info("System shutdown seems to have failed") + + self.rc = status['result'][0] return self.RESULT_SUCCESS def cbk_command_signal_kill(self):