diff --git a/CHANGELOG.md b/CHANGELOG.md index bf36a710..9eb6606f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## (2020-01-31) + +#### Bug Fixes + +* **vm:** also check and set error state ([f1373adf](f1373adf)) + ## (2020-01-24) #### Features diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 99cc3555..87f7f922 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -60,6 +60,7 @@ class VirtualMachineHandler(Iface): global active_playbooks BUILD = "BUILD" ACTIVE = "ACTIVE" + ERROR = "ERROR" PREPARE_PLAYBOOK_BUILD = "PREPARE_PLAYBOOK_BUILD" BUILD_PLAYBOOK = "BUILD_PLAYBOOK" PLAYBOOK_FAILED = "PLAYBOOK_FAILED" @@ -1225,6 +1226,10 @@ def check_server_status(self, openstack_id, diskspace, volume_id): server = self.get_server(openstack_id) server.status = "PORT_CLOSED" return server + elif serv["status"] == self.ERROR: + server = self.get_server(openstack_id) + server.status = self.ERROR + return server else: server = self.get_server(openstack_id) server.status = self.BUILD