Instance-Delete Should Stop the Database First
on instance-delete, the database should be stopped before deleting the nova compute. Closes-Bug #1381174 Change-Id: I94c2fa08be7faac37e1ac0a4460ad61f1f7ef164
This commit is contained in:
parent
b5fcceeafb
commit
9a9477c222
@ -844,6 +844,13 @@ class BuiltInstanceTasks(BuiltInstance, NotifyMixin, ConfigurationMixin):
|
||||
LOG.debug("Begin _delete_resources for instance %s" % self.id)
|
||||
server_id = self.db_info.compute_instance_id
|
||||
old_server = self.nova_client.servers.get(server_id)
|
||||
LOG.debug("Stopping datastore on instance %s before deleting any "
|
||||
"resources." % self.id)
|
||||
try:
|
||||
self.guest.stop_db()
|
||||
except Exception:
|
||||
LOG.exception(_("Error stopping the datastore before attempting "
|
||||
"to delete instance id %s.") % self.id)
|
||||
try:
|
||||
if use_heat:
|
||||
# Delete the server via heat
|
||||
|
Loading…
Reference in New Issue
Block a user