Stop instance even if buildout/reporting is wrong.

parent 92cb399d
...@@ -780,9 +780,14 @@ class Slapgrid(object): ...@@ -780,9 +780,14 @@ 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":
local_partition.install() try:
computer_partition.available() local_partition.install()
local_partition.stop() computer_partition.available()
except Exception:
raise
finally:
# Instance has to be stopped even if buildout/reporting is wrong.
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:
local_partition.stop() local_partition.stop()
......
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