diff options
| author | Ken Pepple <ken.pepple@gmail.com> | 2011-03-02 17:50:48 -0800 |
|---|---|---|
| committer | Ken Pepple <ken.pepple@gmail.com> | 2011-03-02 17:50:48 -0800 |
| commit | de43ea935ed1a65ef48c160b48ffa0fa6df28428 (patch) | |
| tree | e0a4da8d868e3d78642de5fcb4f7ac3aaaaa9710 /nova/compute | |
| parent | 74f2a7537e9e4b8259a4179adc21eef59e59d3c5 (diff) | |
| parent | 11dde805f48a17465c9c2b0c08b8302713f25471 (diff) | |
| download | nova-de43ea935ed1a65ef48c160b48ffa0fa6df28428.tar.gz nova-de43ea935ed1a65ef48c160b48ffa0fa6df28428.tar.xz nova-de43ea935ed1a65ef48c160b48ffa0fa6df28428.zip | |
merged trunk
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/manager.py | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index d659712ad..3af97683f 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -370,12 +370,19 @@ class ComputeManager(manager.Manager): context = context.elevated() instance_ref = self.db.instance_get(context, instance_id) LOG.audit(_('instance %s: rescuing'), instance_id, context=context) - self.db.instance_set_state(context, - instance_id, - power_state.NOSTATE, - 'rescuing') + self.db.instance_set_state( + context, + instance_id, + power_state.NOSTATE, + 'rescuing') self.network_manager.setup_compute_network(context, instance_id) - self.driver.rescue(instance_ref) + self.driver.rescue( + instance_ref, + lambda result: self._update_state_callback( + self, + context, + instance_id, + result)) self._update_state(context, instance_id) @exception.wrap_exception @@ -385,11 +392,18 @@ class ComputeManager(manager.Manager): context = context.elevated() instance_ref = self.db.instance_get(context, instance_id) LOG.audit(_('instance %s: unrescuing'), instance_id, context=context) - self.db.instance_set_state(context, - instance_id, - power_state.NOSTATE, - 'unrescuing') - self.driver.unrescue(instance_ref) + self.db.instance_set_state( + context, + instance_id, + power_state.NOSTATE, + 'unrescuing') + self.driver.unrescue( + instance_ref, + lambda result: self._update_state_callback( + self, + context, + instance_id, + result)) self._update_state(context, instance_id) @staticmethod |
