Comment 8 for bug 1267862

Revision history for this message
Chris Friesen (cbf123) wrote :

I'm pretty sure we still have a problem in current master (Newton). In nova.compute.manager.ComputeManager._post_live_migration() we call self.compute_rpcapi.post_live_migration_at_destination(), which is an RPC cast so we have no idea when it'll actually run. (That routine is what actually updates instance.host to point to the new destination.)

Then we call self.update_available_resource(). If post_live_migration_at_destination() hasn't run yet, then the instance.host will still be be the source host and we'll account for its resources in nova.compute.resource_tracker.ResourceTracker._update_available_resource() when we call self._update_usage_from_instances(). This basically means that we called self.update_available_resource() for nothing.

The only sure fix is to make the call to post_live_migration_at_destination() an RPC cast. Barring that, we could put in a delay before calling self.update_available_resource(), or maybe move it down to the bottom of the function to increase the likelihood that post_live_migration_at_destination() has run by the time we get to it.