Comment 6 for bug 1781286

Matt Riedemann (mriedem) wrote :

One idea for fixing this would be to set the AZ for each host in the list of Selection objects that come back from the scheduler - that happens at "the top" where we have access to the API DB and thus the aggregates table.

We send the list of Selection objects down to the compute service which, during a reschedule, would pass them back to the cell conductor and then rather than call get_host_availability_zone() we can just get the AZ for the alternate host from the Selection object and avoid the "up call".

This could potentially also be used to fix bug 1497253 where we're doing boot from volume and nova-compute creates the volume and [cinder]/cross_az_attach=False so nova has to tell cinder to create the volume in the same AZ as the instance.