diff options
| author | Kei Masumoto <masumotok@nttdata.co.jp> | 2011-04-08 16:08:56 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-04-08 16:08:56 +0000 |
| commit | 9b449fc8a69cee6629156ada64bf8bff28f19349 (patch) | |
| tree | be5965496a3c5fb0fa2b83127a45358701cc440b | |
| parent | 34c25b9dd7988878e3660a8c5dffdcbb79fe932b (diff) | |
| parent | 44eefb1eefda5e42a286ee1aa689c1c93e72aae4 (diff) | |
| download | nova-9b449fc8a69cee6629156ada64bf8bff28f19349.tar.gz nova-9b449fc8a69cee6629156ada64bf8bff28f19349.tar.xz nova-9b449fc8a69cee6629156ada64bf8bff28f19349.zip | |
This branch fixes https://bugs.launchpad.net/nova/+bug/751242.
According to the above URL, the solution is 'migrating' instances never be terminated.
To do this, nova.compute.api.delete() should be modified.
| -rw-r--r-- | nova/compute/api.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 83ad6b0c9..041e0e74a 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -370,11 +370,15 @@ class API(base.Base): instance_id) raise - if (instance['state_description'] == 'terminating'): + if instance['state_description'] == 'terminating': LOG.warning(_("Instance %s is already being terminated"), instance_id) return + if instance['state_description'] == 'migrating': + LOG.warning(_("Instance %s is being migrated"), instance_id) + return + self.update(context, instance['id'], state_description='terminating', |
