Stop instance even if buildout/reporting is wrong.

parent 92cb399d
...@@ -780,8 +780,13 @@ class Slapgrid(object): ...@@ -780,8 +780,13 @@ class Slapgrid(object):
self._checkPromises(computer_partition) self._checkPromises(computer_partition)
computer_partition.started() computer_partition.started()
elif computer_partition_state == "stopped": elif computer_partition_state == "stopped":
try:
local_partition.install() local_partition.install()
computer_partition.available() computer_partition.available()
except Exception:
raise
finally:
# Instance has to be stopped even if buildout/reporting is wrong.
local_partition.stop() local_partition.stop()
computer_partition.stopped() computer_partition.stopped()
elif computer_partition_state == COMPUTER_PARTITION_DESTROYED_STATE: elif computer_partition_state == COMPUTER_PARTITION_DESTROYED_STATE:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment