diff options
| author | Dan Smith <danms@us.ibm.com> | 2013-02-12 12:34:39 -0500 |
|---|---|---|
| committer | Dan Smith <danms@us.ibm.com> | 2013-02-12 18:18:33 -0500 |
| commit | 959e65f320093a6b17945f52ad160da5aa042ff6 (patch) | |
| tree | a521c2499b7b8530eb9725c9f3aa89368f08cac1 /nova/compute | |
| parent | 9994a9161d0acac216b3441233eae1f7238db889 (diff) | |
Make compute manager use conductor for stopping instances
During _sync_power_states, the manager will call to compute_api to
stop instances as necessary. This takes a database hit, which isn't
allowed. This directs that call through conductor, following the
pattern of late.
Fixes bug 1123219
Change-Id: I5d789dd73390cb1c41a245f6594b1c3aecf7efde
Diffstat (limited to 'nova/compute')
| -rwxr-xr-x | nova/compute/manager.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 4bb08aa16..8927e682a 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -3436,7 +3436,7 @@ class ComputeManager(manager.SchedulerDependentManager): # Note(maoy): here we call the API instead of # brutally updating the vm_state in the database # to allow all the hooks and checks to be performed. - self.compute_api.stop(context, db_instance) + self.conductor_api.compute_stop(context, db_instance) except Exception: # Note(maoy): there is no need to propagate the error # because the same power_state will be retrieved next @@ -3449,7 +3449,7 @@ class ComputeManager(manager.SchedulerDependentManager): LOG.warn(_("Instance is suspended unexpectedly. Calling " "the stop API."), instance=db_instance) try: - self.compute_api.stop(context, db_instance) + self.conductor_api.compute_stop(context, db_instance) except Exception: LOG.exception(_("error during stop() in " "sync_power_state."), @@ -3479,7 +3479,7 @@ class ComputeManager(manager.SchedulerDependentManager): try: # Note(maoy): this assumes that the stop API is # idempotent. - self.compute_api.stop(context, db_instance) + self.conductor_api.compute_stop(context, db_instance) except Exception: LOG.exception(_("error during stop() in " "sync_power_state."), |
